From 5482d9b5d9b00216fe63341e473d5b2df1eb920a 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 --- 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 ) %]
  • - - + + [% amount_paid %]
  • - + + [% amount_collected %]
  • 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), -- 1.9.1