From 0ab5a3cf929505a393060f212a4a0399abd9245d 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 --- .../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 9bf8a010f0..76298740ce 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -140,7 +140,7 @@ function moneyFormat(textObj) {
  • - +
  • @@ -159,7 +159,6 @@ function moneyFormat(textObj) { - @@ -170,7 +169,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 %] @@ -178,8 +177,16 @@ function moneyFormat(textObj) { [% amountoutstanding | format('%.2f') %] - -
    + +
      +
    1. + + + +
    2. +
    + + [% ELSE %] diff --git a/members/pay.pl b/members/pay.pl index c51fde25de..ce35b0a12d 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