mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Changed PDF attachment to use private id
This commit is contained in:
parent
7662729570
commit
13994f98a8
@ -25,7 +25,7 @@ class Mailer
|
|||||||
$invoice = Invoice::find($data['id']);
|
$invoice = Invoice::find($data['id']);
|
||||||
$invoice->load('account');
|
$invoice->load('account');
|
||||||
$accountAttributes = $invoice->account()->getParent()->getRelations()['account']->getAttributes();
|
$accountAttributes = $invoice->account()->getParent()->getRelations()['account']->getAttributes();
|
||||||
$pdfPath = storage_path().'/pdfcache/cache-'.$invoice->getAttributes()['public_id'].'.pdf';
|
$pdfPath = storage_path().'/pdfcache/cache-'.$invoice->id.'.pdf';
|
||||||
|
|
||||||
if($accountAttributes['pdf_email_attachment'] === 1 && file_exists($pdfPath)) {
|
if($accountAttributes['pdf_email_attachment'] === 1 && file_exists($pdfPath)) {
|
||||||
$message->attach(
|
$message->attach(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user