From 7cb33b9733b4aed82dda256a940e7a0c4fc60e77 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 1 Feb 2018 09:50:06 -0500 Subject: [PATCH] Bug 20120: Writeoffs for individual fees allows an amount to be written off more than the amount of the 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 not be able to over-writeoff the fee Signed-off-by: George Williams Signed-off-by: Katrin Fischer --- .../intranet-tmpl/prog/en/modules/members/pay.tt | 6 ++++++ .../prog/en/modules/members/paycollect.tt | 24 ++++++++++++++++++++-- members/pay.pl | 10 +++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt index c9a5a30320..304a95dc35 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt @@ -66,6 +66,12 @@ function enableCheckboxActions(){
  • Create manual credit
  • + [% IF ( error_over ) %] +
    + The writeoff submitted was more than the value of the fee being written off. + The amount of the writeoff has been reduced from [% error_amount | format('%.2f') %] to [% error_amount_outstanding | format('%.2f') %]. +
    + [% END %] [% IF ( accounts ) %]
    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 76298740ce..c56111f300 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -6,10 +6,28 @@