Bugzilla – Attachment 61234 Details for
Bug 11373
Add "change calculation" feature to the fine payment forms
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11373 - Fixed: 'Change to give back' not displaying.
Bug-11373---Fixed-Change-to-give-back-not-displayi.patch (text/plain), 2.54 KB, created by
Biblibre Sandboxes
on 2017-03-17 21:08:51 UTC
(
hide
)
Description:
Bug 11373 - Fixed: 'Change to give back' not displaying.
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2017-03-17 21:08:51 UTC
Size:
2.54 KB
patch
obsolete
>From 00725f5c8c3d3fe13d3358eff8e2a0e7b312a1be Mon Sep 17 00:00:00 2001 >From: mbeaulieu <mbeaulieu@inlibro.com> >Date: Mon, 21 Jul 2014 13:19:54 -0400 >Subject: [PATCH] Bug 11373 - Fixed: 'Change to give back' not displaying. > >I tested the last patch and found that the case 'amount oustanding == amount paid' was not handled in paycollect.p . >The confirmation box should now appear when those values are equal and the amount collected is higher than the amount paid. > >I have found another problem while testing. >When paying all fines or selected fines, the 'The amount collected is greater than the total amount paid.' message would appear even when the entered data was correct. > >Both issues were adressed in this patch. > modified: koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt > modified: members/paycollect.pl > >Signed-off-by: Candice Hope <candiceh@payson.org> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt | 7 ++++--- > members/paycollect.pl | 2 +- > 2 files changed, 5 insertions(+), 4 deletions(-) > >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 6ed1376..ba94850 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >@@ -245,11 +245,12 @@ $(document).ready(function() { > [% IF ( give_change ) %] > <li> > <label for="paid">Amount paid:</label> >- <!-- default to paying all --> >- <input name="paid" id="paid" value="[% total | format('%.2f') %]" onchange="moneyFormat(document.payform.paid)"/> >+ <input type="hidden" name="paid" id="paid" value="[% amount_paid %]" /> >+ [% amount_paid %] > </li> > <li> >- <label>Collect from patron:</label> >+ <label>Collected from patron:</label> >+ <input type="hidden" name="collected" id="collected" value="[% amount_paid %]" /> > [% amount_collected %] > </li> > <li> >diff --git a/members/paycollect.pl b/members/paycollect.pl >index d4c7113..d5ecc8f 100755 >--- a/members/paycollect.pl >+++ b/members/paycollect.pl >@@ -114,7 +114,7 @@ if ( $total_paid and $total_paid ne '0.00' ) { > error_collected_less => 1, > ); > } >- elsif ($total_paid > $total_due) { >+ elsif ($total_paid >= $total_due and $total_collected ne $total_paid) { > $template->param( > amount_paid => sprintf('%.2f', $total_due), > amount_collected => sprintf('%.2f', $total_collected), >-- >2.7.4
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 11373
:
23382
|
26103
|
26108
|
29757
|
29938
|
36875
|
36876
|
36877
|
60528
|
60529
|
61233
|
61234
|
67348
|
68296
|
70043
|
71975
|
71976
|
77584
|
77585
|
79122
|
79171
|
79188
|
79507
|
79509
|
79529
|
79530
|
79538
|
79549
|
79759
|
79944
|
79951
|
80414
|
80986
|
82420
|
82797
|
83804
|
83812
|
83813
|
84653
|
84654