From bbea22d46fda3d5ec4d6657d0d5e7060ddcde586 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 | 3 +-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 403a08df71..dd2b2ad3d2 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2425,8 +2425,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 76567b0555..8f9e32c3f4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc @@ -8,12 +8,11 @@ [%- 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 [%- CASE 'FOR' -%]Forgiven[%- PROCESS account_status_description account=account -%] - [%- CASE 'LR' -%]Lost item fee refund[%- PROCESS account_status_description account=account -%] [%- CASE 'PF' -%]Processing fee [%- CASE 'PAY' -%]Payment[%- PROCESS account_status_description account=account -%] [%- CASE 'WO' -%]Writeoff[%- PROCESS account_status_description account=account -%] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt index 2b402c163e..2168ad0cdc 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt @@ -116,12 +116,11 @@ [%- 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 [%- CASE 'FOR' -%]Forgiven[%- PROCESS account_status_description account=account -%] - [%- CASE 'LR' -%]Lost item fee refund[%- PROCESS account_status_description account=account -%] [%- CASE 'PF' -%]Processing fee [%- CASE 'PAY' -%]Payment[%- PROCESS account_status_description account=account -%] [%- CASE 'WO' -%]Writeoff[%- PROCESS account_status_description account=account -%] -- 2.20.1