@@ -, +, @@ feedback - Updates lanugage to be clearer 'ChargeFinesOnClosedDays' vs 'ChargeFinesOnCloseDay' - Removes a stary warn - Add an 'updated' counter and provides feedback in fines.pl 0 - Apply patches, updatedatabase 1 - set finesCalendar to 'ignore', ChargeFinesOnClosedDays to "Don't charge" 2 - Checkout an item due yesterday 3 - Ensure circ rules have a fine amount and interval set 4 - Make today a holiday 5 - perl misc/cronjobs/fines.pl -v 6 - 0 updated 7 - ChargeFinesOnClosedDays to "Charge" 8 - perl misc/cronjobs/fines.pl -v 9 - 1 updated --- installer/data/mysql/atomicupdate/bug_27835.perl | 4 ++-- installer/data/mysql/mandatory/sysprefs.sql | 2 +- .../prog/en/modules/admin/preferences/circulation.pref | 2 +- misc/cronjobs/fines.pl | 6 ++++-- 4 files changed, 8 insertions(+), 6 deletions(-) --- a/installer/data/mysql/atomicupdate/bug_27835.perl +++ a/installer/data/mysql/atomicupdate/bug_27835.perl @@ -3,8 +3,8 @@ 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') + VALUES ('ChargeFinesOnClosedDays', '1', NULL, 'Charge fines on days the library is closed.', 'YesNo') |); - NewVersion( $DBversion, 27835, "Add new system preference ChargeFinesOnCloseDay"); + NewVersion( $DBversion, 27835, "Add new system preference ChargeFinesOnClosedDays"); } --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -122,7 +122,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') +('ChargeFinesOnClosedDays','1',NULL,'Charge fines on days the library is closed.','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'), ('CheckPrevCheckoutDelay','0', NULL,'Maximum number of days that will trigger a warning if the patron has borrowed that item in the past when CheckPrevCheckout is enabled.','free'), ('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'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -970,7 +970,7 @@ Circulation: 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.
' - - pref: ChargeFinesOnCloseDay + - pref: ChargeFinesOnClosedDays type: choice choices: 0: "Don't charge" --- a/misc/cronjobs/fines.pl +++ a/misc/cronjobs/fines.pl @@ -115,6 +115,7 @@ if ($filename) { print {$fh} "\n"; } my $counted = 0; +my $updated = 0; my $params; $params->{maximumdays} = $maxdays if $maxdays; my $overdues = Getoverdues($params); @@ -152,11 +153,10 @@ for my $overdue ( @{$overdues} ) { if ( $mode eq 'production' && ( !$is_holiday{$branchcode} - || C4::Context->preference('ChargeFinesOnCloseDay') ) + || C4::Context->preference('ChargeFinesOnClosedDays') ) && ( $amount && $amount > 0 ) ) { - warn 'charge'; UpdateFine( { issue_id => $overdue->{issue_id}, @@ -166,6 +166,7 @@ for my $overdue ( @{$overdues} ) { due => output_pref($datedue), } ); + $updated++; } my $borrower = $patron->unblessed; if ($filename) { @@ -194,6 +195,7 @@ EOM Number of Overdue Items: counted $overdue_items reported $counted + updated $updated EOM } --