1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00

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->sendPerformed($message);
return $this->numberOfRecipients($message);
}
}

View File

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

View File

@ -415,7 +415,7 @@ class Invoice extends BaseModel
return Storage::disk(config('filesystems.default'))->{$type}($file_path);
}
elseif(Ninja::isHosted() && $portal){
$file_path = CreateEntityPdf::dispatchNow($invitation,config('filesystems.default'));
$file_path = CreateEntityPdf::dispatchNow($invitation, config('filesystems.default'));
return Storage::disk(config('filesystems.default'))->{$type}($file_path);
}

View File

@ -307,7 +307,7 @@ class InvoiceService
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');
if(Ninja::isHosted()) {
@ -351,8 +351,17 @@ class InvoiceService
* PDF when it is updated etc.
* @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) {
CreateEntityPdf::dispatch($invitation);
});