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 > 0)  ) {
266
    if ($data->{'chargeperiod'}  && ($units_minus_grace > 0)  ) {
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 or negative units_minus_grace value means no charge.
273
        # a zero (or null) chargeperiod or negative units_minus_grace value means no charge.
270
    }
274
    }
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 418-420 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
418
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('Persona',0,'Use Mozilla Persona for login','','YesNo');
418
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('Persona',0,'Use Mozilla Persona for login','','YesNo');
419
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacItemLocation','callnum','Show the shelving location of items in the opac','callnum|ccode|location','Choice');
419
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacItemLocation','callnum','Show the shelving location of items in the opac','callnum|ccode|location','Choice');
420
INSERT INTO systempreferences (variable,value,explanation,options,type)  VALUES('TrackClicks','0','Track links clicked',NULL,'Integer');
420
INSERT INTO systempreferences (variable,value,explanation,options,type)  VALUES('TrackClicks','0','Track links clicked',NULL,'Integer');
421
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 (+7 lines)
Lines 6476-6481 if ( CheckVersion($DBversion) ) { Link Here
6476
    SetVersion($DBversion);
6476
    SetVersion($DBversion);
6477
}
6477
}
6478
6478
6479
$DBversion = "3.11.00.XXX";
6480
if ( CheckVersion($DBversion) ) {
6481
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('FinesIncludeGracePeriod','1','If enabled, fines calculations will include the grace period.',NULL,'YesNo');");
6482
    print "Upgrade to $DBversion done (Add system preference FinesIncludeGracePeriod)\n";
6483
    SetVersion($DBversion);
6484
}
6485
6479
6486
6480
=head1 FUNCTIONS
6487
=head1 FUNCTIONS
6481
6488
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +6 lines)
Lines 482-487 Circulation: Link Here
482
                  yes: Refund
482
                  yes: Refund
483
                  no: "Don't refund"
483
                  no: "Don't refund"
484
            - lost item fees charged to a borrower when the lost item is returned.
484
            - lost item fees charged to a borrower when the lost item is returned.
485
        -
486
            - pref: FinesIncludeGracePeriod
487
              choices:
488
                  yes: Include
489
                  no: "Don't include"
490
            - the grace period when calculating the fine for an overdue item.
485
    Self Checkout:
491
    Self Checkout:
486
        -
492
        -
487
            - "Include the following JavaScript on all pages in the web-based self checkout:"
493
            - "Include the following JavaScript on all pages in the web-based self checkout:"
488
- 

Return to bug 4906