Bug 40836 - Credit and debit types are not shown in patron account on OPAC
Summary: Credit and debit types are not shown in patron account on OPAC
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Laura Escamilla
QA Contact: Jan Kissig
URL:
Keywords:
Depends on:
Blocks: 40256
  Show dependency treegraph
 
Reported: 2025-09-18 13:31 UTC by Andrew Fuerste-Henry
Modified: 2025-12-04 10:25 UTC (History)
5 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00,25.05.06,24.11.11
Circulation function:


Attachments
Bug 40836: OPAC Type column should show local debit/credit type descriptions (2.86 KB, patch)
2025-11-07 16:56 UTC, Laura Escamilla
Details | Diff | Splinter Review
Bug 40836: OPAC Type column should show local debit/credit type descriptions (2.91 KB, patch)
2025-11-07 17:35 UTC, CJ Lynce
Details | Diff | Splinter Review
Bug 40836: OPAC Type column should show local debit/credit type descriptions (2.92 KB, patch)
2025-11-18 16:32 UTC, Jan Kissig
Details | Diff | Splinter Review
Bug 40836: (QA follow-up) Reduce params (2.37 KB, patch)
2025-11-18 16:32 UTC, Jan Kissig
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2025-09-18 13:31:06 UTC
In the patron account on the OPAC, the Type column is meant to show the description value for the associated credit or debit type (account_credit_types.description or account_debit_types.description). But the Type column is empty for any credit or debit type that's defined locally. All of the system-defined credit and debit types have this value hardcoded in the accounts.inc file, rather than actually fetching the value from the database.

To recreate:
- create a credit type that can be applied manually
- create a debit type that can be applied manually
- apply both a credit and debit to your patron (make sure auto-reconcile is off)
- look at your patron's account in the staff interface, see values in the "account type" column
- look at your patron's account in the OPAC, see the "Type" column is blank
Comment 1 Laura Escamilla 2025-11-07 16:56:12 UTC
Created attachment 189349 [details] [review]
Bug 40836: OPAC Type column should show local debit/credit type descriptions

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.
Comment 2 CJ Lynce 2025-11-07 17:35:19 UTC
Created attachment 189366 [details] [review]
Bug 40836: OPAC Type column should show local debit/credit type descriptions

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.

Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Comment 3 CJ Lynce 2025-11-07 17:36:38 UTC
Patch works to restore show of custom defined credit and debit types in the OPAC interface. No issues testing.
Comment 4 Jan Kissig 2025-11-18 16:32:40 UTC
Created attachment 189672 [details] [review]
Bug 40836: OPAC Type column should show local debit/credit type descriptions

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.

Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Comment 5 Jan Kissig 2025-11-18 16:32:43 UTC
Created attachment 189673 [details] [review]
Bug 40836: (QA follow-up) Reduce params

Reduce params given to process method.
Comment 6 Jan Kissig 2025-11-18 18:02:32 UTC
Everything worked as described. I removed debit_type_code and credit_type_code from the params as they are part of account.

And I forgot to put my sign off under the patch
Comment 7 Lucas Gass (lukeg) 2025-11-19 19:29:13 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 8 Paul Derscheid 2025-11-25 16:30:49 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 9 Fridolin Somers 2025-12-04 10:25:42 UTC
Pushed to 24.11.x for 24.11.11