Bugzilla – Attachment 80174 Details for
Bug 21512
CalculateFinesOnReturn doesn't work without the syspref finesMode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-Bug-21512-CalculateFinesOnReturn-doesn-t-work-withou.patch
0001-Bug-21512-CalculateFinesOnReturn-doesn-t-work-withou.patch (text/plain), 1.74 KB, created by
Olli-Antti Kivilahti
on 2018-10-07 12:01:02 UTC
(
hide
)
Description:
0001-Bug-21512-CalculateFinesOnReturn-doesn-t-work-withou.patch
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2018-10-07 12:01:02 UTC
Size:
1.74 KB
patch
obsolete
>From 2046ece9853419dec1ab0cb4c030ef4adafdf475 Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@helsinki.fi> >Date: Sun, 7 Oct 2018 14:57:46 +0300 >Subject: [PATCH] Bug 21512 - CalculateFinesOnReturn doesn't work without the > syspref finesMode > >Fines are not created for checking in an Item, if the syspref 'CalculateFinesOnReturn' >is enabled without the syspref finesMode being in the 'production' -mode (Calculate and charge). > >CalculateFinesOnReturn must work without the fines.pl -feature. > >The problem is with the subroutine C4::Circulation::_CalculateAndUpdateFine() > >Initially it looks like it must be invoked from the fines.pl as well. But that >subroutine is only used within the C4::Circulation module for AddRenew and AddReturn. >Hence the _CalculateAndUpdateFine() has nothing to do with fines.pl|finesMode. > >This patch replaces the finesMode-check with CalculateFinesOnReturn-check. > >I am not sure why there needs to be a specific syspref for the fines.pl, or why >CalculateFinesOnReturn is needed, as the fine amounts can be tweaked using the >circulation rules matrix and the fines.pl-cronjob can either be ran, or not, with >an endless possibility of parameters that shouldn't be in the sysprefs. >--- > C4/Circulation.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 9c8d5ba13e..25a0847cdb 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -4072,7 +4072,7 @@ sub _CalculateAndUpdateFine { > > $type ||= q{}; > >- if ( C4::Context->preference('finesMode') eq 'production' ) { >+ if ( C4::Context->preference('CalculateFinesOnReturn') ) { > if ( $amount > 0 ) { > C4::Overdues::UpdateFine({ > issue_id => $issue->issue_id, >-- >2.17.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 21512
: 80174