View | Details | Raw Unified | Return to bug 27835
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_27835.perl (-2 / +2 lines)
Lines 3-10 if( CheckVersion( $DBversion ) ) { Link Here
3
3
4
    $dbh->do(q|
4
    $dbh->do(q|
5
        INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
5
        INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
6
        VALUES ('ChargeFinesOnCloseDay', '1', NULL, 'Charge fines on close day.', 'YesNo')
6
        VALUES ('ChargeFinesOnClosedDays', '1', NULL, 'Charge fines on days the library is closed.', 'YesNo')
7
    |);
7
    |);
8
8
9
    NewVersion( $DBversion, 27835, "Add new system preference ChargeFinesOnCloseDay");
9
    NewVersion( $DBversion, 27835, "Add new system preference ChargeFinesOnClosedDays");
10
}
10
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 122-128 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
122
('casServerUrl','https://localhost:8443/cas','','URL of the cas server','Free'),
122
('casServerUrl','https://localhost:8443/cas','','URL of the cas server','Free'),
123
('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'),
123
('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'),
124
('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'),
124
('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'),
125
('ChargeFinesOnCloseDay','1',NULL,'Charge fines on close day.','YesNo')
125
('ChargeFinesOnClosedDays','1',NULL,'Charge fines on days the library is closed.','YesNo')
126
('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'),
126
('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'),
127
('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'),
127
('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'),
128
('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'),
128
('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 (-1 / +1 lines)
Lines 970-976 Circulation: Link Here
970
                  production: Calculate and charge
970
                  production: Calculate and charge
971
            - fines (when <code>cronjobs/fines.pl</code> is being run).
971
            - fines (when <code>cronjobs/fines.pl</code> is being run).
972
            - '<br><strong>NOTE:</strong> 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 <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=CalculateFinesOnReturn">CalculateFinesOnReturn</a> is enabled, final fines will be calculated when an item is returned.<br/>'
972
            - '<br><strong>NOTE:</strong> 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 <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=CalculateFinesOnReturn">CalculateFinesOnReturn</a> is enabled, final fines will be calculated when an item is returned.<br/>'
973
            - pref: ChargeFinesOnCloseDay
973
            - pref: ChargeFinesOnClosedDays
974
              type: choice
974
              type: choice
975
              choices:
975
              choices:
976
                  0: "Don't charge"
976
                  0: "Don't charge"
(-)a/misc/cronjobs/fines.pl (-3 / +4 lines)
Lines 115-120 if ($filename) { Link Here
115
    print {$fh} "\n";
115
    print {$fh} "\n";
116
}
116
}
117
my $counted = 0;
117
my $counted = 0;
118
my $updated = 0;
118
my $params;
119
my $params;
119
$params->{maximumdays} = $maxdays if $maxdays;
120
$params->{maximumdays} = $maxdays if $maxdays;
120
my $overdues = Getoverdues($params);
121
my $overdues = Getoverdues($params);
Lines 152-162 for my $overdue ( @{$overdues} ) { Link Here
152
    if (
153
    if (
153
        $mode eq 'production'
154
        $mode eq 'production'
154
        && ( !$is_holiday{$branchcode}
155
        && ( !$is_holiday{$branchcode}
155
            || C4::Context->preference('ChargeFinesOnCloseDay') )
156
            || C4::Context->preference('ChargeFinesOnClosedDays') )
156
        && ( $amount && $amount > 0 )
157
        && ( $amount && $amount > 0 )
157
      )
158
      )
158
    {
159
    {
159
        warn 'charge';
160
        UpdateFine(
160
        UpdateFine(
161
            {
161
            {
162
                issue_id       => $overdue->{issue_id},
162
                issue_id       => $overdue->{issue_id},
Lines 166-171 for my $overdue ( @{$overdues} ) { Link Here
166
                due            => output_pref($datedue),
166
                due            => output_pref($datedue),
167
            }
167
            }
168
        );
168
        );
169
        $updated++;
169
    }
170
    }
170
    my $borrower = $patron->unblessed;
171
    my $borrower = $patron->unblessed;
171
    if ($filename) {
172
    if ($filename) {
Lines 194-199 EOM Link Here
194
Number of Overdue Items:
195
Number of Overdue Items:
195
     counted $overdue_items
196
     counted $overdue_items
196
    reported $counted
197
    reported $counted
198
     updated $updated
197
199
198
EOM
200
EOM
199
}
201
}
200
- 

Return to bug 27835