Relative Content

Tag Archive for javascriptprecisionfinance

Calculating the total value of an invoice with precision

I have written some functions to calculate the total cost of an invoice, gives its line items. Could someone please tell me if there seems to be a problem with the code. Since it is something as serious as handling people’s money, I need to be extra careful. I used Big.js to make sure that I do not get any of the JS weird-ness when it comes to arithmetical operations, but I am still unsure if I am doing it right.