Bug 40256

Summary: System defined MANUAL debit type description is hard coded but the description can be changed
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: Fines and feesAssignee: Andrew Fuerste-Henry <andrew>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrew, lisette, rcoert
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 40836    
Bug Blocks:    
Attachments: Bug 40256: Use debit_type.description for display of manual fees

Description Lucas Gass (lukeg) 2025-06-26 19:36:05 UTC
To recreate:

1. Go to Admin -> Debit types 
2. See MANUAL debit type with the description of 'Manual fee'
3. Click edit and edit the description.
4. Go back to the Debit types admin page. The description still reads "Manual fee"
Comment 1 Lucas Gass (lukeg) 2025-06-26 19:37:25 UTC
kohadev-koha@kohadevbox:koha(main)$ git grep 'Manual fee'
koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc:        <span>Manual fee</span>
koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc:        <span>Manual fee</span>
t/mock_templates/intranet-tmpl/prog/en/includes/accounts.inc:        <span>Manual fee</span>
Comment 2 Andrew Fuerste-Henry 2025-09-17 20:54:29 UTC
Created attachment 186549 [details] [review]
Bug 40256: Use debit_type.description for display of manual fees

To test:
1 - edit the description of your MANUAL debit type to read "TEST" instead of "Manual fee"
2 - create a new debit type with code "BOO" and description "Broken"
3 - find a patron, go to accounting then to apply manual invoice
4 - note that the debit types presented for use show "Manual fee" instead of "TEST"
5 - create a debit on your patron with type MANAUAL and a second debit using the type created in step 2
6 - in your patron account, confirm your manual fee shows "Manual fee" in the Type column
7 - confirm the debit created in step 5 shows "broken" in the type column
8 - log into the OPAC as your patron, go to their account
9 - confirm your MANUAL debit shows "Manual fee" in the type column
10 - confirm your other debit shows no value in the type column -- for some reason the OPAC isn't showing non-system type values here, which seems to be a new issue

APPLY PATCH

11 - reload patron account in staff client, see it now shows "TEST" in the type column for your MANUAL debit
12 - reload the debit types page in admin, confirm it now shows "TEST" in the description column for the MANUAL debit type
13 - reload the patron account on the OPAC, see it now shows no value in the Type column for either of your debits. Whatever's stopping the type from showing for the custom debit type is also stopping it from showing for the MANUAL debit type
Comment 3 Andrew Fuerste-Henry 2025-09-17 20:56:22 UTC
This patch fixes the issue for the staff client, but makes clear that there's something else going wrong on the OPAC. In the patron accounts page on the OPAC, it's for some reason failing to display type values for any debit that's not part of the standard install. I didn't tease out why that's failing.
Comment 4 Andrew Fuerste-Henry 2025-09-18 13:31:42 UTC
Filed bug 40836 for this missing Type values.