[open-ils-commits] [GIT] Evergreen ILS branch rel_3_3 updated. 46c8c43ca3fe30db4fd3d373766c7daba959101f
Evergreen Git
git at git.evergreen-ils.org
Tue Apr 21 12:51:14 EDT 2020
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_3_3 has been updated
via 46c8c43ca3fe30db4fd3d373766c7daba959101f (commit)
from 7dd8078623e363254afb601f34f4a6755099a769 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 46c8c43ca3fe30db4fd3d373766c7daba959101f
Author: Michele Morgan <mmorgan at noblenet.org>
Date: Fri Dec 20 16:00:08 2019 -0500
LP1781274 Fix floating point issue preventing transactions from closing
Paying multiple bills with a single payment can lead to some
transactions not closing because of floating point math inaccuracies.
This branch resolves the issue by limiting pending payment amounts to
2 decimal places.
The bug can be reproduced using grocery bills as follows.
Retrieve a patron that owes no money.
Add a billing of $.90
Add a billing of $.10
Select both billings
Enter $1 in payment received and Apply the payment
Click on History in the billings screen. Turn on the Total Billed and
Transaction Finish Time column and note that the $.10 bill has zero
balance owed, but does not have a transaction finish time.
To test:
Use the steps above to reproduce, noting the lack of Transaction
Finish Time. Apply the patch.
Use the same steps above and note that the post patch payments
resulted in both transactions getting a Transaction Finish Time.
Signed-off-by: Michele Morgan <mmorgan at noblenet.org>
Signed-off-by: Terran McCanna <tmccanna at georgialibraries.org>
Signed-off-by: Jason Stephenson <jason at sigio.com>
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 cb10593068..8ec0539e19 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
@@ -357,7 +357,8 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location,
// balance owed on the current item matches or exceeds
// the pending payment. Apply the full remainder of
// the payment to this item.. and we're done.
- item.payment_pending = payment_amount;
+ // Limit to two decimal places to avoid floating point issues
+ item.payment_pending = payment_amount.toFixed(2);
break;
}
}
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/web/js/ui/default/staff/circ/patron/bills.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list