[Koha-bugs] [Bug 17140] Incorrect rounding in total fines calculations, part 2

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Aug 12 17:52:43 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17140

Caroline Cyr La Rose <caroline.cyr-la-rose at inlibro.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |caroline.cyr-la-rose at inlibr
                   |                            |o.com

--- Comment #39 from Caroline Cyr La Rose <caroline.cyr-la-rose at inlibro.com> ---
We had a client who had a problem that I think is related to this one, but I'm
not sure. The accidentally entered 0.251 in the circulation rules fines instead
of 0.25. When the patron wanted to pay, it was impossible. There's nothing in
the interface that suggests there was a third decimal because the display is
truncated (or rounded?) to two decimals. But when going into the database, we
noticed there were three decimals.

Here is how to reproduce on master :
(0. In Administration > System preferences, make sure your finesMode syspref is
set to Calculate and charge)

1. Go to Administration > Circulation and fines rules and add or modify an
existing rule to enter 0.251 in the fines.

2. Save your rule

(2.5 *Notice the fine displayed is only 0.25*, and if you try to edit your rule
again, it still displays only 0.25 even though in the database, is is saved as
0.251000; if you click edit, don't click save again because it will save it as
two decimals, which is fine IRL, but the test won't work)

3. Check out an item to a patron with a due date in the past (using Checkout
settings)

4. Run fines.pl

5. Go to the patron's accounting tab *Notice the fines are rounded/truncated to
2 decimals* (but if you look in the database, they have three decimals)

6. Try to pay the fines that have the three decimals (in master the payment is
not blocked whereas in 18.05 there is an error message)

7. Notice the fine is still in the accounts to pay but the amount oustanding is
0, if you go in the db, you will see that there is still some money owed.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list