Bugzilla – Attachment 69001 Details for
Bug 11210
Allow partial writeoff
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11210 - Writeoff partial amounts
Bug-11210---Writeoff-partial-amounts.patch (text/plain), 4.26 KB, created by
David Bourgault
on 2017-11-07 16:34:20 UTC
(
hide
)
Description:
Bug 11210 - Writeoff partial amounts
Filename:
MIME Type:
Creator:
David Bourgault
Created:
2017-11-07 16:34:20 UTC
Size:
4.26 KB
patch
obsolete
>From 22d05b418671ccfe8ea6e2537859dc752ed8448e Mon Sep 17 00:00:00 2001 >From: David Bourgault <david.bourgault@inlibro.com> >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: Alex Buckley <alexbuckley@catalyst.net.nz> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../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) { > <li> > <label for="paid">Collect from patron: </label> > <!-- default to paying all --> >- <input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" /> >+ <input name="paid" id="paid" value="[% amountoutstanding %]" /> > </li> > </ol> > </fieldset> >@@ -167,7 +167,6 @@ function moneyFormat(textObj) { > <input type="hidden" name="notify_id" id="notify_id" value="[% notify_id %]" /> > <input type="hidden" name="notify_level" id="notify_level" value="[% notify_level %]" /> > <input type="hidden" name="amount" id="amount" value="[% amount %]" /> >- <input type="hidden" name="amountoutstanding" id="amountoutstanding" value="[% amountoutstanding %]" /> > <input type="hidden" name="accountlines_id" id="accountlines_id" value="[% accountlines_id %]" /> > <input type="hidden" name="title" id="title" value="[% title %]" /> > <input type="hidden" name="payment_note" id="payment_note" value="[% payment_note %]" /> >@@ -180,7 +179,7 @@ function moneyFormat(textObj) { > <th>Amount</th> > <th>Amount outstanding</th> > </tr></thead> >- <tfoot><td colspan="5">Total amount to be written off:</td><td>[% amountoutstanding | format('%.2f') %]</td></tfoot> >+ <tfoot><td colspan="5">Total amount outstanding:</td><td>[% amountoutstanding | format('%.2f') %]</td></tfoot> > <tbody><tr> > <td>[% description %] [% title %]</td> > <td>[% accounttype %]</td> >@@ -190,8 +189,16 @@ function moneyFormat(textObj) { > <td class="debit">[% amountoutstanding | format('%.2f') %]</td> > </tr></tbody> > </table> >- </fieldset> >- <div class="action"><input type="submit" name="confirm_writeoff" id="confirm_writeoff" value="Write off this charge" /> >+ >+ <ol> >+ <li> >+ <label for="paid">Writeoff amount: </label> >+ <!-- default to writing off all --> >+ <input name="amountwrittenoff" id="amountwrittenoff" value="[% amountoutstanding %]" /> >+ </li> >+ </ol> >+ </fieldset> >+ <div class="action"><input type="submit" name="confirm_writeoff" id="confirm_writeoff" value="Write off this charge" /> > <a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a></div> > </form> > [% 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11210
:
67345
|
67583
|
68754
|
69001
|
69090
|
69420