1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 14:12:44 +01:00

layout updated

missing "balance due" added
This commit is contained in:
sigitas 2015-04-14 13:42:59 +03:00
parent c36e47a07c
commit 9cb9237981
3 changed files with 34 additions and 6 deletions

View File

@ -33351,12 +33351,12 @@ function notesAndTerms(invoice)
{ {
var text = []; var text = [];
if (invoice.public_notes) { if (invoice.public_notes) {
text.push(invoice.public_notes); text.push({text:invoice.public_notes, style:'notes'});
} }
if (invoice.terms) { if (invoice.terms) {
text.push({text:invoiceLabels.terms, style:'bold'}); text.push({text:invoiceLabels.terms, style:'termsLabel'});
text.push(invoice.terms); text.push({text:invoice.terms, style:'terms'});
} }
return text; return text;
@ -33459,6 +33459,9 @@ function subtotals(invoice)
if (invoice.account.hide_paid_to_date != '1' || paid) { if (invoice.account.hide_paid_to_date != '1' || paid) {
data.push([invoiceLabels.paid_to_date, formatMoney(paid, invoice.client.currency_id)]); data.push([invoiceLabels.paid_to_date, formatMoney(paid, invoice.client.currency_id)]);
} }
data.push([{text:invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due, style:'balanceDueLabel'},
{text:formatMoney(invoice.balance_amount, invoice.client.currency_id), style:'balanceDueValue'}]);
return data; return data;
} }
@ -33485,3 +33488,7 @@ function accountAddress(account) {
function primaryColor( defaultColor) { function primaryColor( defaultColor) {
return NINJA.primaryColor?NINJA.primaryColor:defaultColor; return NINJA.primaryColor?NINJA.primaryColor:defaultColor;
} }
function secondaryColor( defaultColor) {
return NINJA.primaryColor?NINJA.secondaryColor:defaultColor;
}

View File

@ -10,12 +10,12 @@ function notesAndTerms(invoice)
{ {
var text = []; var text = [];
if (invoice.public_notes) { if (invoice.public_notes) {
text.push(invoice.public_notes); text.push({text:invoice.public_notes, style:'notes'});
} }
if (invoice.terms) { if (invoice.terms) {
text.push({text:invoiceLabels.terms, style:'bold'}); text.push({text:invoiceLabels.terms, style:'termsLabel'});
text.push(invoice.terms); text.push({text:invoice.terms, style:'terms'});
} }
return text; return text;
@ -118,6 +118,9 @@ function subtotals(invoice)
if (invoice.account.hide_paid_to_date != '1' || paid) { if (invoice.account.hide_paid_to_date != '1' || paid) {
data.push([invoiceLabels.paid_to_date, formatMoney(paid, invoice.client.currency_id)]); data.push([invoiceLabels.paid_to_date, formatMoney(paid, invoice.client.currency_id)]);
} }
data.push([{text:invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due, style:'balanceDueLabel'},
{text:formatMoney(invoice.balance_amount, invoice.client.currency_id), style:'balanceDueValue'}]);
return data; return data;
} }

View File

@ -85,6 +85,7 @@ var dd = {
paddingBottom: function(i, node) { return 8; } paddingBottom: function(i, node) { return 8; }
}, },
}, },
'\n',
{ {
columns: [ columns: [
notesAndTerms(invoice), notesAndTerms(invoice),
@ -167,6 +168,23 @@ var dd = {
}, },
tableHeader: { tableHeader: {
bold: true bold: true
},
balanceDueLabel: {
fontSize: 11
},
balanceDueValue: {
fontSize: 11,
color:primaryColor('#299CC2')
},
notes: {
},
terms: {
},
termsLabel: {
bold: true,
fontSize: 10,
margin: [0, 10, 0, 4]
} }
}, },
pageMargins: [72, 40, 40, 80] pageMargins: [72, 40, 40, 80]