[Koha-bugs] [Bug 26239] Number::Format issues with large negative numbers

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Aug 18 23:31:10 CEST 2020


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

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

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

--- Comment #4 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 108560
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108560&action=edit
Bug 26239: Do not format large negative numbers

At several places we got the following error if we use numbers too big
for Number::Format
Template process failed: undef error - round() overflow. Try smaller
precision or use Math::BigFloat at /home/koha/src/Koha/Number/Price.pm line 44

It make the app explodes.
The goal here is to handle these errors gracefully and easily.

We fixed it for positive numbers in bug 15770, but we neglected the case of
negative numbers

Test plan:
- Add a manual credit to a patron of 100000000000000
- ISE!
- Apply patch
- Restart all the things

Works perfectly.

Signed-off-by: Amit Gupta <amit.gupta at informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>

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


More information about the Koha-bugs mailing list