From 3ffc941733ce308cd1c5472a1406b71627dc5053 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 --- .../intranet-tmpl/prog/en/modules/members/paycollect.tt | 17 ++++++++++++----- members/pay.pl | 2 +- 2 files changed, 13 insertions(+), 6 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 12b2c4b..1a952fe 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) { - @@ -180,7 +179,7 @@ function moneyFormat(textObj) { Amount Amount outstanding - Total amount to be written off:[% amountoutstanding | format('%.2f') %] + Total amount outstanding:[% amountoutstanding | format('%.2f') %] [% description %] [% title %] [% accounttype %] @@ -190,8 +189,16 @@ function moneyFormat(textObj) { [% amountoutstanding | format('%.2f') %] - -
    + +
      +
    1. + + + +
    2. +
    + + [% ELSE %] diff --git a/members/pay.pl b/members/pay.pl index 70e45e2..2295061 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.10.2