From 5e0f70cb3819e8fa4279546036834105ab78c88f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 16 Mar 2021 10:16:51 +0100 Subject: [PATCH] Bug 27835: Add new syspref ChargeFinesOnCloseDay Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 5007e24e90efeb76fe3d86a8fa832d52af30abc0) Signed-off-by: Fridolin Somers (cherry picked from commit 445e8a0db03044cda5b3a2a5c447837b349d8005) Signed-off-by: Andrew Fuerste-Henry --- installer/data/mysql/atomicupdate/bug_27835.perl | 10 ++++++++++ installer/data/mysql/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/circulation.pref | 8 +++++++- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_27835.perl diff --git a/installer/data/mysql/atomicupdate/bug_27835.perl b/installer/data/mysql/atomicupdate/bug_27835.perl new file mode 100644 index 0000000000..5f718a9ca5 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_27835.perl @@ -0,0 +1,10 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + + $dbh->do(q| + INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) + VALUES ('ChargeFinesOnCloseDay', '1', NULL, 'Charge fines on close day.', 'YesNo') + |); + + NewVersion( $DBversion, 27835, "Add new system preference ChargeFinesOnCloseDay"); +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 5c363ff0bb..6d7bb2e2f8 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -119,6 +119,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('casServerUrl','https://localhost:8443/cas','','URL of the cas server','Free'), ('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'), ('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'), +('ChargeFinesOnCloseDay','1',NULL,'Charge fines on close day.','YesNo') ('CheckPrevCheckout','hardno','hardyes|softyes|softno|hardno','By default, for every item checked out, should we warn if the patron has borrowed that item in the past?','Choice'), ('CircAutoPrintQuickSlip','qslip',NULL,'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window, Display a print slip window or Clear the screen.','Choice'), ('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index 218cb43f45..c239e28781 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -923,7 +923,13 @@ Circulation: off: "Don't calculate" production: Calculate and charge - fines (when cronjobs/fines.pl is being run). - - "
NOTE: If the cronjobs/fines.pl cronjob is being run, accruing and final fines will be calculated when the cron runs and accruing fines will be finalized when an item is returned. If CalculateFinesOnReturn is enabled, final fines will be calculated when an item is returned." + - "
NOTE: If the cronjobs/fines.pl cronjob is being run, accruing and final fines will be calculated when the cron runs and accruing fines will be finalized when an item is returned. If CalculateFinesOnReturn is enabled, final fines will be calculated when an item is returned.
" + - pref: ChargeFinesOnCloseDay + type: choice + choices: + 0: "Don't charge" + 1: Charge + - on close days. If set the fines.pl cronjob will not generate fines when run on days marked as closed in the calendar. - - If a lost item is returned, apply the refunding rules defined in the - pref: RefundLostOnReturnControl -- 2.39.5