mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Moved custom client and company fields to their respective sections on the PDF
This commit is contained in:
parent
7c24a34b6d
commit
edea8d0bc2
@ -225,8 +225,8 @@ class AddInvoiceDesignTable extends Migration {
|
||||
|
||||
doc.setFontSize('8');
|
||||
SetPdfColor('Black',doc);
|
||||
displayClient(doc, invoice, layout.marginLeft, z, layout);
|
||||
|
||||
var clientHeight = displayClient(doc, invoice, layout.marginLeft, z, layout);
|
||||
layout.tableTop += Math.max(0, clientHeight - 75);
|
||||
marginLeft2=395;
|
||||
|
||||
//publish left side information
|
||||
|
@ -4,6 +4,15 @@
|
||||
@parent
|
||||
@include('accounts.nav_advanced')
|
||||
|
||||
{{ Former::open('users/delete')->addClass('user-form') }}
|
||||
{{ Former::legend('user_management') }}
|
||||
|
||||
<div style="display:none">
|
||||
{{ Former::text('userPublicId') }}
|
||||
</div>
|
||||
{{ Former::close() }}
|
||||
|
||||
|
||||
@if (Utils::isPro())
|
||||
{{ Button::success_link(URL::to('users/create'), trans("texts.add_user"), array('class' => 'pull-right'))->append_with_icon('plus-sign') }}
|
||||
@endif
|
||||
@ -22,13 +31,6 @@
|
||||
->setOptions('aoColumnDefs', [['bSortable'=>false, 'aTargets'=>[3]]])
|
||||
->render('datatable') }}
|
||||
|
||||
|
||||
{{ Former::open('users/delete')->addClass('user-form') }}
|
||||
<div style="display:none">
|
||||
{{ Former::text('userPublicId') }}
|
||||
</div>
|
||||
{{ Former::close() }}
|
||||
|
||||
<script>
|
||||
window.onDatatableReady = function() {
|
||||
$('tbody tr').mouseover(function() {
|
||||
|
@ -32,7 +32,6 @@
|
||||
var needsRefresh = false;
|
||||
|
||||
function refreshPDF() {
|
||||
console.log('refreshPDF');
|
||||
if ({{ Auth::check() && Auth::user()->force_pdfjs ? 'false' : 'true' }} && (isFirefox || (isChrome && !isChromium))) {
|
||||
var string = getPDFString();
|
||||
if (!string) return;
|
||||
|
@ -46562,7 +46562,9 @@ function displayAccount(doc, invoice, x, y, layout) {
|
||||
data = [
|
||||
concatStrings(account.address1, account.address2),
|
||||
concatStrings(account.city, account.state, account.postal_code),
|
||||
account.country ? account.country.name : false
|
||||
account.country ? account.country.name : false,
|
||||
invoice.account.custom_value1 ? invoice.account['custom_label1'] + ' ' + invoice.account.custom_value1 : false,
|
||||
invoice.account.custom_value2 ? invoice.account['custom_label2'] + ' ' + invoice.account.custom_value2 : false,
|
||||
];
|
||||
|
||||
var nameWidth = account.name ? (doc.getStringUnitWidth(account.name) * doc.internal.getFontSize() * 1.1) : 0;
|
||||
@ -46585,7 +46587,9 @@ function displayClient(doc, invoice, x, y, layout) {
|
||||
concatStrings(client.address1, client.address2),
|
||||
concatStrings(client.city, client.state, client.postal_code),
|
||||
client.country ? client.country.name : false,
|
||||
client.contacts ? client.contacts[0].email : false
|
||||
client.contacts ? client.contacts[0].email : false,
|
||||
invoice.client.custom_value1 ? invoice.account['custom_client_label1'] + ' ' + invoice.client.custom_value1 : false,
|
||||
invoice.client.custom_value2 ? invoice.account['custom_client_label2'] + ' ' + invoice.client.custom_value2 : false,
|
||||
];
|
||||
return displayGrid(doc, invoice, data, x, y, layout, {hasheader:true});
|
||||
}
|
||||
@ -46610,10 +46614,6 @@ function getInvoiceDetails(invoice) {
|
||||
{'po_number': invoice.po_number},
|
||||
{'invoice_date': invoice.invoice_date},
|
||||
{'due_date': invoice.due_date},
|
||||
{'custom_label1': invoice.account.custom_value1},
|
||||
{'custom_label2': invoice.account.custom_value2},
|
||||
{'custom_client_label1': invoice.client.custom_value1},
|
||||
{'custom_client_label2': invoice.client.custom_value2},
|
||||
{'balance_due': formatMoney(invoice.balance_amount, invoice.client.currency_id)},
|
||||
];
|
||||
}
|
||||
|
@ -637,7 +637,9 @@ function displayAccount(doc, invoice, x, y, layout) {
|
||||
data = [
|
||||
concatStrings(account.address1, account.address2),
|
||||
concatStrings(account.city, account.state, account.postal_code),
|
||||
account.country ? account.country.name : false
|
||||
account.country ? account.country.name : false,
|
||||
invoice.account.custom_value1 ? invoice.account['custom_label1'] + ' ' + invoice.account.custom_value1 : false,
|
||||
invoice.account.custom_value2 ? invoice.account['custom_label2'] + ' ' + invoice.account.custom_value2 : false,
|
||||
];
|
||||
|
||||
var nameWidth = account.name ? (doc.getStringUnitWidth(account.name) * doc.internal.getFontSize() * 1.1) : 0;
|
||||
@ -660,7 +662,9 @@ function displayClient(doc, invoice, x, y, layout) {
|
||||
concatStrings(client.address1, client.address2),
|
||||
concatStrings(client.city, client.state, client.postal_code),
|
||||
client.country ? client.country.name : false,
|
||||
client.contacts ? client.contacts[0].email : false
|
||||
client.contacts ? client.contacts[0].email : false,
|
||||
invoice.client.custom_value1 ? invoice.account['custom_client_label1'] + ' ' + invoice.client.custom_value1 : false,
|
||||
invoice.client.custom_value2 ? invoice.account['custom_client_label2'] + ' ' + invoice.client.custom_value2 : false,
|
||||
];
|
||||
return displayGrid(doc, invoice, data, x, y, layout, {hasheader:true});
|
||||
}
|
||||
@ -685,10 +689,6 @@ function getInvoiceDetails(invoice) {
|
||||
{'po_number': invoice.po_number},
|
||||
{'invoice_date': invoice.invoice_date},
|
||||
{'due_date': invoice.due_date},
|
||||
{'custom_label1': invoice.account.custom_value1},
|
||||
{'custom_label2': invoice.account.custom_value2},
|
||||
{'custom_client_label1': invoice.client.custom_value1},
|
||||
{'custom_client_label2': invoice.client.custom_value2},
|
||||
{'balance_due': formatMoney(invoice.balance_amount, invoice.client.currency_id)},
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user