Fixes to invoice history

This commit is contained in:
Hillel Coren 2015-01-25 23:28:49 +02:00
parent b60d36f066
commit eb6b4c1386
3 changed files with 6 additions and 3 deletions

View File

@ -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,

View File

@ -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) {

View File

@ -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