Bugzilla – Attachment 90046 Details for
Bug 22982
Paying lost fee does not always remove lost item from checkouts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22982: Paying lost fee does not always remove lost item from checkouts
Bug-22982-Paying-lost-fee-does-not-always-remove-l.patch (text/plain), 1.85 KB, created by
Kyle M Hall (khall)
on 2019-05-23 18:16:00 UTC
(
hide
)
Description:
Bug 22982: Paying lost fee does not always remove lost item from checkouts
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-05-23 18:16:00 UTC
Size:
1.85 KB
patch
obsolete
>From 30a617d5781dfa14b0600ca87e91937c550723b7 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 23 May 2019 11:27:23 -0400 >Subject: [PATCH] Bug 22982: Paying lost fee does not always remove lost item > from checkouts > >Depending on how a lost fee is paid, it may or may not be removed from the patrons current checkouts. The current expected behavior is for the lost item to be removed from the patrons checkouts when the lost fee is paid in full. > >This is due to the subroutine for handling of lost fees being included in the 'pay specific lines' code but not in the 'pay by amount' code. > >Test Plan: >1) Apply this patch >2) prove t/db_dependent/Koha/Account.t >--- > Koha/Account.pm | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/Koha/Account.pm b/Koha/Account.pm >index 9d66e70f7c..5c8bcf30a7 100644 >--- a/Koha/Account.pm >+++ b/Koha/Account.pm >@@ -108,7 +108,7 @@ sub pay { > $fine->amountoutstanding($new_amountoutstanding)->store(); > $balance_remaining = $balance_remaining - $amount_to_pay; > >- if ( $fine->itemnumber && $fine->accounttype && ( $fine->accounttype eq 'L' ) ) >+ if ( $new_amountoutstanding == 0 && $fine->itemnumber && $fine->accounttype && ( $fine->accounttype eq 'L' ) ) > { > C4::Circulation::ReturnLostItem( $self->{patron_id}, $fine->itemnumber ); > } >@@ -164,6 +164,11 @@ sub pay { > $fine->amountoutstanding( $old_amountoutstanding - $amount_to_pay ); > $fine->store(); > >+ if ( $fine->amountoutstanding == 0 && $fine->itemnumber && $fine->accounttype && ( $fine->accounttype eq 'L' ) ) >+ { >+ C4::Circulation::ReturnLostItem( $self->{patron_id}, $fine->itemnumber ); >+ } >+ > my $account_offset = Koha::Account::Offset->new( > { > debit_id => $fine->id, >-- >2.20.1 (Apple Git-117)
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 22982
:
90046
|
90047
|
90050
|
90051
|
90152
|
90243
|
90244
|
90245
|
90327
|
90328
|
90329