From 28c3b859b402f4e133fec90b2043e3e73e2f94c6 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 22 Mar 2019 15:25:16 +0000 Subject: [PATCH] Bug 22563: Be more descriptive with accountypes Convert 'L' to 'LOST' to become more descriptive in it's use. Signed-off-by: Martin Renvoize --- C4/Accounts.pm | 2 +- C4/Circulation.pm | 2 +- Koha/Account.pm | 4 +- .../prog/en/includes/accounts.inc | 2 +- .../prog/en/modules/members/maninvoice.tt | 2 +- .../bootstrap/en/modules/opac-account.tt | 2 +- opac/opac-user.pl | 2 +- t/db_dependent/Accounts.t | 40 +++++++++---------- t/db_dependent/Circulation.t | 10 ++--- 9 files changed, 33 insertions(+), 33 deletions(-) diff --git a/C4/Accounts.pm b/C4/Accounts.pm index 3fdf2d71b3..b01e4a189a 100644 --- a/C4/Accounts.pm +++ b/C4/Accounts.pm @@ -91,7 +91,7 @@ sub chargelostitem{ my $existing_charges = $account->lines->search( { itemnumber => $itemnumber, - accounttype => 'L', + accounttype => 'LOST', } )->count(); diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 09d81df58a..403a08df71 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2380,7 +2380,7 @@ sub _FixAccountForLostAndReturned { my $accountlines = Koha::Account::Lines->search( { itemnumber => $itemnumber, - accounttype => { -in => [ 'L', 'W' ] }, + accounttype => { -in => [ 'LOST', 'W' ] }, }, { order_by => { -desc => [ 'date', 'accountlines_id' ] } diff --git a/Koha/Account.pm b/Koha/Account.pm index cec224f60c..7b7a904146 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -106,7 +106,7 @@ sub pay { $fine->amountoutstanding($new_amountoutstanding)->store(); $balance_remaining = $balance_remaining - $amount_to_pay; - if ( $fine->itemnumber && $fine->accounttype && ( $fine->accounttype eq 'L' ) ) + if ( $fine->itemnumber && $fine->accounttype && ( $fine->accounttype eq 'LOST' ) ) { C4::Circulation::ReturnLostItem( $self->{patron_id}, $fine->itemnumber ); } @@ -697,7 +697,7 @@ our $account_type_credit = { our $account_type_debit = { 'account' => 'A', 'overdue' => 'OVERDUE', - 'lost_item' => 'L', + 'lost_item' => 'LOST', 'new_card' => 'N', 'sundry' => 'M', 'processing' => 'PF', diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc index d9ea72c433..76567b0555 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 'L' -%]Lost item + [%- CASE 'LOST' -%]Lost item [%- CASE 'W' -%]Writeoff[%- PROCESS account_status_description account=account -%] [%- CASE 'HE' -%]Hold waiting too long [%- CASE 'Rent' -%]Rental fee diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt index 213641047a..7ce2a42997 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt @@ -79,7 +79,7 @@ [% INCLUDE 'str/members-menu.inc' %] [% Asset.js("js/members-menu.js") | $raw %]