From c55ec0f561cc73fc5477e983b7d0d36a550b8b4c Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 9 Mar 2018 09:20:40 -0500 Subject: [PATCH] Bug 20120: Prevent writeoffs of more than the amount owed for a fee In short, it is possible to 'over-writeoff' a fee such that the value of the fee is now a credit. Test Plan: 1) Attempt to writeoff a single fee, set the amount input to more than the amount of the fee. 2) Note the writeoff makes the fee go negative. 3) Apply this patch 4) Attempt to repeat step 1, you should be unable to write-off an amount more than the amount outstanding for the fee! Signed-off-by: George Williams Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- .../prog/en/modules/members/paycollect.tt | 31 +++++++++++++++--- members/pay.pl | 32 +++++++++++++------ members/paycollect.pl | 4 +++ 3 files changed, 54 insertions(+), 13 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 a4467b1258..22bbf22db2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -2,6 +2,7 @@ [% USE Koha %] [% USE Branches %] [% USE AuthorisedValues %] +[% USE Price %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Collect fine payment for [% patron.firstname %] [% patron.surname %] @@ -119,6 +120,8 @@ + + @@ -139,12 +142,14 @@
  • - +
  • - +
    + + Cancel +
    [% ELSE %] @@ -201,12 +206,30 @@ [% Asset.js("js/members-menu.js") %]
    Description