From cb7f3bbfdb77196bbbc153249a1c6fda9af95f3b 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. Signed-off-by: Laura Escamilla Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 14e4a3b5c7aabf816a6c21a0c318d6c4e3b1939a) Signed-off-by: Tomas Cohen Arazi --- 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.39.5