Rounding error #1453

This commit is contained in:
Hillel Coren 2017-04-29 22:09:10 +03:00
parent d1e77f877b
commit abf14174b7

View File

@ -473,8 +473,9 @@ function InvoiceModel(data) {
total = NINJA.parseFloat(total) + customValue2; total = NINJA.parseFloat(total) + customValue2;
} }
var taxAmount1 = roundToTwo(total * (parseFloat(self.tax_rate1())/100)); var taxAmount1 = roundToTwo(total * parseFloat(self.tax_rate1()) / 100);
var taxAmount2 = roundToTwo(total * (parseFloat(self.tax_rate2())/100)); var taxAmount2 = roundToTwo(total * parseFloat(self.tax_rate2()) / 100);
total = NINJA.parseFloat(total) + taxAmount1 + taxAmount2; total = NINJA.parseFloat(total) + taxAmount1 + taxAmount2;
total = roundToTwo(total); total = roundToTwo(total);