From 002627f981983447cd10683134ca6910690c5526 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 16 Oct 2020 15:57:30 +0100 Subject: [PATCH] Bug 26697: Make account.inc consistent between staff and opac --- .../prog/en/includes/accounts.inc | 26 +++++----- .../bootstrap/en/includes/account-table.inc | 47 +------------------ .../bootstrap/en/includes/accounts.inc | 47 +++++++++++++++++++ 3 files changed, 61 insertions(+), 59 deletions(-) create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc index 62ea570040..360e10b1f5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc @@ -33,19 +33,6 @@ [%- 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 -%] - [%- BLOCK account_status_description -%] [%- SWITCH account.status -%] [%- CASE 'UNRETURNED' -%] (Accruing) @@ -58,3 +45,16 @@ [%- CASE -%] [%- 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 -%] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc index 54fd662c28..a3b6b935d5 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc @@ -1,3 +1,4 @@ +[% PROCESS 'accounts.inc' %]
[% IF ( ACCOUNT_LINES ) %] @@ -169,49 +170,3 @@ [% END # /IF ENABLE_OPAC_PAYMENTS && DISPLAY_PAYMENT_BLOCK %] - -[%- BLOCK account_type_description -%] - - [%- IF account.credit_type_code -%] - [%- SWITCH account.credit_type_code -%] - [%- CASE 'PAYMENT' -%]Payment - [%- CASE 'WRITEOFF' -%]Writeoff - [%- CASE 'FORGIVEN' -%]Forgiven - [%- CASE 'CREDIT' -%]Credit - [%- CASE 'LOST_FOUND' -%]Lost item fee refund - [%- CASE 'REFUND' -%]Refund - [%- CASE -%][% account.credit_type.description | html %] - [%- END -%] - [%- ELSIF account.debit_type_code -%] - [%- SWITCH account.debit_type_code -%] - [%- CASE 'ACCOUNT' -%]Account creation fee - [%- CASE 'ACCOUNT_RENEW' -%]Account renewal fee - [%- CASE 'LOST' -%]Lost item - [%- CASE 'MANUAL' -%]Manual fee - [%- CASE 'NEW_CARD' -%]New card - [%- CASE 'OVERDUE' -%]Fine - [%- CASE 'PROCESSING' -%]Lost item processing fee - [%- CASE 'RENT' -%]Rental fee - [%- CASE 'RENT_DAILY' -%]Daily rental fee - [%- CASE 'RENT_RENEW' -%]Renewal of rental item - [%- CASE 'RENT_DAILY_RENEW' -%]Renewal of daily rental item - [%- CASE 'RESERVE' -%]Hold fee - [%- CASE 'RESERVE_EXPIRED' -%]Hold waiting too long - [%- CASE -%][% account.debit_type.description | html %] - [%- END -%] - [%- END -%] - [%- PROCESS account_status_description account=account -%] - -[%- END # /BLOCK account_type_description -%] - -[%- BLOCK account_status_description -%] - [%- SWITCH account.status -%] - [%- CASE 'UNRETURNED' -%] (Accruing) - [%- CASE 'RETURNED' -%] (Returned) - [%- CASE 'REPLACED' -%] (Replaced) - [%- CASE 'FORGIVEN' -%] (Forgiven) - [%- CASE 'VOID' -%] (Voided) - [%- CASE 'LOST' -%] (Lost) - [%- CASE -%] - [%- END -%] -[%- END -%] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc new file mode 100644 index 0000000000..1d2a77baae --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc @@ -0,0 +1,47 @@ +[%- BLOCK account_type_description -%] + + [%- IF account.credit_type_code -%] + [%- SWITCH account.credit_type_code -%] + [%- CASE 'PAYMENT' -%]Payment + [%- CASE 'WRITEOFF' -%]Writeoff + [%- CASE 'FORGIVEN' -%]Forgiven + [%- CASE 'CREDIT' -%]Credit + [%- CASE 'LOST_FOUND' -%]Lost item fee refund + [%- CASE 'REFUND' -%]Refund + [%- CASE -%][% account.credit_type.description | html %] + [%- END -%] + [%- ELSIF account.debit_type_code -%] + [%- SWITCH account.debit_type_code -%] + [%- CASE 'ACCOUNT' -%]Account creation fee + [%- CASE 'ACCOUNT_RENEW' -%]Account renewal fee + [%- CASE 'LOST' -%]Lost item + [%- CASE 'MANUAL' -%]Manual fee + [%- CASE 'NEW_CARD' -%]New card + [%- CASE 'OVERDUE' -%]Fine + [%- CASE 'PROCESSING' -%]Lost item processing fee + [%- CASE 'RENT' -%]Rental fee + [%- CASE 'RENT_DAILY' -%]Daily rental fee + [%- CASE 'RENT_RENEW' -%]Renewal of rental item + [%- CASE 'RENT_DAILY_RENEW' -%]Renewal of daily rental item + [%- CASE 'RESERVE' -%]Hold fee + [%- CASE 'RESERVE_EXPIRED' -%]Hold waiting too long + [%- CASE 'Payout' -%]Payout + [%- CASE -%][% account.debit_type.description | html %] + [%- END -%] + [%- END -%] + [%- PROCESS account_status_description account=account -%] + +[%- END -%] + +[%- BLOCK account_status_description -%] + [%- SWITCH account.status -%] + [%- CASE 'UNRETURNED' -%] (Accruing) + [%- CASE 'RETURNED' -%] (Returned) + [%- CASE 'REPLACED' -%] (Replaced) + [%- CASE 'REFUNDED' -%] (Refunded) + [%- CASE 'FORGIVEN' -%] (Forgiven) + [%- CASE 'VOID' -%] (Voided) + [%- CASE 'LOST' -%] (Lost) + [%- CASE -%] + [%- END -%] +[%- END -%] -- 2.20.1