Bugzilla – Attachment 127852 Details for
Bug 18855
Fines cronjob can cause duplicate fines if run during active circulation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18855: (follow-up) Restore CalculateFinesOnReturn behaviour
Bug-18855-follow-up-Restore-CalculateFinesOnReturn.patch (text/plain), 1.53 KB, created by
Martin Renvoize (ashimema)
on 2021-11-19 10:03:53 UTC
(
hide
)
Description:
Bug 18855: (follow-up) Restore CalculateFinesOnReturn behaviour
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-11-19 10:03:53 UTC
Size:
1.53 KB
patch
obsolete
>From 158f1a888bd83500181fa3441ded9ca6f77c05d5 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 19 Nov 2021 09:59:18 +0000 >Subject: [PATCH] Bug 18855: (follow-up) Restore CalculateFinesOnReturn > behaviour > >This patch removes the check for a disabled 'CalculateFinesOnReturn' >to restore the behaviour prior to this patch series. > >If a patron has returned the item during the fines cron run, they may >well have been charged a reduced fine at check-in time. However, I feel >that the fine should not then increment/decrement behind the scenes >after the check-in. This is to reduce confusion for end users and >librarians alike. >--- > C4/Overdues.pm | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/C4/Overdues.pm b/C4/Overdues.pm >index 69421f3a8d..4c26b42407 100644 >--- a/C4/Overdues.pm >+++ b/C4/Overdues.pm >@@ -565,8 +565,12 @@ sub UpdateFine { > > if ( $accountline ) { > # a book may be returned while cronjob/fines.pl is running >- if ( ( $accountline->status eq 'UNRETURNED' || ! C4::Context->preference('CalculateFinesOnReturn') ) >- && Koha::Number::Price->new($accountline->amount)->round != Koha::Number::Price->new($amount)->round ) { >+ if ( >+ $accountline->status eq 'UNRETURNED' >+ && ( Koha::Number::Price->new( $accountline->amount )->round != >+ Koha::Number::Price->new($amount)->round ) >+ ) >+ { > $accountline->adjust( > { > amount => $amount, >-- >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 18855
:
127816
|
127851
|
127852
|
128187
|
131304
|
131961
|
144083
|
144084
|
145496
|
151647
|
152907
|
152987
|
152991
|
153012