Bugzilla – Attachment 183457 Details for
Bug 38728
Add option to automatically trigger cashup summary modal after cashup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38728: Add automatic modal popup for cashups on register details page
Bug-38728-Add-automatic-modal-popup-for-cashups-on.patch (text/plain), 2.61 KB, created by
Martin Renvoize (ashimema)
on 2025-06-24 13:15:23 UTC
(
hide
)
Description:
Bug 38728: Add automatic modal popup for cashups on register details page
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-06-24 13:15:23 UTC
Size:
2.61 KB
patch
obsolete
>From 210e010688ee358e6517ef9bb55f4dd5f237263f Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Tue, 24 Jun 2025 14:03:34 +0100 >Subject: [PATCH] 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> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt | 9 +++++++++ > pos/register.pl | 3 ++- > 2 files changed, 11 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >index 7e70e2c62d7..0425b58ace6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >@@ -566,6 +566,15 @@ > } > ] > }, null, 1); >+ >+ $(document).ready(function() { >+ [% IF cashup_id %] >+ let $button = $('[data-cashup="[% cashup_id | html %]"]'); >+ if ($button.length) { >+ $button[0].click(); >+ } >+ [% END %] >+ }); > </script> > [% END %] > >diff --git a/pos/register.pl b/pos/register.pl >index 2043ded9ce3..ec7400f1b99 100755 >--- a/pos/register.pl >+++ b/pos/register.pl >@@ -104,12 +104,13 @@ if ( !$registers->count ) { > my $op = $input->param('op') // ''; > if ( $op eq 'cashup' ) { > if ( $logged_in_user->has_permission( { cash_management => 'cashup' } ) ) { >- $cash_register->add_cashup( >+ my $cashup = $cash_register->add_cashup( > { > manager_id => $logged_in_user->id, > amount => $cash_register->outstanding_accountlines->total > } > ); >+ $template->param( cashup_id => $cashup->id ); > } else { > $template->param( error_cashup_permission => 1 ); > } >-- >2.49.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38728
:
175615
|
183071
|
183275
| 183457 |
183458