1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-19 16:01:34 +02:00

Fix for JS rounding

This commit is contained in:
Hillel Coren 2018-02-19 09:14:20 +02:00
parent 54fd4d4c4e
commit ae100a54dd
3 changed files with 4 additions and 4 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

@ -589,7 +589,7 @@ function calculateAmounts(invoice) {
if (invoice.is_statement) {
var lineTotal = roundToTwo(NINJA.parseFloat(item.balance));
} else {
var lineTotal = roundSignificant(NINJA.parseFloat(item.cost)) * roundSignificant(NINJA.parseFloat(item.qty));
var lineTotal = roundSignificant(NINJA.parseFloat(item.cost) * NINJA.parseFloat(item.qty));
var discount = roundToTwo(NINJA.parseFloat(item.discount));
if (discount != 0) {
if (parseInt(invoice.is_amount_discount)) {
@ -645,7 +645,7 @@ function calculateAmounts(invoice) {
}
// calculate line item tax
var lineTotal = roundSignificant(NINJA.parseFloat(item.cost)) * roundSignificant(NINJA.parseFloat(item.qty));
var lineTotal = roundSignificant(NINJA.parseFloat(item.cost) * NINJA.parseFloat(item.qty));
var discount = roundToTwo(NINJA.parseFloat(item.discount));
if (discount != 0) {
hasDiscount = true;