mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 13:34:30 -04: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 $template_style;
|
||||||
|
|
||||||
public $attachments;
|
public $attachments = [];
|
||||||
|
|
||||||
public $link;
|
public $link;
|
||||||
|
|
||||||
@ -83,7 +83,8 @@ class BaseEmailEngine implements EngineInterface
|
|||||||
|
|
||||||
public function setAttachments($attachments)
|
public function setAttachments($attachments)
|
||||||
{
|
{
|
||||||
$this->attachments = $attachments;
|
|
||||||
|
$this->attachments = array_merge($this->getAttachments(), $attachments);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ class CreditEmailEngine extends BaseEmailEngine
|
|||||||
->setViewText(ctrans('texts.view_credit'));
|
->setViewText(ctrans('texts.view_credit'));
|
||||||
|
|
||||||
if ($this->client->getSetting('pdf_email_attachment') !== false) {
|
if ($this->client->getSetting('pdf_email_attachment') !== false) {
|
||||||
$this->setAttachments($invitation->pdf_file_path());
|
$this->setAttachments([$this->credit->pdf_file_path()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -97,7 +97,7 @@ class InvoiceEmailEngine extends BaseEmailEngine
|
|||||||
->setViewText(ctrans('texts.view_invoice'));
|
->setViewText(ctrans('texts.view_invoice'));
|
||||||
|
|
||||||
if ($this->client->getSetting('pdf_email_attachment') !== false) {
|
if ($this->client->getSetting('pdf_email_attachment') !== false) {
|
||||||
$this->setAttachments($this->invoice->pdf_file_path());
|
$this->setAttachments([$this->invoice->pdf_file_path()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -88,7 +88,7 @@ class QuoteEmailEngine extends BaseEmailEngine
|
|||||||
->setViewText(ctrans('texts.view_quote'));
|
->setViewText(ctrans('texts.view_quote'));
|
||||||
|
|
||||||
if ($this->client->getSetting('pdf_email_attachment') !== false) {
|
if ($this->client->getSetting('pdf_email_attachment') !== false) {
|
||||||
$this->setAttachments($this->invitation->pdf_file_path());
|
$this->setAttachments([$this->invitation->pdf_file_path()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user