Bugzilla – Attachment 86975 Details for
Bug 22539
Fines charged on back-dated checkin when item has been renewed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22539: Reset fines for backdated returns
Bug-22539-Reset-fines-for-backdated-returns.patch (text/plain), 1.27 KB, created by
Martin Renvoize (ashimema)
on 2019-03-25 14:02:35 UTC
(
hide
)
Description:
Bug 22539: Reset fines for backdated returns
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-03-25 14:02:35 UTC
Size:
1.27 KB
patch
obsolete
>From ac5f19f47183946bab3f8fb83b3833c3bdb7cacd Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 25 Mar 2019 14:00:59 +0000 >Subject: [PATCH] Bug 22539: Reset fines for backdated returns > >Fixed fines should be 'unfixed' for backdated returns that specify a >return date prior to the lastreneweddate. >--- > C4/Circulation.pm | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 7ab1db7e82..d15e4709aa 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1938,6 +1938,15 @@ sub AddReturn { > $patron or warn "AddReturn without current borrower"; > $is_overdue = $issue->is_overdue( $return_date ); > >+ # Fixup fines if renewed on dropbox day >+ if (defined($issue->lastreneweddate) && ( $issue->lastreneweddate > $return_date ) ) { >+ my $fines = Koha::Account::Lines->search( { issue_id => $issue->issue_id }, { order_by => { '-asc' => 'date' } } ); >+ if ($fines->count) { >+ my $fine = $fines->next; >+ $fine->accounttype('FU')->store; >+ } >+ } >+ > if ($patron) { > eval { > MarkIssueReturned( $borrowernumber, $item->itemnumber, $return_date, $patron->privacy ); >-- >2.20.1
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 22539
:
86975
|
86985
|
86986
|
86998
|
86999
|
87341
|
87342
|
87343