Follow-up to bug 15770 for negative numbers
Created attachment 108528 [details] [review] 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 -
Created attachment 108530 [details] [review] Bug 26239: Do not format large negative numbers Test plan: - Add a manual credit to a patron of 100000000000000 - ISE! - Apply patch - Restart all the things ------------------------------- Checked and worked OK.
Created attachment 108531 [details] Error screenshot
Created attachment 108560 [details] [review] 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@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 20.11, thanks to everybody involved!