To recreate: - Create a manual invoice: $10.00 - Pay using the pay button in the transactions table: $1.00 - Now issuing a refund explodes into: Exception 'Koha::Exceptions::ParameterTooHigh' thrown 'Amount to payout (3.00) is higher than amountoutstanding (0)' at /usr/share/perl5/Exception/Class/Base.pm line 88
To me the 'Issue refund' button feels like it is on the wrong accountline after recreating the steps here. -
I think the apply() routine ( Koha/Account/Line.pm ) is incorrectly modifying the amountoutstanding when issuing refunds
Created attachment 178872 [details] [review] Bug 39219: Do not apply amountoutstanding when credit type is REFUND
Leaving a patch here because it fixes the problem. -Still needs an updated test to cover -Also with partial payments -> refunds the payment gets set to 'REFUNDED' so you can not issue further refunds of the payment. Test by making $100 manual credit, playing $10, and issuing $1 in refunds. I'm not sure how this is supposed to work becuase this bug seems to go back as far as at least 23.11
(In reply to Lucas Gass (lukeg) from comment #1) > To me the 'Issue refund' button feels like it is on the wrong accountline > after recreating the steps here. > > - I didn't finish my thought here. It feels like the 'Issue refund' button is on the wrong accountline. -Add a manual invoice -Partial pay it -The issue refund is now on the original invoice accountline Shouldn't it be on the partial pay accountline?