Attach invoice documents to payment emails
This commit is contained in:
parent
a24a051004
commit
269b3cf198
1 changed files with 6 additions and 2 deletions
|
|
@ -96,8 +96,12 @@ class PaymentEmailEngine extends BaseEmailEngine
|
|||
|
||||
$this->setAttachments([['file' => base64_encode($pdf), 'name' => $invoice->numberFormatter().'.pdf']]);
|
||||
|
||||
foreach ($invoice->documents as $document) {
|
||||
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, ]]);
|
||||
//attach invoice documents also to payments
|
||||
if ($this->client->getSetting('document_email_attachment') !== false)
|
||||
{
|
||||
foreach ($invoice->documents as $document) {
|
||||
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, ]]);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue