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 <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2020-08-14 11:53:59 +01:00 committed by Jonathan Druart
parent 0a651f9ee7
commit bb0cd3d229
1 changed files with 4 additions and 4 deletions

View File

@ -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') ) {