From 69701f7903367e94ff89455888ed1a2bd47b0db2 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 19 May 2023 22:09:16 +0000 Subject: [PATCH] Bug 33789: Return issue info. when adding a credit To test: 1. Make sure MarkLostItemsAsReturned is set so a lost item will stay on a patrons account after being marked as lost. 2. Check an item out to a patron, make sure it has a replacementprice 3. Mark the item as lost. 4. Now check the item in. 5. Go to the patrons account -> transaction tab. You should see 2 accountlines related to the item. 6. For the account type 'Lost item' you will see issue infomation ( check out date, due date, checkouted out from, etc ) 7. For the account type 'Lost item fee refund' there is no issue information. 8. Apply patch 9. Try 2 - 6 again. This time the 'Lost item fee refund' should include issue information. --- Koha/Account.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Koha/Account.pm b/Koha/Account.pm index 6d0c42f989..13611dc0c3 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -210,6 +210,7 @@ sub add_credit { my $payment_type = $params->{payment_type}; my $credit_type = $params->{type} || 'PAYMENT'; my $item_id = $params->{item_id}; + my $issue_id = $params->{issue_id}; Koha::Exceptions::Account::RegisterRequired->throw() if ( C4::Context->preference("UseCashRegisters") @@ -239,6 +240,7 @@ sub add_credit { branchcode => $library_id, register_id => $cash_register, itemnumber => $item_id, + issue_id => $issue_id, } )->store(); -- 2.30.2