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

(-)a/C4/Overdues.pm (-1 / +5 lines)
Lines 264-270 sub CalcFine { Link Here
264
    my $units_minus_grace = $chargeable_units - $data->{firstremind};
264
    my $units_minus_grace = $chargeable_units - $data->{firstremind};
265
    my $amount = 0;
265
    my $amount = 0;
266
    if ($data->{'chargeperiod'}  && $units_minus_grace  ) {
266
    if ($data->{'chargeperiod'}  && $units_minus_grace  ) {
267
        $amount = int($chargeable_units / $data->{'chargeperiod'}) * $data->{'fine'};# TODO fine calc should be in cents
267
        if ( C4::Context->preference('FinesIncludeGracePeriod') ) {        
268
            $amount = int($chargeable_units / $data->{'chargeperiod'}) * $data->{'fine'};# TODO fine calc should be in cents
269
        } else {
270
            $amount = int($units_minus_grace / $data->{'chargeperiod'}) * $data->{'fine'};
271
        }
268
    } else {
272
    } else {
269
        # a zero (or null)  chargeperiod means no charge.
273
        # a zero (or null)  chargeperiod means no charge.
270
    }
274
    }
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 374-376 INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( Link Here
374
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('EnableBorrowerFiles','0','If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo');
374
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('EnableBorrowerFiles','0','If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo');
375
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UpdateTotalIssuesOnCirc','0','Whether to update the totalissues field in the biblio on each circ.',NULL,'YesNo');
375
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UpdateTotalIssuesOnCirc','0','Whether to update the totalissues field in the biblio on each circ.',NULL,'YesNo');
376
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IntranetSlipPrinterJS','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','','Free');
376
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IntranetSlipPrinterJS','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','','Free');
377
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('FinesIncludeGracePeriod','1','If enabled, fines calculations will include the grace period.',NULL,'YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (+8 lines)
Lines 5635-5640 if(C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
5635
    SetVersion($DBversion);
5635
    SetVersion($DBversion);
5636
}
5636
}
5637
5637
5638
$DBversion = "3.09.00.XXX";
5639
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
5640
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('FinesIncludeGracePeriod','1','If enabled, fines calculations will include the grace period.',NULL,'YesNo');");
5641
5642
    print "Upgrade to $DBversion done (Add system preference FinesIncludeGracePeriod)\n";
5643
    SetVersion($DBversion);
5644
}
5645
5638
=head1 FUNCTIONS
5646
=head1 FUNCTIONS
5639
5647
5640
=head2 TableExists($table)
5648
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +6 lines)
Lines 394-399 Circulation: Link Here
394
                  test: Calculate (but only for mailing to the admin)
394
                  test: Calculate (but only for mailing to the admin)
395
                  production: Calculate and charge
395
                  production: Calculate and charge
396
            - fines (when <code>misc/cronjobs/fines.pl</code> is being run).
396
            - fines (when <code>misc/cronjobs/fines.pl</code> is being run).
397
        -
398
            - pref: FinesForGracePeriod
399
              choices:
400
                  yes: Include
401
                  no: "Don't include"
402
            - the grace period when calculating the fine for an overdue item.
397
    Self Checkout:
403
    Self Checkout:
398
        -
404
        -
399
            - pref: ShowPatronImageInWebBasedSelfCheck
405
            - pref: ShowPatronImageInWebBasedSelfCheck
400
- 

Return to bug 4906