From 1307c064332e6d871602eb0b2c7c17b1d00e0f1f Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 30 Jan 2020 14:57:47 -0500 Subject: [PATCH] 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 --- Open-ILS/web/js/ui/default/staff/circ/patron/bills.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.11.0