Bugzilla – Attachment 99390 Details for
Bug 22359
Improve usability of 'change calculation' (bug 11373)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22359: Prevent undercollection at the server
Bug-22359-Prevent-undercollection-at-the-server.patch (text/plain), 2.45 KB, created by
Martin Renvoize (ashimema)
on 2020-02-21 15:40:24 UTC
(
hide
)
Description:
Bug 22359: Prevent undercollection at the server
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-02-21 15:40:24 UTC
Size:
2.45 KB
patch
obsolete
>From 0d91f9e72b4f1b2f22bf6b605224611d61b86890 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 24 Jan 2020 12:23:39 +0000 >Subject: [PATCH] Bug 22359: Prevent undercollection at the server > >This patch adds some additional handling to prevent undercollection of >fees at the server side. > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../intranet-tmpl/prog/en/modules/members/paycollect.tt | 5 +++++ > members/paycollect.pl | 8 +++++++- > 2 files changed, 12 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >index dc00be161f..3d13d3a339 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >@@ -65,6 +65,11 @@ > You must pay a value less than or equal to [% total_due | format('%.2f') %]. > </div> > [% END %] >+[% IF ( error_under ) %] >+ <div id="error_message" class="dialog alert"> >+ You must collect a value greater than or equal to [% total_paid | format('%.2f') %]. >+ </div> >+[% END %] > > [% IF ( pay_individual ) %] > [% IF ( error_registers ) %] >diff --git a/members/paycollect.pl b/members/paycollect.pl >index a7f0e39108..5c29053852 100755 >--- a/members/paycollect.pl >+++ b/members/paycollect.pl >@@ -67,7 +67,8 @@ my $user = $input->remote_user; > my $library_id = C4::Context->userenv->{'branch'}; > my $total_due = $account->outstanding_debits->total_outstanding; > >-my $total_paid = $input->param('paid'); >+my $total_paid = $input->param('paid'); >+my $total_collected = $input->param('collected'); > > my $selected_lines = $input->param('selected'); # comes from pay.pl > my $pay_individual = $input->param('pay_individual'); >@@ -164,6 +165,11 @@ if ( $total_paid and $total_paid ne '0.00' ) { > error_over => 1, > total_due => $total_due > ); >+ } elsif ( $total_collected < $total_paid && !( $writeoff_individual || $type eq 'writeoff') ) { >+ $template->param( >+ error_under => 1, >+ total_paid => $total_paid >+ ); > } else { > output_and_exit( $input, $cookie, $template, 'wrong_csrf_token' ) > unless Koha::Token->new->check_csrf( { >-- >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 22359
:
87591
|
95619
|
96394
|
97229
|
97840
|
97873
|
97874
|
97877
|
97878
|
97885
|
97886
|
97888
|
97889
|
98833
|
98834
|
99323
|
99324
|
99325
|
99337
|
99389
| 99390