Bugzilla – Attachment 100196 Details for
Bug 24492
Add a 'library cashup' workflow to the point of sale system
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24492: (RM follow-up) Redirect to correct page after cashup
Bug-24492-RM-follow-up-Redirect-to-correct-page-af.patch (text/plain), 2.28 KB, created by
Martin Renvoize (ashimema)
on 2020-03-05 14:18:13 UTC
(
hide
)
Description:
Bug 24492: (RM follow-up) Redirect to correct page after cashup
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-03-05 14:18:13 UTC
Size:
2.28 KB
patch
obsolete
>From 8b003f4b73a4e1ff8c21e2e6ac6f75b3abe3ba04 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 5 Mar 2020 14:16:33 +0000 >Subject: [PATCH] Bug 24492: (RM follow-up) Redirect to correct page after > cashup > >Cashup of a single register was resulting in a redirect to the register >details page. It should return to the branch details page instead. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../intranet-tmpl/prog/en/modules/pos/registers.tt | 2 +- > pos/registers.pl | 13 ++++++++++++- > 2 files changed, 13 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt >index f742601d11..0d07d3d8e2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt >@@ -176,7 +176,7 @@ > var rfloat = button.data('float'); > $('#floatc').text(rfloat); > var rid = button.data('registerid'); >- $('#cashup_confirm').attr("href", '/cgi-bin/koha/pos/register.pl?op=cashup®isterid='+rid); >+ $('#cashup_confirm').attr("href", '/cgi-bin/koha/pos/registers.pl?op=cashup®isterid='+rid); > }); > }); > </script> >diff --git a/pos/registers.pl b/pos/registers.pl >index 3e8a39e11b..fafaf64fe1 100755 >--- a/pos/registers.pl >+++ b/pos/registers.pl >@@ -55,13 +55,24 @@ else { > > my $op = $input->param('op') // ''; > if ( $op eq 'cashup' ) { >- for my $register ( $registers->as_list ) { >+ my $registerid = $input->param('registerid'); >+ if ( $registerid ) { >+ my $register = Koha::Cash::Registers->find( { id => $registerid } ); > $register->add_cashup( > { > user_id => $logged_in_user->id, > amount => $register->outstanding_accountlines->total > } > ); >+ } else { >+ for my $register ( $registers->as_list ) { >+ $register->add_cashup( >+ { >+ user_id => $logged_in_user->id, >+ amount => $register->outstanding_accountlines->total >+ } >+ ); >+ } > } > } > >-- >2.20.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 24492
:
97824
|
98019
|
98020
|
100153
|
100154
|
100189
|
100190
| 100196 |
102433