[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
Fri Oct 4 10:53:13 CEST 2019


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

Jesse Maseto <jesse at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #93553|0                           |1
        is obsolete|                            |

--- Comment #44 from Jesse Maseto <jesse at bywatersolutions.com> ---
Created attachment 93715
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93715&action=edit
Works. Thanks all.

-JesseM


Bug 17140: fix rounding errors when paying fines

Whenever a fine (accountlines in DB) has a precision longer than two floating
points, it becomes very hard for a user to clear it.
Ex: 1.035 will be displayed as 1.04 or 1.03 depending on the screen.  But
entering any of those value in Pay Fine will not clear it.
The user has no way to know the exact value to enter.

This fix makes sure that the intent of the user is met, by matching the EXACT
needed sum when the difference is less than 0.01.

TEST
1) Create a 1.035 fine
  - Go to a Patron screen
  - Fines tab on the left
  - Create manual invoice
2) go to Pay fines, click Pay amount on bottom left.
3) It will show 1.03 as Total, and as Collect from patron.  Click confirm.
4) An error message will appear.
5) Apply patch, do again.

Signed-off-by: Hayley Mapley <hayleymapley at catalyst.net.nz>

Signed-off-by: Josef Moravec <josef.moravec at gmail.com>

Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

Signed-off-by: Jesse Maseto <jesse at bywatersolutions.com>

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


More information about the Koha-bugs mailing list