https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44310 --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 212735 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212735&action=edit Bug 44310: Don't charge lost fees when setting an item as not lost catalogue/updateitem.pl called LostItem for any change of the lost status from the item details page, including setting the item as not lost. For a checked out item, LostItem charges the replacement and processing fees. ->store had already run the found trigger, which had no lost fee to refund yet, so the fees charged after it are never refunded: neither then, nor at checkin, as the item is no longer lost. An item can be checked out and lost without having been charged, for instance when it was claimed returned without a fee and the claim was resolved without changing the lost status. This patch only calls LostItem when a lost status is set, as the item editor does. Changing from one lost status to another still charges the fees, as before. To test: 1 - Set ClaimReturnedLostValue to 'Missing' Set ClaimReturnedChargeFee to "Don't charge" Set WhenLostChargeReplacementFee to 'Charge' 2 - Set a replacement price on an item and check it out to a patron 3 - On the patron's checkouts table, claim the item returned 4 - On the patron's Claims tab, resolve the claim as 'Returned by patron' and keep the current lost status (Missing) 5 - Click the item barcode in the checkouts table to go to the item details (Items tab) 6 - Set the lost status to 'Choose' and click 'Set status' 7 - Check the patron's Accounting tab => The patron was charged a lost fee (and a processing fee if one is set in the circulation rules) 8 - Apply this patch, restart_all 9 - Repeat 2-7 with another item => No lost fee was charged 10 - Repeat 2-5, set the lost status to 'Lost' and click 'Set status' => The lost fee is still charged 11 - yarn cypress run --spec t/cypress/integration/Circulation/LostStatus_spec.ts => SUCCESS: Tests pass Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.