Fix for line item taxes display issue

This commit is contained in:
Hillel Coren 2017-06-15 10:16:35 +03:00
parent 6ec0288462
commit 8ba71ce6ce
3 changed files with 7 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -503,14 +503,15 @@ NINJA.invoiceLines = function(invoice) {
var lineTotal = roundToTwo(NINJA.parseFloat(item.cost)) * roundToTwo(NINJA.parseFloat(item.qty)); var lineTotal = roundToTwo(NINJA.parseFloat(item.cost)) * roundToTwo(NINJA.parseFloat(item.qty));
if (account.include_item_taxes_inline == '1') { if (account.include_item_taxes_inline == '1') {
var taxAmount1 = 0;
var taxAmount2 = 0;
if (tax1) { if (tax1) {
lineTotal += lineTotal * tax1 / 100; taxAmount1 = roundToTwo(lineTotal * tax1 / 100);
lineTotal = roundToTwo(lineTotal);
} }
if (tax2) { if (tax2) {
lineTotal += lineTotal * tax2 / 100; taxAmount2 = roundToTwo(lineTotal * tax2 / 100);
lineTotal = roundToTwo(lineTotal);
} }
lineTotal += taxAmount1 + taxAmount2;
} }
lineTotal = formatMoneyInvoice(lineTotal, invoice); lineTotal = formatMoneyInvoice(lineTotal, invoice);