From ab2a92c6f585a964795ac376e8e8f00220e7a537 Mon Sep 17 00:00:00 2001 From: David Bourgault Date: Mon, 25 Sep 2017 13:05:01 -0400 Subject: [PATCH] Bug 11210: Writeoff partial amounts Minor changes to pay.pl and paycollect.tt to allow writing off a partial amount of a fine. Test plan: 0) Go to the Fines tab of a test patron's profile 1) Create a fine if there are none (under the Manual invoice tab) 2) Go to the "Pay fines" tab 3) Press the write off button on the corresponding account line Without patch, you'll be asked to confirm, but will not be able to edit the amount With patch, you'll be able to edit the amount. Followed test plan, patch worked as described. Also ran QA test tool and modified files passed Signed-off-by: Simon Pouchol Signed-off-by: Kyle M Hall Signed-off-by: Jonathan Druart Conflicts: koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt Signed-off-by: Nick Clemens --- .../prog/en/modules/members/paycollect.tt | 15 +++++++++++---- members/pay.pl | 2 +- 2 files changed, 12 insertions(+), 5 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 12b2c4b6b6..1c196977f3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -146,7 +146,7 @@ function moneyFormat(textObj) {
  • - +
  • @@ -167,7 +167,6 @@ function moneyFormat(textObj) { - @@ -190,8 +189,16 @@ function moneyFormat(textObj) { [% amountoutstanding | format('%.2f') %] - -
    + +
      +
    1. + + + +
    2. +
    + + [% ELSE %] diff --git a/members/pay.pl b/members/pay.pl index 70e45e2098..2295061a89 100755 --- a/members/pay.pl +++ b/members/pay.pl @@ -97,7 +97,7 @@ if ($writeoff_all) { writeoff_all(@names); } elsif ($writeoff_item) { my $accountlines_id = $input->param('accountlines_id'); - my $amount = $input->param('amountoutstanding'); + my $amount = $input->param('amountwrittenoff'); my $payment_note = $input->param("payment_note"); Koha::Account->new( { patron_id => $borrowernumber } )->pay( -- 2.39.5