mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 16:31:33 +02:00
Attach invoice documents to payment emails
This commit is contained in:
parent
a24a051004
commit
269b3cf198
@ -96,8 +96,12 @@ class PaymentEmailEngine extends BaseEmailEngine
|
|||||||
|
|
||||||
$this->setAttachments([['file' => base64_encode($pdf), 'name' => $invoice->numberFormatter().'.pdf']]);
|
$this->setAttachments([['file' => base64_encode($pdf), 'name' => $invoice->numberFormatter().'.pdf']]);
|
||||||
|
|
||||||
foreach ($invoice->documents as $document) {
|
//attach invoice documents also to payments
|
||||||
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, ]]);
|
if ($this->client->getSetting('document_email_attachment') !== false)
|
||||||
|
{
|
||||||
|
foreach ($invoice->documents as $document) {
|
||||||
|
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, ]]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user