Fix for JS rounding problem

This commit is contained in:
Hillel Coren 2016-04-26 12:41:34 +03:00
parent cfb4dc4351
commit f28e0cd76b

View File

@ -460,7 +460,7 @@ function InvoiceModel(data) {
}); });
self.totals.rawPaidToDate = ko.computed(function() { self.totals.rawPaidToDate = ko.computed(function() {
return accounting.toFixed(self.amount(),2) - accounting.toFixed(self.balance(),2); return roundToTwo(accounting.toFixed(self.amount(),2) - accounting.toFixed(self.balance(),2));
}); });
self.totals.paidToDate = ko.computed(function() { self.totals.paidToDate = ko.computed(function() {