mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
Fixes for pdf attachment to invoices
This commit is contained in:
parent
bc0a925f39
commit
53c2db072f
@ -25,7 +25,7 @@ class BaseEmailEngine implements EngineInterface
|
||||
|
||||
public $template_style;
|
||||
|
||||
public $attachments;
|
||||
public $attachments = [];
|
||||
|
||||
public $link;
|
||||
|
||||
@ -83,7 +83,8 @@ class BaseEmailEngine implements EngineInterface
|
||||
|
||||
public function setAttachments($attachments)
|
||||
{
|
||||
$this->attachments = $attachments;
|
||||
|
||||
$this->attachments = array_merge($this->getAttachments(), $attachments);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ class CreditEmailEngine extends BaseEmailEngine
|
||||
->setViewText(ctrans('texts.view_credit'));
|
||||
|
||||
if ($this->client->getSetting('pdf_email_attachment') !== false) {
|
||||
$this->setAttachments($invitation->pdf_file_path());
|
||||
$this->setAttachments([$this->credit->pdf_file_path()]);
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@ -97,7 +97,7 @@ class InvoiceEmailEngine extends BaseEmailEngine
|
||||
->setViewText(ctrans('texts.view_invoice'));
|
||||
|
||||
if ($this->client->getSetting('pdf_email_attachment') !== false) {
|
||||
$this->setAttachments($this->invoice->pdf_file_path());
|
||||
$this->setAttachments([$this->invoice->pdf_file_path()]);
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@ -88,7 +88,7 @@ class QuoteEmailEngine extends BaseEmailEngine
|
||||
->setViewText(ctrans('texts.view_quote'));
|
||||
|
||||
if ($this->client->getSetting('pdf_email_attachment') !== false) {
|
||||
$this->setAttachments($this->invitation->pdf_file_path());
|
||||
$this->setAttachments([$this->invitation->pdf_file_path()]);
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
Loading…
Reference in New Issue
Block a user