Browse Source

Bug 22511: (QA follow-up) Refactor status description in templates

Test plan:

Before this patch, some accounttypes does not show status (for example
        voided payment)

After this patch, the status is always generated - defaults to empty
string

This behaviour should be same in intranet and opac

In OPAC templates there was even bug (used variable account instead of
        ACCOUNt_LINE), so the status was not shown at all

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
19.05.x
Josef Moravec 3 years ago
committed by Nick Clemens
parent
commit
43e6b00f09
  1. 43
      koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc
  2. 17
      koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc

43
koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc

@ -1,27 +1,28 @@
[%- BLOCK account_type_description -%]
[%- SWITCH account.accounttype -%]
[%- CASE 'Pay' -%]<span>Payment</span>
[%- CASE 'Pay00' -%]<span>Payment (cash via SIP2)</span>
[%- CASE 'Pay01' -%]<span>Payment (VISA via SIP2)</span>
[%- CASE 'Pay02' -%]<span>Payment (credit card via SIP2)</span>
[%- CASE 'N' -%]<span>New card</span>
[%- CASE 'OVERDUE' -%]<span>Fine[%- PROCESS account_status_description account=account -%]</span>
[%- CASE 'A' -%]<span>Account management fee</span>
[%- CASE 'M' -%]<span>Sundry</span>
[%- CASE 'L' -%]<span>Lost item</span>
[%- CASE 'W' -%]<span>Writeoff[%- PROCESS account_status_description account=account -%]</span>
[%- CASE 'HE' -%]<span>Hold waiting too long</span>
[%- CASE 'Rent' -%]<span>Rental fee</span>
[%- CASE 'FOR' -%]<span>Forgiven[%- PROCESS account_status_description account=account -%]</span>
[%- CASE 'LR' -%]<span>Lost item fee refund[%- PROCESS account_status_description account=account -%]</span>
[%- CASE 'PF' -%]<span>Lost item processing fee[%- PROCESS account_status_description account=account -%]</span>
[%- CASE 'PAY' -%]<span>Payment[%- PROCESS account_status_description account=account -%]</span>
[%- CASE 'WO' -%]<span>Writeoff[%- PROCESS account_status_description account=account -%]</span>
[%- CASE 'C' -%]<span>Credit[%- PROCESS account_status_description account=account -%]</span>
[%- CASE 'CR' -%]<span>Credit[%- PROCESS account_status_description account=account -%]</span>
[%- CASE 'Res' -%]<span>Hold fee</span>
[%- CASE -%][% account.accounttype | html %]
[%- CASE 'Pay' -%]<span>Payment
[%- CASE 'Pay00' -%]<span>Payment (cash via SIP2)
[%- CASE 'Pay01' -%]<span>Payment (VISA via SIP2)
[%- CASE 'Pay02' -%]<span>Payment (credit card via SIP2)
[%- CASE 'N' -%]<span>New card
[%- CASE 'OVERDUE' -%]<span>Fine
[%- CASE 'A' -%]<span>Account management fee
[%- CASE 'M' -%]<span>Sundry
[%- CASE 'L' -%]<span>Lost item
[%- CASE 'W' -%]<span>Writeoff
[%- CASE 'HE' -%]<span>Hold waiting too long
[%- CASE 'Rent' -%]<span>Rental fee
[%- CASE 'FOR' -%]<span>Forgiven
[%- CASE 'LR' -%]<span>Lost item fee refund
[%- CASE 'PF' -%]<span>Lost item processing fee
[%- CASE 'PAY' -%]<span>Payment
[%- CASE 'WO' -%]<span>Writeoff
[%- CASE 'C' -%]<span>Credit
[%- CASE 'CR' -%]<span>Credit
[%- CASE 'Res' -%]<span>Hold fee
[%- CASE -%]<span>[% account.accounttype | html %]
[%- END -%]
[%- PROCESS account_status_description account=account -%]</span>
[%- END -%]
[%- BLOCK offset_type_description -%]

17
koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc

@ -35,23 +35,24 @@
[% CASE 'Pay02' %]Payment (credit card via SIP2)
[% CASE 'VOID' %]Voided
[% CASE 'N' %]New card
[% CASE 'OVERDUE' %]Fine[%- PROCESS account_status_description account=account -%]
[% CASE 'OVERDUE' %]Fine
[% CASE 'A' %]Account management fee
[% CASE 'M' %]Sundry
[% CASE 'L' %]Lost item
[% CASE 'W' %]Writeoff[%- PROCESS account_status_description account=account -%]
[% CASE 'W' %]Writeoff
[% 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 'FOR' %]Forgiven
[% CASE 'LR' %]Lost item fee refund
[% CASE 'PF' %]Lost item processing fee
[% CASE 'PAY' %]Payment[%- PROCESS account_status_description account=account -%]
[% CASE 'WO' %]Writeoff[%- PROCESS account_status_description account=account -%]
[% CASE 'C' %]Credit[%- PROCESS account_status_description account=account -%]
[% CASE 'CR' %]Credit[%- PROCESS account_status_description account=account -%]
[% CASE 'PAY' %]Payment
[% CASE 'WO' %]Writeoff
[% CASE 'C' %]Credit
[% CASE 'CR' %]Credit
[%-CASE 'Res' %]Hold fee
[% CASE %][% ACCOUNT_LINE.accounttype | html %]
[%- END -%]
[%- PROCESS account_status_description account=ACCOUNT_LINE -%]
</td>
<td>
[%- IF ACCOUNT_LINE.payment_type %][% AuthorisedValues.GetByCode('PAYMENT_TYPE', ACCOUNT_LINE.payment_type, 1) | html %][% END %]

Loading…
Cancel
Save