From 419e3624e3761dac23d53f9b4ae66b8449f10712 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 20 Mar 2019 16:09:55 +0000 Subject: [PATCH] Bug 22521: Update UI to use accountlines.status Signed-off-by: Martin Renvoize --- .../prog/en/includes/accounts.inc | 52 +++++++++++-------- .../en/modules/members/moremember-print.tt | 2 +- .../prog/en/modules/members/pay.tt | 27 ++-------- .../bootstrap/en/modules/opac-account.tt | 52 +++++++++++-------- 4 files changed, 65 insertions(+), 68 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc index cf388239fb..fd306c77b4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc @@ -1,27 +1,26 @@ [%- BLOCK account_type_description -%] [%- SWITCH account.accounttype -%] - [%- CASE 'Pay' -%]Payment, thanks - [%- CASE 'Pay00' -%]Payment, thanks (cash via SIP2) - [%- CASE 'Pay01' -%]Payment, thanks (VISA via SIP2) - [%- CASE 'Pay02' -%]Payment, thanks (credit card via SIP2) - [%- CASE 'VOID' -%]Voided - [%- CASE 'N' -%]New card - [%- CASE 'F' -%]Fine - [%- CASE 'A' -%]Account management fee - [%- CASE 'M' -%]Sundry - [%- CASE 'L' -%]Lost item - [%- CASE 'W' -%]Writeoff - [%- CASE 'FU' -%]Accruing fine - [%- CASE 'HE' -%]Hold waiting too long - [%- CASE 'Rent' -%]Rental fee - [%- CASE 'FOR' -%]Forgiven - [%- CASE 'LR' -%]Lost item fee refund - [%- CASE 'PF' -%]Processing fee - [%- CASE 'PAY' -%]Payment - [%- CASE 'WO' -%]Writeoff - [%- CASE 'C' -%]Credit - [%- CASE 'CR' -%]Credit - [%- CASE -%][% account.accounttype | html %] + [%- CASE 'Pay' -%]Payment, thanks + [%- CASE 'Pay00' -%]Payment, thanks (cash via SIP2) + [%- CASE 'Pay01' -%]Payment, thanks (VISA via SIP2) + [%- CASE 'Pay02' -%]Payment, thanks (credit card via SIP2) + [%- CASE 'VOID' -%]Voided + [%- CASE 'N' -%]New card + [%- CASE 'OVERDUE' -%]Fine[%- PROCESS account_status_description account=account -%] + [%- CASE 'A' -%]Account management fee + [%- CASE 'M' -%]Sundry + [%- CASE 'L' -%]Lost item + [%- CASE 'W' -%]Writeoff + [%- CASE 'HE' -%]Hold waiting too long + [%- CASE 'Rent' -%]Rental fee + [%- CASE 'FOR' -%]Forgiven + [%- CASE 'LR' -%]Lost item fee refund + [%- CASE 'PF' -%]Processing fee + [%- CASE 'PAY' -%]Payment + [%- CASE 'WO' -%]Writeoff + [%- CASE 'C' -%]Credit + [%- CASE 'CR' -%]Credit + [%- CASE -%][% account.accounttype | html %] [%- END -%] [%- END -%] @@ -37,3 +36,12 @@ [%- CASE -%][% account_offset.type | html %] [%- END -%] [%- END -%] + +[%- BLOCK account_status_description -%] + [%- SWITCH account.status -%] + [%- CASE 'UNRETURNED' -%] (Accruing) + [%- CASE 'RETURNED' -%] (Returned) + [%- CASE 'FORGIVEN' -%] (Forgiven) + [%- CASE -%] + [%- END -%] +[%- END -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt index 10ee5574e0..2bb327c13f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt @@ -120,7 +120,7 @@ , [% account.description | html %] [% END %]   - [% IF ( account.itemnumber AND account.accounttype != 'F' AND account.accounttype != 'FU' ) %] + [% IF ( account.itemnumber AND account.accounttype != 'OVERDUE' ) %] [% account.item.biblio.title | html %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt index 7afd743acc..e5cfad05cb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt @@ -7,6 +7,9 @@ [% USE ColumnsSettings %] [% USE KohaDates %] [% SET footerjs = 1 %] + +[% PROCESS 'accounts.inc' %] + [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Make a payment for [% patron.firstname | html %] [% patron.surname | html %] [% INCLUDE 'doc-head-close.inc' %] @@ -80,29 +83,7 @@ - [% SWITCH line.accounttype %] - [% CASE 'Pay' %]Payment, thanks - [% CASE 'Pay00' %]Payment, thanks (cash via SIP2) - [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2) - [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2) - [% CASE 'N' %]New card - [% CASE 'F' %]Fine - [% CASE 'A' %]Account management fee - [% CASE 'M' %]Sundry - [% CASE 'L' %]Lost item - [% CASE 'W' %]Writeoff - [% CASE 'FU' %]Accruing fine - [% CASE 'HE' %]Hold waiting too long - [% CASE 'Rent' %]Rental fee - [% CASE 'FOR' %]Forgiven - [% CASE 'LR' %]Lost item fee refund - [% CASE 'PF' %]Processing fee - [% CASE 'PAY' %]Payment - [% CASE 'WO' %]Writeoff - [% CASE 'C' %]Credit - [% CASE 'CR' %]Credit - [% CASE %][% line.accounttype | html %] - [%- END -%] + [% PROCESS account_type_description account=line %] [%- IF line.description %], [% line.description | html %][% END %] [% IF line.itemnumber %]([% line.item.biblio.title | html %])[% END %] 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 23229a0485..e01e6d0114 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt @@ -107,28 +107,28 @@ [% END %] [% ACCOUNT_LINE.date | $KohaDates %] - [% SWITCH ACCOUNT_LINE.accounttype %] - [% CASE 'Pay' %]Payment, thanks - [% CASE 'Pay00' %]Payment, thanks (cash via SIP2) - [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2) - [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2) - [% CASE 'N' %]New card - [% CASE 'F' %]Fine - [% CASE 'A' %]Account management fee - [% CASE 'M' %]Sundry - [% CASE 'L' %]Lost item - [% CASE 'W' %]Writeoff - [% CASE 'FU' %]Accruing fine - [% CASE 'HE' %]Hold waiting too long - [% CASE 'Rent' %]Rental fee - [% CASE 'FOR' %]Forgiven - [% CASE 'LR' %]Lost item fee refund - [% CASE 'PF' %]Processing fee - [% CASE 'PAY' %]Payment - [% CASE 'WO' %]Writeoff - [% CASE 'C' %]Credit - [% CASE 'CR' %]Credit - [% CASE %][% ACCOUNT_LINE.accounttype | html %] + [%- SWITCH ACCOUNT_LINE.accounttype -%] + [%- CASE 'Pay' -%]Payment, thanks + [%- CASE 'Pay00' -%]Payment, thanks (cash via SIP2) + [%- CASE 'Pay01' -%]Payment, thanks (VISA via SIP2) + [%- CASE 'Pay02' -%]Payment, thanks (credit card via SIP2) + [%- CASE 'VIOD' -%]Voided + [%- CASE 'N' -%]New card + [%- CASE 'OVERDUE' -%]Fine[%- PROCESS account_status_description account=account -%] + [%- CASE 'A' -%]Account management fee + [%- CASE 'M' -%]Sundry + [%- CASE 'L' -%]Lost item + [%- CASE 'W' -%]Writeoff + [%- CASE 'HE' -%]Hold waiting too long + [%- CASE 'Rent' -%]Rental fee + [%- CASE 'FOR' -%]Forgiven + [%- CASE 'LR' -%]Lost item fee refund + [%- CASE 'PF' -%]Processing fee + [%- CASE 'PAY' -%]Payment + [%- CASE 'WO' -%]Writeoff + [%- CASE 'C' -%]Credit + [%- CASE 'CR' -%]Credit + [%- CASE -%][% ACCOUNT_LINE.accounttype | html %] [%- END -%] [%- IF ACCOUNT_LINE.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', ACCOUNT_LINE.payment_type, 1) | html %][% END %] [%- IF ACCOUNT_LINE.description %], [% ACCOUNT_LINE.description | html %][% END %] @@ -187,6 +187,14 @@ [% INCLUDE 'opac-bottom.inc' %] [% BLOCK jsinclude %] [% INCLUDE 'datatables.inc' %] +[%- BLOCK account_status_description -%] + [%- SWITCH account.status -%] + [%- CASE 'UNRETURNED' -%] (Accruing) + [%- CASE 'RETURNED' -%] (Returned) + [%- CASE 'FORGIVEN' -%] (Forgiven) + [%- CASE -%] + [%- END -%] +[%- END -%]