@@ -, +, @@ type descriptions - Apply this patch - Verify the templates work as expected - Sign off :-D --- .../prog/en/includes/account_offset_type.inc | 10 ------ .../intranet-tmpl/prog/en/includes/accounts.inc | 39 ++++++++++++++++++++++ .../intranet-tmpl/prog/en/includes/accounttype.inc | 24 ------------- .../prog/en/modules/members/accountline-details.tt | 8 +++-- .../prog/en/modules/members/boraccount.tt | 5 ++- .../prog/en/modules/members/moremember-print.tt | 5 ++- .../prog/en/modules/members/printfeercpt.tt | 5 ++- .../prog/en/modules/members/printinvoice.tt | 5 ++- 8 files changed, 60 insertions(+), 41 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/accounttype.inc --- a/koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc @@ -1,10 +0,0 @@ -[% SWITCH account_offset.type %] - [% CASE 'Credit Applied' %]Credit applied - [% CASE 'Payment' %]Payment - [% CASE 'Manual Credit' %]Manual credit - [% CASE 'Manual Debit' %]Manual invoice - [% CASE 'Lost Item' %]Lost item returned - [% CASE 'Writeoff' %]Writeoff - [% CASE 'Void Payment' %]Void payment - [% CASE %][% account_offset.type | html %] -[%- END -%] --- a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc @@ -0,0 +1,39 @@ +[%- 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 %] + [%- END -%] +[%- END -%] + +[%- BLOCK offset_type_description -%] + [%- SWITCH account_offset.type -%] + [%- CASE 'Credit Applied' -%]Credit applied + [%- CASE 'Payment' -%]Payment + [%- CASE 'Manual Credit' -%]Manual credit + [%- CASE 'Manual Debit' -%]Manual invoice + [%- CASE 'Lost Item' -%]Lost item returned + [%- CASE 'Writeoff' -%]Writeoff + [%- CASE 'Void Payment' -%]Void payment + [%- CASE -%][% account_offset.type | html %] + [%- END -%] +[%- END -%] --- a/koha-tmpl/intranet-tmpl/prog/en/includes/accounttype.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/accounttype.inc @@ -1,24 +0,0 @@ -[% 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 %] -[%- END -%] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt @@ -3,6 +3,8 @@ [%- USE AuthorisedValues -%] [%- USE Branches -%] +[% PROCESS 'accounts.inc' %] + [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Account for [% INCLUDE 'patron-title.inc' %] [% INCLUDE 'doc-head-close.inc' %] @@ -41,7 +43,7 @@ [% accountline.date |$KohaDates %] - [%- INCLUDE 'accounttype.inc' account => accountline -%] + [%- PROCESS account_type_description account=accountline -%] [%- IF accountline.payment_type -%] , [% AuthorisedValues.GetByCode('PAYMENT_TYPE', accountline.payment_type) | html %] [%- END =%] @@ -109,12 +111,12 @@ [% offset_accountline.timestamp | $KohaDates with_hours => 1 | html %] [% offset_accountline.amount | $Price %] [% offset_accountline.amountoutstanding | $Price %] - [% INCLUDE 'accounttype.inc' account => offset_accountline %] + [% PROCESS account_type_description account=offset_accountline %] [% offset_accountline.note | html %] [% IF offset_accountline.manager_id %][% offset_accountline.manager_id | html %][% END %] [% ao.created_on | $KohaDates with_hours => 1 | html %] [% ao.amount | $Price %] - [% INCLUDE 'account_offset_type.inc' account_offset => ao %] + [% PROCESS offset_type_description account_offset=ao %] Details [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -8,6 +8,9 @@ [% USE Price %] [% USE Branches %] [% SET footerjs = 1 %] + +[% PROCESS 'accounts.inc' %] + [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Account for [% INCLUDE 'patron-title.inc' no_html = 1 %] [% INCLUDE 'doc-head-close.inc' %] @@ -61,7 +64,7 @@ [% account.date |$KohaDates %] - [% INCLUDE 'accounttype.inc' accountline => account %] + [% PROCESS account_type_description account=account %] [%- IF account.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %][% END %] [%- IF account.description %], [% account.description | html %][% END %]  [% IF ( account.itemnumber ) %][% account.item.biblio.title | html %][% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt @@ -3,6 +3,9 @@ [% USE KohaDates %] [% USE Price %] [% SET footerjs = 1 %] + +[% PROCESS 'accounts.inc' %] + [% INCLUDE 'doc-head-open.inc' %] Summary for [% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %]) [% INCLUDE 'doc-head-close.inc' %] @@ -109,7 +112,7 @@ [% account.date | $KohaDates %] - [% INCLUDE 'accounttype.inc' accountline => account %] + [% PROCESS account_type_description account=account %] [%- IF account.payment_type %] , [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %] [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt @@ -5,6 +5,9 @@ [% USE Branches %] [% USE Price %] [% SET footerjs = 1 %] + +[% PROCESS 'accounts.inc' %] + [% INCLUDE 'doc-head-open.inc' %] Print receipt for [% patron.cardnumber | html %] [% INCLUDE 'doc-head-close.inc' %] @@ -51,7 +54,7 @@ [% account.date | $KohaDates %] - [% INCLUDE 'accounttype.inc' account => account %] + [% PROCESS account_type_description account=account %] [%- IF account.description %], [% account.description | html %][% END %] [% account.note | html %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt @@ -5,6 +5,9 @@ [% USE KohaDates %] [% USE Price %] [% SET footerjs = 1 %] + +[% PROCESS 'accounts.inc' %] + [% INCLUDE 'doc-head-open.inc' %] Print receipt for [% patron.cardnumber | html %] [% INCLUDE 'doc-head-close.inc' %] @@ -51,7 +54,7 @@ [% account.date | $KohaDates%] - [% INCLUDE 'accounttype.inc' account => account %] + [% PROCESS account_type_description account=account %] [%- IF account.description %], [% account.description | html %][% END %] [% account.note | html %] --