From d3c4b44a846ddcc9bca0a00685e99f621bf7ef7e Mon Sep 17 00:00:00 2001 From: Andrew Fuerste Henry Date: Wed, 11 Mar 2026 15:33:25 +0000 Subject: [PATCH] Bug 40779: Do not generate credit for cancelled fee To test 1 - have syspref WhenLostChargeReplacementFee enabled 2 - have lost item fee refund on return policy set to "Refund lost item charge" 3 - have 2 items with replacement costs 4 - check your 2 items out to a patron 5 - mark both items lost 6 - confirm patron now has 2 lost item fees on account 7 - write off one of the fees 8 - cancel the other fee 9 - return the item with the written off fee 10 - confirm no credit is generated on the patron account 11 - return the item with the cancelled fee 12 - confirm a credit is generated on the patron account 13 - apply patch, restart services 14 - repeat steps 4 - 10 with a different patron, confirm no change 15 - return the item with the cancelled fee 16 - confirm no credit is generated on the patron account --- Koha/Item.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Item.pm b/Koha/Item.pm index ed175d3ced5..ead26c27950 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -1808,7 +1808,7 @@ sub _set_found_trigger { my $credit_offsets = $lost_charge->debit_offsets( { 'credit_id' => { '!=' => undef }, - 'credit.credit_type_code' => { '!=' => 'Writeoff' } + 'credit.credit_type_code' => { '!=' => ( 'Writeoff', 'Cancellation' ) } }, { join => 'credit' } ); -- 2.39.5