Bug 15770 - Number::Format issues with large numbers
Summary: Number::Format issues with large numbers
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact: Testopia
: 16832 18774 (view as bug list)
Depends on:
Reported: 2016-02-09 14:03 UTC by Julian Maurice
Modified: 2017-06-19 21:51 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2016-02-09 14:03:11 UTC
In my database I have some large numbers in some database columns (categories.enrolmentfee for instance), because of TestBuilder I think.
In that case, this cause admin/categories.pl to die with the following error message:

Template process failed: undef error - round() overflow. Try smaller precision or use Math::BigFloat at /home/koha/src/Koha/Number/Price.pm line 44

This shouldn't happen in real life, but as Koha allows to enter such big numbers, this should probably be fixed.

Steps to reproduce:
1. Go to Admin ยป Categories
2. Click on "New category" button
3. Fill in the required field and set enrolment fee to a big number like 123456789012345 (15 digits seem to be the minimum to reproduce the bug)
4. Save
5. Boom!
Comment 1 Jonathan Druart 2016-07-06 15:16:42 UTC
*** Bug 16832 has been marked as a duplicate of this bug. ***
Comment 2 Jonathan Druart 2017-06-19 21:51:39 UTC
*** Bug 18774 has been marked as a duplicate of this bug. ***