From c4bfd31121eeb3eb6921a00376262a5da1b8b5f1 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 14 Aug 2020 11:53:59 +0100 Subject: [PATCH] Bug 18501: (QA follow-up) Remove FIXME + Track issue_id We correct some compilation errors here by updating the transfered _FixAccountForLostAndFound method to use $self references. We add issue_id tracking so that future reports can clearly see how a refund relates to the original charge and finally we remove a FIXME as I agree that the 'discard_changes' call is not required. Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- Koha/Item.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Koha/Item.pm b/Koha/Item.pm index f2ca45d81b..ff6a4d5690 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -864,11 +864,12 @@ sub _set_found_trigger { $credit = $account->add_credit( { amount => $credit_total, - description => 'Item found ' . $item_id, + description => 'Item found ' . $self->itemnumber, type => 'LOST_FOUND', interface => C4::Context->interface, library_id => $branchcode, - item_id => $itemnumber + item_id => $self->itemnumber, + issue_id => $accountline->issue_id } ); @@ -877,8 +878,7 @@ sub _set_found_trigger { } # Update the account status - $accountline->discard_changes->status('FOUND') - ; # FIXME JD Why discard_changes? $accountline has not been modified since last fetch + $accountline->status('FOUND'); $accountline->store; if ( defined $account and C4::Context->preference('AccountAutoReconcile') ) { -- 2.20.1