mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
Fix for JS rounding
This commit is contained in:
parent
54fd4d4c4e
commit
ae100a54dd
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) {
|
if (invoice.is_statement) {
|
||||||
var lineTotal = roundToTwo(NINJA.parseFloat(item.balance));
|
var lineTotal = roundToTwo(NINJA.parseFloat(item.balance));
|
||||||
} else {
|
} 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));
|
var discount = roundToTwo(NINJA.parseFloat(item.discount));
|
||||||
if (discount != 0) {
|
if (discount != 0) {
|
||||||
if (parseInt(invoice.is_amount_discount)) {
|
if (parseInt(invoice.is_amount_discount)) {
|
||||||
@ -645,7 +645,7 @@ function calculateAmounts(invoice) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// calculate line item tax
|
// 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));
|
var discount = roundToTwo(NINJA.parseFloat(item.discount));
|
||||||
if (discount != 0) {
|
if (discount != 0) {
|
||||||
hasDiscount = true;
|
hasDiscount = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user