From 333459b02bf3fa868ab6f6a44858faed07d453fe 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. --- .../intranet-tmpl/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 a1458b5..cac4d8c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -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