Summary: | Internal Server Error in Price.pm with big numbers | ||
---|---|---|---|
Product: | Koha | Reporter: | Marc Véron <veron> |
Component: | Architecture, internals, and plumbing | Assignee: | Bugs List <koha-bugs> |
Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | jonathan.druart |
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=17164 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11698 |
||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 12844 | ||
Bug Blocks: | |||
Attachments: |
Bug 18774: Add test to highlight problem with Internal Server Error in Price.pm
Bug 18774: Add test for Price.pm |
Description
Marc Véron
2017-06-10 06:05:32 UTC
Created attachment 64171 [details] [review] Bug 18774: Add test to highlight problem with Internal Server Error in Price.pm Add a test for a big number to t/Number/Price.t Test will fail with: round() overflow. Try smaller precision or use Math::BigFloat at (...)/Koha/Number/Price.pm line 44. Created attachment 64188 [details] [review] Bug 18774: Add test for Price.pm Add a test for a big number to t/Number/Price.t Test will fail with: round() overflow. Try smaller precision or use Math::BigFloat at (...)/Koha/Number/Price.pm line 44. Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Test failure occurs as described. This patch passes QA tools. Still in need of a patch for the problem itself but the patch works as described. How to fix? - The problem occurs at other places as well (see related bugs). A first step could be to restrict amount users can enter, similar to the situation in Administration > Patron Categories, but theoretically fines and/or credits (and budgets etc., see Bug 11698) can sum up to a value that breaks display again. Where amounts are added, the fix could be to have a JavaScript validation against the sum, but it would be a workaround only, see following comment: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11698#c2 |