[Bug 35440] New: Partial refund triggers a 500 error
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35440 Bug ID: 35440 Summary: Partial refund triggers a 500 error Change sponsored?: --- Product: Koha Version: 23.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: esther.melander@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com To recreate 1. Create a charge on a patron account of $150.00 2. Pay the charge as cash 3. Issue a refund, but only refund $5.00 as cash 4. See that it causes a 500 error I should be able to issue a partial refund and have it show correctly in the transaction table. Error statement: Exception 'Koha::Exceptions::ParameterTooHigh' thrown 'Amount to payout (5.00) is higher than amountoutstanding (0)' May be connected to bug 30027 and previously fixed bug 8770. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35440 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- If a Transaction type is chosen, the error does not occur. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35440 --- Comment #2 from Esther Melander <esther.melander@bywatersolutions.com> --- Partial refund appears to fail depending on Transaction type. For example, received a 500 error when selecting Cash or Check. But refund succeeded with Account Credit. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35440 --- Comment #3 from Esther Melander <esther.melander@bywatersolutions.com> --- Some additional insight on why this is happening. The library had a circulation rule to refund lost item charge (only if unpaid). To recreate 1. Set default refund policy to Refund lost item charge (only if unpaid) 2. Create a charge on a patron account of $150.00 3. Pay the charge as cash 4. Issue a refund, but only refund $5.00 as cash 5. See that it causes a 500 error In this case Koha is trying to refund something that has already been paid, which can't happen based on the circulation rule. Instead of a 500 error, there should be "can't refund" warning. As an extension of this bug, I can do a full refund, which also should not happen based on the circulation rule. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35440 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Esther, I cannot recreate the error on master or 22.11 using your test plan and the default data in Koha Testing Docker. I was able to recreate by doing something a bit weirder through. 1. Create a charge on a patron account of $150.00 2. Pay the charge as cash 3. Issue a refund, but only refund $5.00 as cash 4. Void that refund 5. Issue refund on the "Credit has been voided" line Exception 'Koha::Exceptions::ParameterTooHigh' thrown 'Combined reduction (5 + -5) is higher than original amount (5)' at /usr/share/perl5/Exception/Class/Base.pm line 88 https://monosnap.com/file/HSdtsLVcOinrV54hX5GLr98K2akXdz -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35440 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35440 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We also see this in 22.11.10 There were no partial refunds, but full refunds using the button in the transactions table: Exception 'Koha::Exceptions::ParameterTooHigh' thrown 'Combined reduction (2 + -2) is higher than original amount (2)' Exception 'Koha::Exceptions::ParameterTooHigh' thrown 'Combined reduction (3 + -3) is higher than original amount (3)' Exception 'Koha::Exceptions::ParameterTooHigh' thrown 'Combined reduction (3.00 + -3) is higher than original amount (3)' Which makes no mathematical sense to me actually? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35440 --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #5)
We also see this in 22.11.10
There were no partial refunds, but full refunds using the button in the transactions table:
Exception 'Koha::Exceptions::ParameterTooHigh' thrown 'Combined reduction (2 + -2) is higher than original amount (2)' Exception 'Koha::Exceptions::ParameterTooHigh' thrown 'Combined reduction (3 + -3) is higher than original amount (3)' Exception 'Koha::Exceptions::ParameterTooHigh' thrown 'Combined reduction (3.00 + -3) is higher than original amount (3)'
Which makes no mathematical sense to me actually?
The code uses absolute values which I think may be part of the issue. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35440 tech.aimee@salinapublic.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tech.aimee@salinapublic.org -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org