]> git.evergreen-ils.org Git - Evergreen.git/commit
LP1781274 Fix floating point issue preventing transactions from closing
authorMichele Morgan <mmorgan@noblenet.org>
Fri, 20 Dec 2019 21:00:08 +0000 (16:00 -0500)
committerJason Stephenson <jason@sigio.com>
Tue, 21 Apr 2020 16:50:43 +0000 (12:50 -0400)
commit46c8c43ca3fe30db4fd3d373766c7daba959101f
tree2e2eab7aca47181f37525af2beb54fc97a94d870
parent7dd8078623e363254afb601f34f4a6755099a769
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@noblenet.org>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/web/js/ui/default/staff/circ/patron/bills.js