From b512a96979334ad25b0cd418df5cd1659d5ba808 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 --- .../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 a1458b5..20dd552 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -145,7 +145,7 @@ function moneyFormat(textObj) {
  • - +
  • @@ -165,7 +165,6 @@ function moneyFormat(textObj) { - @@ -178,7 +177,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 %] @@ -188,8 +187,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.7.4