Bugzilla – Attachment 95654 Details for
Bug 24075
Backdating a return to the exact due date and time results in the fine not being refunded
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24075: Backdating a return to the exact due date and time results in the fine not being refunded
Bug-24075-Backdating-a-return-to-the-exact-due-dat.patch (text/plain), 2.14 KB, created by
Kyle M Hall (khall)
on 2019-11-21 11:37:05 UTC
(
hide
)
Description:
Bug 24075: Backdating a return to the exact due date and time results in the fine not being refunded
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-11-21 11:37:05 UTC
Size:
2.14 KB
patch
obsolete
>From 26572f756af220ceb8e44f0286a28bc5ecbc821b Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 20 Nov 2019 15:04:41 -0500 >Subject: [PATCH] Bug 24075: Backdating a return to the exact due date and time > results in the fine not being refunded > >When you use the date picker or book drop mode and check in an item that is due on that date, a fine is assessed and not refunded. > >For example: item 12345 is due on 11/19/2109 23:59. On 11/20/2019 I check the item in using date picker/book drop setting the check in date to 11/19/2019 23:59, the patron is charged a fine, and the fine is not cleared as would be expected, since the item is being checked in before it is overdue. > >Test Plan: >1) Back date a checkout so it is overdue >2) Run fines.pl to generate the fine >3) Return the item, backdating to the same date/time is was due >4) Note the fine was not removed >5) Apply this patch >6) Repeat steps 1-3 >7) Fine should be zeroed out now! >--- > C4/Circulation.pm | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index ad617c846e..c493766204 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1844,7 +1844,10 @@ sub AddReturn { > undef $branch; > } > $branch = C4::Context->userenv->{'branch'} unless $branch; # we trust userenv to be a safe fallback/default >+ >+ my $return_date_is_forced = $return_date ? 1 : 0; > $return_date //= dt_from_string(); >+ > my $messages; > my $patron; > my $doreturn = 1; >@@ -1963,7 +1966,7 @@ sub AddReturn { > MarkIssueReturned( $borrowernumber, $item->itemnumber, $return_date, $patron->privacy ); > }; > unless ( $@ ) { >- if ( C4::Context->preference('CalculateFinesOnReturn') && $is_overdue && !$item->itemlost ) { >+ if ( $return_date_is_forced || ( C4::Context->preference('CalculateFinesOnReturn') && $is_overdue && !$item->itemlost ) ) { > _CalculateAndUpdateFine( { issue => $issue, item => $item_unblessed, borrower => $patron_unblessed, return_date => $return_date } ); > } > } else { >-- >2.21.0 (Apple Git-122.2)
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 24075
:
95625
|
95626
|
95654
|
95655
|
95656
|
95706
|
95707
|
95719
|
95720
|
95723
|
95724
|
95727
|
95728