Minor fixes

This commit is contained in:
David Bomba 2021-06-12 19:40:28 +10:00
parent 13606aa8f3
commit edf2dfcc80
4 changed files with 12 additions and 7 deletions

View File

@ -74,14 +74,12 @@ class GmailTransport extends Transport
} }
} }
$this->gmail->send(); $this->gmail->send();
$this->sendPerformed($message); $this->sendPerformed($message);
return $this->numberOfRecipients($message); return $this->numberOfRecipients($message);
} }
} }

View File

@ -102,8 +102,6 @@ class CreateEntityPdf implements ShouldQueue
/* Set the locale*/ /* Set the locale*/
App::setLocale($this->contact->preferredLocale()); App::setLocale($this->contact->preferredLocale());
// nlog($this->entity->client->getMergedSettings());
/* Set customized translations _NOW_ */ /* Set customized translations _NOW_ */
$t->replace(Ninja::transformTranslations($this->entity->client->getMergedSettings())); $t->replace(Ninja::transformTranslations($this->entity->client->getMergedSettings()));

View File

@ -307,7 +307,7 @@ class InvoiceService
public function deletePdf() public function deletePdf()
{ {
//UnlinkFile::dispatchNow(config('filesystems.default'), $this->invoice->client->invoice_filepath() . $this->invoice->numberFormatter().'.pdf');
Storage::disk(config('filesystems.default'))->delete($this->invoice->client->invoice_filepath() . $this->invoice->numberFormatter().'.pdf'); Storage::disk(config('filesystems.default'))->delete($this->invoice->client->invoice_filepath() . $this->invoice->numberFormatter().'.pdf');
if(Ninja::isHosted()) { if(Ninja::isHosted()) {
@ -351,8 +351,17 @@ class InvoiceService
* PDF when it is updated etc. * PDF when it is updated etc.
* @return InvoiceService * @return InvoiceService
*/ */
public function touchPdf() public function touchPdf($force = false)
{ {
if($force){
$this->invoice->invitations->each(function ($invitation) {
CreateEntityPdf::dispatchNow($invitation);
});
return $this;
}
$this->invoice->invitations->each(function ($invitation) { $this->invoice->invitations->each(function ($invitation) {
CreateEntityPdf::dispatch($invitation); CreateEntityPdf::dispatch($invitation);
}); });