@@ -, +, @@ 1 - set finesCalendar to 'ignore' 2 - Checkout an item due yesterday 3 - Ensure circ rules have a fine amount set 4 - Make today a holiday 5 - run fines.pl 6 - No fine assessed 7 - Apply patch 8 - run fines.pl 9 - Fine assessed! --- misc/cronjobs/fines.pl | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) --- a/misc/cronjobs/fines.pl +++ a/misc/cronjobs/fines.pl @@ -131,11 +131,7 @@ for my $overdue ( @{$overdues} ) { ( $control eq 'ItemHomeLibrary' ) ? $overdue->{homebranch} : ( $control eq 'PatronLibrary' ) ? $patron->branchcode : $overdue->{branchcode}; - -# In final case, CircControl must be PickupLibrary. (branchcode comes from issues table here). - if ( !exists $is_holiday{$branchcode} ) { - $is_holiday{$branchcode} = set_holiday( $branchcode, $today ); - } + # In final case, CircControl must be PickupLibrary. (branchcode comes from issues table here). my $datedue = dt_from_string( $overdue->{date_due} ); if ( DateTime->compare( $datedue, $today ) == 1 ) { @@ -147,9 +143,7 @@ for my $overdue ( @{$overdues} ) { CalcFine( $overdue, $patron->categorycode, $branchcode, $datedue, $today ); - # 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 ( $mode eq 'production' ) { if ( $amount && $amount > 0 ) { UpdateFine( { @@ -193,13 +187,6 @@ Number of Overdue Items: EOM } -sub set_holiday { - my ( $branch, $dt ) = @_; - - my $calendar = Koha::Calendar->new( branchcode => $branch ); - return $calendar->is_holiday($dt); -} - sub get_filename { my $directory = shift; if ( !$directory ) { --