Bugzilla – Attachment 102982 Details for
Bug 24380
Add option to recalculate fines upon a backdated return distinctly from `CalculateFinesOnReturn`
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24380: Backdated returns do not update fines unless CalculateFinesOnReturn is enabled
Bug-24380-Backdated-returns-do-not-update-fines-un.patch (text/plain), 1.94 KB, created by
Jonathan Druart
on 2020-04-15 10:50:23 UTC
(
hide
)
Description:
Bug 24380: Backdated returns do not update fines unless CalculateFinesOnReturn is enabled
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-15 10:50:23 UTC
Size:
1.94 KB
patch
obsolete
>From a4c8cad79db17e74635c11dd2f4137a4bbb12fb0 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 8 Jan 2020 15:27:31 -0500 >Subject: [PATCH] Bug 24380: Backdated returns do not update fines unless > CalculateFinesOnReturn is enabled > >In Koha 18.11 backdating a return triggered a recalculation of the fine. This was removed in bug 14591, and I believe it was in error. The bug report itself has no justification for the change in behavior. > >Test Plan: >1) Disable CalculateFinesOnReturn >2) Backdate an overdue with fines, note the fine does not change >3) Apply this patch >4) Repeat step 2 >5) The fine should be updated! > >Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Circulation.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 747d660ea6..bb419867d9 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1854,6 +1854,7 @@ sub AddReturn { > undef $branch; > } > $branch = C4::Context->userenv->{'branch'} unless $branch; # we trust userenv to be a safe fallback/default >+ my $return_date_specified = !!$return_date; > $return_date //= dt_from_string(); > my $messages; > my $patron; >@@ -1972,7 +1973,7 @@ sub AddReturn { > MarkIssueReturned( $borrowernumber, $item->itemnumber, $return_date, $patron->privacy ); > }; > unless ( $@ ) { >- if ( C4::Context->preference('CalculateFinesOnReturn') && !$item->itemlost ) { >+ if ( ( $return_date_specified || C4::Context->preference('CalculateFinesOnReturn') ) && !$item->itemlost ) { > _CalculateAndUpdateFine( { issue => $issue, item => $item->unblessed, borrower => $patron_unblessed, return_date => $return_date } ); > } > } else { >-- >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 24380
:
97055
|
97544
|
97750
|
97751
|
97752
|
99536
|
99537
|
99538
|
102574
|
102575
|
102576
|
102577
|
102894
|
102895
|
102896
|
102981
| 102982 |
102983
|
102984
|
102985