From 2c2a7c8b74e6754ed9792b9c870c3979e9dc7fb8 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 22 Mar 2019 16:28:52 +0000 Subject: [PATCH] Bug 22563: Update lost handling to use accountline.status Signed-off-by: Martin Renvoize --- C4/Circulation.pm | 4 ++-- koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 92d7ffec9c..9102ea6b99 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2436,8 +2436,8 @@ sub _FixAccountForLostAndReturned { $credit->apply( { debits => $accountlines->reset } ); } - # Manually set the accounttype - $accountline->discard_changes->accounttype('LR'); + # Update the account status + $accountline->discard_changes->status('RETURNED'); $accountline->store; ModItem( { paidfor => '' }, undef, $itemnumber, { log_action => 0 } ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc index 05ed8d1491..e0df83fb90 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc @@ -8,7 +8,7 @@ [%- CASE 'OVERDUE' -%]Fine[%- PROCESS account_status_description account=account -%] [%- CASE 'A' -%]Account management fee [%- CASE 'M' -%]Sundry - [%- CASE 'LOST' -%]Lost item + [%- CASE 'LOST' -%]Lost item[%- PROCESS account_status_description account=account -%] [%- CASE 'W' -%]Writeoff[%- PROCESS account_status_description account=account -%] [%- CASE 'HE' -%]Hold waiting too long [%- CASE 'Rent' -%]Rental fee diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc index bc4c0313b0..104f31aee9 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc @@ -38,7 +38,7 @@ [% CASE 'OVERDUE' %]Fine[%- PROCESS account_status_description account=account -%] [% CASE 'A' %]Account management fee [% CASE 'M' %]Sundry - [% CASE 'LOST' %]Lost item + [% CASE 'LOST' %]Lost item[%- PROCESS account_status_description account=account -%] [% CASE 'W' %]Writeoff[%- PROCESS account_status_description account=account -%] [% CASE 'HE' %]Hold waiting too long [% CASE 'Rent' %]Rental fee -- 2.20.1