Fixes for pdf creation

This commit is contained in:
David Bomba 2021-07-07 17:25:17 +10:00
parent cbd2374d24
commit 6e873f3f60

View File

@ -112,7 +112,7 @@ class InvoiceEmailEngine extends BaseEmailEngine
if ($this->client->getSetting('pdf_email_attachment') !== false && $this->invoice->company->account->hasFeature(Account::FEATURE_PDF_ATTACHMENT)) {
CreateEntityPdf::dispatchNow($invitation);
CreateEntityPdf::dispatchNow($this->invitation);
if(Ninja::isHosted())
$this->setAttachments([$this->invoice->pdf_file_path($this->invitation, 'url', true)]);