https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28421 Bug ID: 28421 Summary: When refunding lost fees we should not include voided payments Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org To recreate: 1 - Mark an item lost 2 - Add a manual lost fee for that barcode to a patron (or checkout before #1 and ensure a fine will be charged when marked lost) 3 - Pay the fee 4 - Void the fee 5 - Pay the fee 6 - Checkin the item 7 - The patron has a credit for twice the fee The problematic code appears to be in _FixAccountForLostAndReturned: my $credits_offsets = Koha::Account::Offsets->search({ debit_id => $accountline->id, credit_id => { '!=' => undef }, # it is not the debit itself type => { '!=' => 'Writeoff' }, amount => { '<' => 0 } # credits are negative on the DB }); We count both the payment and the voided payment -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.