From: Bill Erickson Date: Thu, 30 Jan 2020 19:57:47 +0000 (-0500) Subject: LP1781274 Resolve bill payment rounding error X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fberick%2Flp1781274-webstaff-billpay-rounding;p=working%2FEvergreen.git LP1781274 Resolve bill payment rounding error When calculating the amount left to apply for selected transactions in the web staff bills interface, use the *100/100 trick to avoid rounding errors. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js index 25a01d892d..4ab52e9cbd 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js @@ -351,7 +351,7 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, // pending payment exceeds balance of current item. // pay the entire item. item.payment_pending = owed; - payment_amount -= owed; + payment_amount = (payment_amount * 100 - owed * 100) / 100; } else { // balance owed on the current item matches or exceeds