Add third party docs to invoices credit and quotes

This commit is contained in:
David Bomba 2021-01-09 15:18:20 +11:00
parent c317e93af3
commit 597d582a73
2 changed files with 22 additions and 0 deletions

View File

@ -91,6 +91,17 @@ class CreditEmailEngine extends BaseEmailEngine
$this->setAttachments(['path' => $this->credit->pdf_file_path(), 'name' => basename($this->credit->pdf_file_path())]); $this->setAttachments(['path' => $this->credit->pdf_file_path(), 'name' => basename($this->credit->pdf_file_path())]);
} }
//attach third party documents
if($this->client->getSetting('document_email_attachment') !== false){
// Storage::url
foreach($this->credit->documents as $document){
// $this->setAttachments(['path'=>$document->filePath(),'name'=>$document->name]);
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => $document->type]]);
}
}
return $this; return $this;
} }
} }

View File

@ -93,6 +93,17 @@ class QuoteEmailEngine extends BaseEmailEngine
} }
//attach third party documents
if($this->client->getSetting('document_email_attachment') !== false){
// Storage::url
foreach($this->quote->documents as $document){
// $this->setAttachments(['path'=>$document->filePath(),'name'=>$document->name]);
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => $document->type]]);
}
}
return $this; return $this;
} }
} }