mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Attach recurring invoice docs
This commit is contained in:
parent
af8ea65b33
commit
7a378863a5
@ -138,6 +138,17 @@ class InvoiceEmailEngine extends BaseEmailEngine
|
|||||||
if ($this->client->getSetting('document_email_attachment') !== false && $this->invoice->company->account->hasFeature(Account::FEATURE_DOCUMENTS)) {
|
if ($this->client->getSetting('document_email_attachment') !== false && $this->invoice->company->account->hasFeature(Account::FEATURE_DOCUMENTS)) {
|
||||||
|
|
||||||
|
|
||||||
|
if($this->invoice->recurring_invoice()->exists())
|
||||||
|
{
|
||||||
|
foreach ($this->invoice->recurring_invoice->documents as $document) {
|
||||||
|
|
||||||
|
if($document->size > $this->max_attachment_size)
|
||||||
|
$this->setAttachmentLinks(["<a class='doc_links' href='" . URL::signedRoute('documents.public_download', ['document_hash' => $document->hash]) ."'>". $document->name ."</a>"]);
|
||||||
|
else
|
||||||
|
$this->setAttachments([['file' => base64_encode($document->getFile()), 'path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, ]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Storage::url
|
// Storage::url
|
||||||
foreach ($this->invoice->documents as $document) {
|
foreach ($this->invoice->documents as $document) {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user