Summary: | Software error when enrolment fee or reserve fee are too high (Patron categories) | ||
---|---|---|---|
Product: | Koha | Reporter: | Aleisha Amohia <aleisha> |
Component: | System Administration | Assignee: | Lari Taskula <lari.taskula> |
Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | gmcharlt, jonathan.druart, lari.taskula |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15770 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11698 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18774 |
||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 17164: Lower maximum digits of enrolmentfee and reservefee in categories
Bug 17164: Lower maximum digits of enrolmentfee and reservefee in categories |
Description
Aleisha Amohia
2016-08-23 02:12:54 UTC
I noticed the same issue in my test database. For me the high fees are probably caused by test builder setting some random huge number. It works after lowering the fees. Created attachment 56915 [details] [review] Bug 17164: Lower maximum digits of enrolmentfee and reservefee in categories If the values are too high, Patron Categories page will crash with: Software error: Template process failed: undef error - round() overflow. Try smaller precision or use Math::BigFloat at /home/vagrant/kohaclone/Koha/Number/Price.pm line 44. This is likely caused by test builder setting random huge numbers when creating categories. I found out that 19 digits is the maximum that can be handled. Surely it is enough for both enrolmentfee and reservefee. This patch lowers the maximum number of significant digits in order to avoid this crash. To test: 1. Set category enrolmentfee with a high value, like 3862694923528880000000.0000 2. Go to cgi-bin/koha/admin/categories.pl 3. Observe Software error 4. Apply patch and run updatedatabase.pl 5. Reload the page 6. Observe that software error is gone Created attachment 57815 [details] [review] Bug 17164: Lower maximum digits of enrolmentfee and reservefee in categories If the values are too high, Patron Categories page will crash with: Software error: Template process failed: undef error - round() overflow. Try smaller precision or use Math::BigFloat at /home/vagrant/kohaclone/Koha/Number/Price.pm line 44. This is likely caused by test builder setting random huge numbers when creating categories. I found out that 19 digits is the maximum that can be handled. Surely it is enough for both enrolmentfee and reservefee. This patch lowers the maximum number of significant digits in order to avoid this crash. To test: 1. Set category enrolmentfee with a high value, like 3862694923528880000000.0000 2. Go to cgi-bin/koha/admin/categories.pl 3. Observe Software error 4. Apply patch and run updatedatabase.pl 5. Reload the page 6. Observe that software error is gone Signed-off-by: Mika Smith <mikasmith@catalyst.net.nz> |