From 53d498e1455170f160eb142003ce69e27fac5f88 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 7 May 2026 17:06:34 +0100 Subject: [PATCH] Bug 40445: (QA follow-up) Show cashup summary modal when completing from registers.pl When a single-register cashup is completed from the Cash summary page (registers.pl), pos/register.pl redirected back to registers.pl without the '#cashup-' hash, so the hash-watcher in registers.tt never triggered the cashup summary modal. Completing the same cashup from the Transaction history page (register.pl) worked because that branch already appended the hash. Append '#cashup-' to the registers.pl redirect URL too, so both the 'Record cashup' (quick) and 'Complete cashup' (two-phase) actions on the Cash summary page open the summary modal on return. Test plan: 1. Have at least one register with cash transactions. 2. From Cash summary (registers.pl), click 'Record cashup' on a register with no cashup in progress; complete it. => On return, cashup summary modal opens automatically. 3. Start a two-phase cashup; from Cash summary click 'Complete cashup' and confirm. => On return, cashup summary modal opens automatically. 4. From Transaction history (register.pl), complete a cashup as before. => Modal still opens (regression check). Sponsored-by: OpenFifth Signed-off-by: Jackie Usher Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim --- pos/register.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pos/register.pl b/pos/register.pl index d93ad0ad1e..e1aaf62c11 100755 --- a/pos/register.pl +++ b/pos/register.pl @@ -195,7 +195,8 @@ if ( !$registers->count ) { my $redirect_to = $input->param('redirect_to') || 'register'; if ( $redirect_to eq 'registers' ) { - print $input->redirect("/cgi-bin/koha/pos/registers.pl?cashup_complete_success=1"); + print $input->redirect( + "/cgi-bin/koha/pos/registers.pl?cashup_complete_success=1#cashup-" . $cashup->id ); } else { print $input->redirect( "/cgi-bin/koha/pos/register.pl?registerid=" . $registerid . "#cashup-" . $cashup->id );