Bugzilla – Attachment 118321 Details for
Bug 27835
Closed days offsets with one day
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27835: Add a syspref to control fines calculation on closed days
Bug-27835-Add-a-syspref-to-control-fines-calculati.patch (text/plain), 2.29 KB, created by
Nick Clemens (kidclamp)
on 2021-03-16 13:38:23 UTC
(
hide
)
Description:
Bug 27835: Add a syspref to control fines calculation on closed days
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-03-16 13:38:23 UTC
Size:
2.29 KB
patch
obsolete
>From c5e12002292f2200fc41e5e53a28efa203afae30 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 16 Mar 2021 10:16:55 +0100 >Subject: [PATCH] Bug 27835: Add a syspref to control fines calculation on > closed days > >Bug 27180 added a patch to not update fines on holidays if finesCalendar was set to ignore. >At least it's what it advertised, but not what it did. > >It seems that we need to add a new pref to control the calculation of >fines on closed days to answer the different use cases. > >Test plan: >With this patch applied you can run the fines.pl cronjob and play with >the new pref ChargeFinesOnCloseDay to generate fines on close days. > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > misc/cronjobs/fines.pl | 29 +++++++++++++++++------------ > 1 file changed, 17 insertions(+), 12 deletions(-) > >diff --git a/misc/cronjobs/fines.pl b/misc/cronjobs/fines.pl >index f3e1269f64..554c30fc49 100755 >--- a/misc/cronjobs/fines.pl >+++ b/misc/cronjobs/fines.pl >@@ -149,18 +149,23 @@ for my $overdue ( @{$overdues} ) { > > # Don't update the fine if today is a holiday. > # This ensures that dropbox mode will remove the correct amount of fine. >- if ( $mode eq 'production' && !$is_holiday{$branchcode} ) { >- if ( $amount && $amount > 0 ) { >- UpdateFine( >- { >- issue_id => $overdue->{issue_id}, >- itemnumber => $overdue->{itemnumber}, >- borrowernumber => $overdue->{borrowernumber}, >- amount => $amount, >- due => output_pref($datedue), >- } >- ); >- } >+ if ( >+ $mode eq 'production' >+ && ( !$is_holiday{$branchcode} >+ || C4::Context->preference('ChargeFinesOnCloseDay') ) >+ && ( $amount && $amount > 0 ) >+ ) >+ { >+ warn 'charge'; >+ UpdateFine( >+ { >+ issue_id => $overdue->{issue_id}, >+ itemnumber => $overdue->{itemnumber}, >+ borrowernumber => $overdue->{borrowernumber}, >+ amount => $amount, >+ due => output_pref($datedue), >+ } >+ ); > } > my $borrower = $patron->unblessed; > if ($filename) { >-- >2.11.0
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 27835
:
118032
|
118033
|
118288
|
118289
|
118290
|
118319
|
118320
|
118321
|
118322
|
118361
|
118414
|
118415
|
118416
|
118417
|
118418