From 8aea305ec5026128f821b433e658ae97de8b5bae Mon Sep 17 00:00:00 2001 From: Laura_Escamilla Date: Fri, 7 Nov 2025 16:55:10 +0000 Subject: [PATCH] Bug 40836: OPAC Type column should show local debit/credit type descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To test: 1. create a credit type that can be applied manually 2. create a debit type that can be applied manually 3. apply both a credit and debit to your patron (make sure auto-reconcile is off) 4. look at your patron's account in the staff interface, see values in the "account type" column 5. look at your patron's account in the OPAC, see the "Type" column is blank 6. Apply the patch - restart_all 7. Refresh the patron’s account in the OPAC — clear browser cache if necessary. The Type columns should now be populated. --- .../bootstrap/en/includes/accounts.inc | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc index b3e397ba20..bb345101f1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc @@ -1,9 +1,9 @@ [%- BLOCK account_type_description -%] [%- IF account.credit_type_code -%] - [%- PROCESS credit_type_description credit_type_code = account.credit_type_code -%] + [%- PROCESS credit_type_description credit_type_code = account.credit_type_code account=account -%] [%- ELSIF account.debit_type_code -%] - [%- PROCESS debit_type_description debit_type_code = account.debit_type_code -%] + [%- PROCESS debit_type_description debit_type_code = account.debit_type_code account=account -%] [%- END -%] [%- PROCESS account_status_description account=account -%] @@ -45,7 +45,13 @@ [%- CASE 'VOID' -%] Credit has been voided [%- CASE -%] - [% debit_type.description | html %] + [%- IF account && account.debit_type && account.debit_type.description -%] + [% account.debit_type.description | html %] + [%- ELSE -%] + [% debit_type_code | html %] + [%- END -%] + [%- END -%] [%- END -%] @@ -75,7 +81,13 @@ [%- CASE 'WRITEOFF' -%] Writeoff [%- CASE -%] - [% credit_type.description | html %] + [%- IF account && account.credit_type && account.credit_type.description -%] + [% account.credit_type.description | html %] + [%- ELSE -%] + [% credit_type_code | html %] + [%- END -%] + [%- END -%] [%- END -%] -- 2.39.5