Fixed rounding bug on invoice total calculation BOD-120. Added documents viewing to edit invoice BOD-75 BOD-63.

This commit is contained in:
Patrick Fic
2020-05-07 09:25:48 -07:00
parent 9d4b36aeec
commit 723f8da825
13 changed files with 65 additions and 30 deletions

View File

@@ -33,7 +33,7 @@ export const CalculateInvoiceTotal = (invoice) => {
}
});
const invoiceTotal = Dinero({ amount: (parseFloat(total) || 0) * 100 });
const invoiceTotal = Dinero({ amount: Math.round((total || 0) * 100) });
const enteredTotal = subtotal.add(federalTax).add(stateTax).add(localTax);
const discrepancy = enteredTotal.subtract(invoiceTotal);