https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28656 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #26 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Hi Marcel and all, This one had been sitting for a long time, so I have gone back over it and rewritten the patch on current main rather than rebasing the old ones. Thanks for the original review, it was spot on: the can_be_cancelled logic was backwards, so paid debits still would not have got a Cancel button, and the refund amount was wrong too. The new patch replaces the three old ones: - cancel() now accepts paid and partially paid debits. The cancellation is for what is still owed plus what the patron paid. The part still owed is applied to the debit and what was paid is left as credit on the account. - Only payments are given back. Discounts, writeoffs and refunds were never paid by the patron, so they are not, and payments that have been voided are not counted either. - The Cancel charge button is shown for every debit that is not already cancelled, a payout or a void, and the dialog says that anything paid is added as credit. - Void debits cannot be cancelled, as is already the case in reduce. I have dropped can_be_cancelled completely, and the CGI::param warning from boraccount.pl no longer applies on current main. The patch comes with tests covering partly and fully paid debits, discounts, refunds, voided payments and the debits that still cannot be cancelled, and I checked it by hand in the staff interface. I am obsoleting the old patches and setting this to Needs Signoff. -- You are receiving this mail because: You are watching all bug changes.