Bugzilla – Attachment 175615 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
Bug-38728-Add-automatic-modal-popup-for-cashups.patch (text/plain), 2.01 KB, created by
Martin Renvoize (ashimema)
on 2024-12-17 14:02:37 UTC
(
hide
)
Description:
Bug 38728: Add automatic modal popup for cashups
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-12-17 14:02:37 UTC
Size:
2.01 KB
patch
obsolete
>From ff48ec106d8edfbfa11f1b307e3999fe9dc814f1 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 17 Dec 2024 13:59:35 +0000 >Subject: [PATCH] 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. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt | 9 +++++++++ > pos/register.pl | 4 +++- > 2 files changed, 12 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 1824a3efcb4..27aac9e4a63 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >@@ -480,6 +480,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 53bb5d23253..ca8ded1d673 100755 >--- a/pos/register.pl >+++ b/pos/register.pl >@@ -106,12 +106,14 @@ else { > 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 ); >+ $template->param( cashup_description => "Some stuff here" ); > } > else { > $template->param( error_cashup_permission => 1 ); >-- >2.47.1
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