Bug 41212

Summary: members/maninvoice.pl debit_types should sort by description not code
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: PatronsAssignee: Lucas Gass (lukeg) <lucas>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: edward.m.veal, gmcharlt, kyle
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 41212: Sort debit_types for manual invoice by description
Bug 41212: Sort debit_types for manual invoice by description
Bug 41212: Sort debit_types for manual invoice by description

Description Lucas Gass (lukeg) 2025-11-06 21:42:52 UTC
To recerate:

1. Add some debit types that can be manually invoiced. 
2. Go to members/maninvoice.pl?borrowernumber=X where X is your borrowernumber
3. In the type dropdown see that the entries are sorted by code not description.
Comment 1 Lucas Gass (lukeg) 2025-11-06 21:45:20 UTC
Created attachment 189232 [details] [review]
Bug 41212: Sort debit_types for manual invoice by description

To test:
1. Add some debit types that can be manually invoiced.
2. Go to members/maninvoice.pl?borrowernumber=X where X is your borrowernumber
3. In the type dropdown see that the entries are sorted by code not description.
4. APPLY patch and restart_all
5. Try again, now it should sort by code.
Comment 2 Lucas Gass (lukeg) 2025-11-06 21:47:29 UTC
Created attachment 189233 [details] [review]
Bug 41212: Sort debit_types for manual invoice by description

To test:
1. Add some debit types that can be manually invoiced.
2. Go to members/maninvoice.pl?borrowernumber=X where X is your borrowernumber
3. In the type dropdown see that the entries are sorted by code not description.
4. APPLY patch and restart_all
5. Try again, now it should sort by code.
Comment 3 Ed Veal 2025-11-06 22:38:12 UTC
This is a great idea and I fully support it but what I would like to see is a way to nest the types. For example

Type 1
Type 2
Heading 1
    Type 3
    Type 4
    Type 5
Type 6

I hope that makes sense.
Comment 4 Owen Leonard 2025-11-07 12:52:42 UTC
Created attachment 189314 [details] [review]
Bug 41212: Sort debit_types for manual invoice by description

To test:
1. Add some debit types that can be manually invoiced.
2. Go to members/maninvoice.pl?borrowernumber=X where X is your
   borrowernumber
3. In the type dropdown see that the entries are sorted by code not
   description.
4. APPLY patch and restart_all
5. Try again, now it should sort by code.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Lucas Gass (lukeg) 2025-11-07 13:40:41 UTC
(In reply to Ed Veal from comment #3)
> This is a great idea and I fully support it but what I would like to see is
> a way to nest the types. For example
> 
> Type 1
> Type 2
> Heading 1
>     Type 3
>     Type 4
>     Type 5
> Type 6
> 
> I hope that makes sense.

Hey Ed, it makes sense. That sounds like an enhancement request, I'd encourage you to file a new bug for that!