Bug 21167: (QA follow-up) Use accounttype.inc for generating account description
authorJosef Moravec <josef.moravec@gmail.com>
Wed, 19 Sep 2018 08:07:57 +0000 (08:07 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 28 Sep 2018 19:41:37 +0000 (19:41 +0000)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt

index f57ef72..74fbc25 100644 (file)
 <tr class="highlight">
       <td>[% account.date | $KohaDates %]</td>
       <td>
-        [% 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 '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 -%]
+        [% INCLUDE 'accounttype.inc' account => account %]
         [%- IF account.description %], [% account.description | html %][% END %]
       </td>
       <td>[% account.note | html %]</td>
index 50cd64f..33ae62c 100644 (file)
 <tr class="highlight">
       <td>[% account.date | $KohaDates%]</td>
        <td>
-        [% 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 '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 -%]
+        [% INCLUDE 'accounttype.inc' account => account %]
         [%- IF account.description %], [% account.description | html %][% END %]
       </td>
       <td>[% account.note | html %]</td>