From d39c4cd03e6cf56466fce022f058716b325e26c4 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 23 Feb 2018 08:44:45 -0500 Subject: [PATCH] Bug 20285: Lost item refund won't always pay down lost item fee first Due to a simple typo, the accountline passed to Koha::Account::pay from _FixAccountForLostAndReturned is not used. That means that the credit for the lost item fee may be applied to other fees before it is used on the lost fee itself. Test Plan: 1) Find a patron with existing fines 2) Ensure your settings will charge patrons for lost items 3) Check out an item to a patron with existing fees that need paid 4) Mark the item lost, charging the lost item fee 5) Return the item 6) Note the fee was refunded, but it paid down earlier fines first, and not the lost item fee first 7) Apply this patch set 8) Repeat steps 1 - 5 9) Note the lost item fee is the first fee to be paid off by the lost item fee refund Signed-off-by: Maryse Simard Followed the test plan and it works as expected. Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize (cherry picked from commit 2f2a5b2c58f49e2635a38040fa0130d5f2677488) Signed-off-by: Fridolin Somers --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 1010231d01..d7c3088b7c 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2418,7 +2418,7 @@ sub _FixAccountForLostAndReturned { description => "Item Returned " . $item_id, account_type => 'CR', offset_type => 'Lost Item Return', - accounlines => [$accountline], + lines => [$accountline], } ); -- 2.39.5