From 4a10cbb744ba0ab8b5695ba33b4ff31553a2bf96 Mon Sep 17 00:00:00 2001 From: mbeaulieu 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 --- .../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 8b897ee..c2abf88 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -243,11 +243,12 @@ $(document).ready(function() { [% IF ( give_change ) %]
  • - - + + [% amount_paid %]
  • - + + [% amount_collected %]
  • diff --git a/members/paycollect.pl b/members/paycollect.pl index 8e2ec91..8324c80 100755 --- a/members/paycollect.pl +++ b/members/paycollect.pl @@ -111,7 +111,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), -- 1.7.9.5