Bugzilla – Attachment 118416 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.35 KB, created by
Tomás Cohen Arazi
on 2021-03-17 16:20:28 UTC
(
hide
)
Description:
Bug 27835: Add a syspref to control fines calculation on closed days
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2021-03-17 16:20:28 UTC
Size:
2.35 KB
patch
obsolete
>From 5b9242413c234bfd4e4cdd1d27b93fde3a5791ec 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> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > 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 f3e1269f64e..554c30fc49d 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.31.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