Attach company documents if document attachments are enabled

This commit is contained in:
David Bomba 2021-05-12 14:21:44 +10:00
parent e0fc650aa7
commit 26fb1d09a5
3 changed files with 14 additions and 3 deletions

View File

@ -105,7 +105,10 @@ class CreditEmailEngine extends BaseEmailEngine
// 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]]);
}
foreach($this->credit->company->documents as $document){
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => $document->type]]);
}

View File

@ -116,10 +116,15 @@ class InvoiceEmailEngine extends BaseEmailEngine
// Storage::url
foreach($this->invoice->documents as $document){
// $this->setAttachments(['path'=>$document->filePath(),'name'=>$document->name]);
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => $document->type]]);
}
foreach($this->invoice->company->documents as $document){
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => $document->type]]);
}
}
return $this;

View File

@ -107,7 +107,10 @@ class QuoteEmailEngine extends BaseEmailEngine
// 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]]);
}
foreach($this->quote->company->documents as $document){
$this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => $document->type]]);
}