Bug 38532

Summary: Show both credits and debits in patron_messages.inc
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: PatronsAssignee: Andrew Fuerste-Henry <andrew>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 38532: show both debits and credits in patron_messages

Description Andrew Fuerste-Henry 2024-11-25 21:29:38 UTC
Currently patron_messages.inc gives an accurate but misleading overview of the patron's account in the patron overview.

If the patron has at least 1 debit on their account with an amountoutstanding > 0, we show a message "Patron has outstanding charges of X," where X is the total of all outstanding debits.

If the patron has no outstanding debits and at least 1 credit with an amountoutstanding < 0, we show a message of "Patron has a credit of X," where X is the total of all outstanding credits.

If a patron has 1 debit of $1 and 2 credits of $1,000,000 each, Koha only tells you about the $1 debit.

I suggest we reword the credit message to "Patron has outstanding credits of X" and make it show whenever there is one or more credit with an outstanding amount on the account. So patrons with both credits and debits on their account will show both messages.
Comment 1 Andrew Fuerste-Henry 2024-11-26 18:23:57 UTC
Created attachment 174992 [details] [review]
Bug 38532: show both debits and credits in patron_messages

To test:
1: Have patrons with a variety of credit/debit combinations
2: Confirm Koha shows the total debit amount in patron_messages if any debits exist
3: Confirm Koha does not show anything about creditd in patron_messages if any debits exist
4: Apply patch, restart_all
5: Confirm all patrons show both debit total and credit total
Comment 2 Andrew Fuerste-Henry 2024-11-26 18:28:16 UTC
To be a bit more clear, these changes are to the messages marked with Attention on the patron checkout (/cgi-bin/koha/circ/circulation.pl) and details (/cgi-bin/koha/members/moremember.pl) screens.