]> git.koha-community.org Git - koha.git/commit
Bug 26076: Sum the amount due in the database query instead of a loop in Perl
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 28 Jul 2020 16:49:35 +0000 (12:49 -0400)
committerAleisha Amohia <aleishaamohia@hotmail.com>
Wed, 9 Sep 2020 09:21:45 +0000 (21:21 +1200)
commit6ccd2a55e138fe07aa74742c0df8b44cd7e26619
treedd461da94621146a2b1ac91601754c99a3b19f89
parent2a48a23c4209fea92fcdaae66268a1af9004a736
Bug 26076: Sum the amount due in the database query instead of a loop in Perl

This appears to be a bug due to inaccuracies in floating point math. I've been unable to reproduce it on demand. Sometimes when using the "Write off selected" button, Koha will give the error that the payment is more than the amount owed, even though they are the same. The solution I've implemented is to move the summation from Perl code to the database query. This video demonstrates the issue and afterward, shows the error goes away after the patch is applied: https://monosnap.com/file/pG69HC7iI9mU9kkuoCtbkVzVTffKlE

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Verify that "Write off selected" functions as usual

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 64412969037ac9a9f81f05c69c3dd43bd3cab90b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2e3b3a23fc6c3c1183853a6b5022598930b55b0d)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
members/paycollect.pl