1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 00:11:35 +02:00

VAT calculation with 3 decimal precision is not correct in PDF #1659

This commit is contained in:
Hillel Coren 2017-09-14 12:06:55 +03:00
parent bb6ac995a3
commit 2c11e0e3c2
3 changed files with 3 additions and 3 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

@ -726,7 +726,7 @@ function calculateAmounts(invoice) {
}
// calculate line item tax
var lineTotal = roundToTwo(NINJA.parseFloat(item.cost)) * roundToTwo(NINJA.parseFloat(item.qty));
var lineTotal = roundToFour(NINJA.parseFloat(item.cost)) * roundToFour(NINJA.parseFloat(item.qty));
if (invoice.discount != 0) {
if (parseInt(invoice.is_amount_discount)) {
lineTotal -= roundToTwo((lineTotal/total) * invoice.discount);