Bug 38728

Summary: Add option to automatically trigger cashup summary modal after cashup
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: Staff interfaceAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: barbara.johnson, david, gmcharlt, sally.healey
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
This enhancement automatically displays the cash register summary in a pop-up window after recording a cashup (from both the individual cash register details page and the cash registers summary page).
Version(s) released in:
Circulation function:
Bug Depends on: 13985    
Bug Blocks:    
Attachments: Bug 38728: Add automatic modal popup for cashups
Bug 38728: Add automatic modal popup for cashups
Bug 38728: Add automatic modal popup for cashups
Bug 38728: Add automatic modal popup for cashups on register details page
Bug 38728: Add automatic modal popup for cashups in registers summary

Description Martin Renvoize (ashimema) 2024-12-17 12:53:09 UTC
I actually thought this was already the case... the cashup summary that can be displayed for cashups appearing immediately after a cashup so you can print the transactions.
Comment 1 Martin Renvoize (ashimema) 2024-12-17 14:02:37 UTC
Created attachment 175615 [details] [review]
Bug 38728: Add automatic modal popup for cashups

This patch automatically triggers the cashup display modal after a
cashup is performed from the Register (singular) details display page.
Comment 2 Barbara Johnson 2025-01-24 15:05:14 UTC
Our Library would like to be able to view the cashup summary info before actually performing the cashup. Sometimes there are errors and it would be great if we could see those before performing the cashup rather than having to go back and fix something later. We would like to see the data and then have a 'Do you want to proceed' function sort of like a print preview.

Could we make this configurable so that libraries could choose what they need? 
1. Button to view summary and then proceed with cashup that would then auto display the summary once it was done
2. Existing cashup button that would auto display the summary after cashup as defined in this bug

Or should I open a different bug for this?
Comment 3 Martin Renvoize (ashimema) 2025-06-06 14:45:48 UTC
Created attachment 183071 [details] [review]
Bug 38728: Add automatic modal popup for cashups

This patch automatically triggers the cashup display modal after a
cashup is performed from the Register (singular) details display page.
Comment 4 Martin Renvoize (ashimema) 2025-06-06 14:46:15 UTC
Just a simple rebase
Comment 5 David Nind 2025-06-16 09:16:35 UTC
Created attachment 183275 [details] [review]
Bug 38728: Add automatic modal popup for cashups

This patch automatically triggers the cashup display modal after a
cashup is performed from the Register (singular) details display page.

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2025-06-16 09:42:43 UTC
Testing notes (using KTD):
1. Enable the EnablePointOfSale system preference.
2. Enable the UseCashRegisters system preference.
3. Add a debit type that can be sold (Koha administration > Accounting > Debit types).
4. Add a cash register (Koha administration > Accounting > Cash registers > New cash register).
5. Make a sale (Point of sale).
6. Perform a cash up: Point of sale > Cash summary for Centerville > select register name > Record cashup).
7. Note that there is a pop-up window "Confirm cashup of [cash register name]". After pressing "Confirm" you are returned to the transaction history page.
8. Apply the patch.
9. Repeat steps 5 and 6.
10. Note that after pressing the "Confirm" button, a "Cashup summary" pop-up window is shown listing the transactions.
Comment 7 Martin Renvoize (ashimema) 2025-06-24 13:15:23 UTC
Created attachment 183457 [details] [review]
Bug 38728: Add automatic modal popup for cashups on register details page

This patch automatically triggers the cashup display modal after a
cashup is performed from the individual Register details display page.

Test plan:
1. Enable the point of sale system preference
2. Ensure you have permission for cash_management > cashup
3. Create at least one cash register for your current branch
4. Navigate to More > Point of Sale > Cash registers
5. Click on a register name to access the individual register page
6. Perform some transactions to create outstanding amounts
7. Click 'Record cashup' button on the register details page
8. Confirm the cashup in the modal dialog
9. Verify that after page reload, the cashup summary modal
   automatically opens showing the details of the cashup just performed

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 Martin Renvoize (ashimema) 2025-06-24 13:15:25 UTC
Created attachment 183458 [details] [review]
Bug 38728: Add automatic modal popup for cashups in registers summary

This patch automatically triggers the cashup display modal after a
cashup is performed from the Cash registers summary page when performing
a cashup on an individual register.

Test plan:
1. Enable the point of sale system preference
2. Ensure you have permission for cash_management > cashup
3. Create at least one cash register for your current branch
4. Navigate to More > Point of Sale > Cash registers
5. Perform some transactions to create outstanding amounts
6. Click 'Record cashup' button on an individual register
7. Confirm the cashup in the modal dialog
8. Verify that after page reload, the cashup summary modal
   automatically opens showing the details of the cashup just performed