Changed global Dinero rounding IO-469.
This commit is contained in:
@@ -22,9 +22,12 @@ export const CalculateBillTotal = (invoice) => {
|
||||
|
||||
billlines.forEach((i) => {
|
||||
if (!!i) {
|
||||
console.log("Amount:", (i.actual_cost || 0) * 100);
|
||||
const itemTotal = Dinero({
|
||||
amount: Math.round((i.actual_cost || 0) * 100) || 0,
|
||||
amount:
|
||||
Math.round(((i.actual_cost || 0) * 100 + Number.EPSILON) * 100) / 100,
|
||||
}).multiply(i.quantity || 1);
|
||||
|
||||
subtotal = subtotal.add(itemTotal);
|
||||
if (i.applicable_taxes.federal) {
|
||||
federalTax = federalTax.add(
|
||||
|
||||
Reference in New Issue
Block a user