mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Clean up around payment emails
This commit is contained in:
parent
90a58ce2c9
commit
0e05782425
@ -89,17 +89,18 @@ class PaymentEmailEngine extends BaseEmailEngine
|
|||||||
->setViewText('');
|
->setViewText('');
|
||||||
|
|
||||||
if ($this->client->getSetting('pdf_email_attachment') !== false && $this->company->account->hasFeature(Account::FEATURE_PDF_ATTACHMENT)) {
|
if ($this->client->getSetting('pdf_email_attachment') !== false && $this->company->account->hasFeature(Account::FEATURE_PDF_ATTACHMENT)) {
|
||||||
|
|
||||||
$this->payment->invoices->each(function ($invoice) {
|
$this->payment->invoices->each(function ($invoice) {
|
||||||
// if (Ninja::isHosted()) {
|
|
||||||
// $this->setAttachments([$invoice->pdf_file_path($invoice->invitations->first(), 'url', true)]);
|
|
||||||
// } else {
|
|
||||||
// $this->setAttachments([$invoice->pdf_file_path($invoice->invitations->first())]);
|
|
||||||
// }
|
|
||||||
$pdf = ((new CreateRawPdf($invoice->invitations->first(), $invoice->company->db))->handle());
|
|
||||||
|
|
||||||
$this->setAttachments([['file' => base64_encode($pdf), 'name' => $invoice->numberFormatter().'.pdf']]);
|
$pdf = ((new CreateRawPdf($invoice->invitations->first(), $invoice->company->db))->handle());
|
||||||
|
|
||||||
|
$this->setAttachments([['file' => base64_encode($pdf), 'name' => $invoice->numberFormatter().'.pdf']]);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// foreach ($this->payment->documents as $document) {
|
||||||
|
// $this->setAttachments([['path' => $document->filePath(), 'name' => $document->name, 'mime' => NULL, ]]);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user