Fix for JS rounding
This commit is contained in:
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
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue