1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-19 16:01:34 +02:00
This commit is contained in:
Hillel Coren 2015-05-08 11:21:43 +03:00
commit 9198677277

View File

@ -22,7 +22,7 @@ class Mailer
}
if(isset($data['invoice_id'])) {
$invoice = Invoice::scope($data['invoice_id'])->with(['account'])->first();
$invoice = Invoice::scope()->with("account")->where('id', '=', $data['invoice_id'])->get()->first();
$pdfPath = storage_path().'/pdfcache/cache-'.$invoice->id.'.pdf';
if($invoice->account->pdf_email_attachment && file_exists($pdfPath)) {
$message->attach(