fix #174 - Tax rate error in live PDF

This commit is contained in:
Hillel Coren 2014-10-19 23:10:16 +03:00
parent 76e9f107e7
commit 001208e345
2 changed files with 5 additions and 4 deletions

View File

@ -46755,8 +46755,9 @@ function displayGrid(doc, invoice, data, x, y, layout, options) {
if (key.substring(0, 6) === 'custom') {
key = invoice.account[key];
} else if (key === 'tax') {
key = invoiceLabels[key] + ' ' + invoice.tax_amount + '%';
} else if (key === 'tax' && invoice.tax_rate) {
console.log(invoice);
key = invoiceLabels[key] + ' ' + (invoice.tax_rate*1).toString() + '%';
} else {
key = invoiceLabels[key];
}

View File

@ -830,8 +830,8 @@ function displayGrid(doc, invoice, data, x, y, layout, options) {
if (key.substring(0, 6) === 'custom') {
key = invoice.account[key];
} else if (key === 'tax') {
key = invoiceLabels[key] + ' ' + invoice.tax_amount + '%';
} else if (key === 'tax' && invoice.tax_rate) {
key = invoiceLabels[key] + ' ' + (invoice.tax_rate*1).toString() + '%';
} else {
key = invoiceLabels[key];
}