diff --git a/app/controllers/InvoiceController.php b/app/controllers/InvoiceController.php index 3eb487d4ce19..76227683bdfc 100755 --- a/app/controllers/InvoiceController.php +++ b/app/controllers/InvoiceController.php @@ -519,6 +519,7 @@ class InvoiceController extends \BaseController $backup->due_date = Utils::fromSqlDate($backup->due_date); $backup->is_pro = Auth::user()->isPro(); $backup->is_quote = intval($backup->is_quote); + $backup->account = $invoice->account->toArray(); $versionsJson[$activity->id] = $backup; @@ -528,8 +529,6 @@ class InvoiceController extends \BaseController } $versionsSelect[$lastId] = Utils::timestampToDateTimeString(strtotime($invoice->created_at)) . ' - ' . $invoice->user->getDisplayName(); - //dd($versionsSelect); - //dd($activities); $data = [ 'invoice' => $invoice, diff --git a/app/views/invoices/history.blade.php b/app/views/invoices/history.blade.php index 6f2c34568b4e..8c490072b24c 100644 --- a/app/views/invoices/history.blade.php +++ b/app/views/invoices/history.blade.php @@ -24,6 +24,8 @@ invoice = currentInvoice; } + invoice.image = window.accountLogo; + var invoiceDesignId = parseInt(invoice.invoice_design_id); var invoiceDesign = _.findWhere(invoiceDesigns, {id: invoiceDesignId}); if (!invoiceDesign) { diff --git a/app/views/invoices/pdf.blade.php b/app/views/invoices/pdf.blade.php index 2d39e29d30a4..22f4ab44f73b 100644 --- a/app/views/invoices/pdf.blade.php +++ b/app/views/invoices/pdf.blade.php @@ -65,7 +65,9 @@ if (window.invoice) { invoice.image = "{{ HTML::image_data($account->getLogoPath()) }}"; invoice.imageWidth = {{ $account->getLogoWidth() }}; - invoice.imageHeight = {{ $account->getLogoHeight() }}; + invoice.imageHeight = {{ $account->getLogoHeight() }}; + } else { + window.accountLogo = "{{ HTML::image_data($account->getLogoPath()) }}"; } @endif