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 386-388 INSERT INTO systempreferences (variable,value,explanation,type) VALUES('OPACdidy Link Here
386
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('INTRAdidyoumean',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free');
386
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('INTRAdidyoumean',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free');
387
INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('BlockReturnOfWithdrawnItems', '1', '0', 'If enabled, items that are marked as withdrawn cannot be returned.', 'YesNo');
387
INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('BlockReturnOfWithdrawnItems', '1', '0', 'If enabled, items that are marked as withdrawn cannot be returned.', 'YesNo');
388
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer');
388
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer');
389
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 6055-6060 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
6055
   SetVersion ($DBversion);
6055
   SetVersion ($DBversion);
6056
}
6056
}
6057
6057
6058
$DBversion = "3.09.00.XXX";
6059
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
6060
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('FinesIncludeGracePeriod','1','If enabled, fines calculations will include the grace period.',NULL,'YesNo');");
6061
6062
    print "Upgrade to $DBversion done (Add system preference FinesIncludeGracePeriod)\n";
6063
    SetVersion($DBversion);
6064
}
6065
6058
=head1 FUNCTIONS
6066
=head1 FUNCTIONS
6059
6067
6060
=head2 TableExists($table)
6068
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +6 lines)
Lines 452-457 Circulation: Link Here
452
                  test: Calculate (but only for mailing to the admin)
452
                  test: Calculate (but only for mailing to the admin)
453
                  production: Calculate and charge
453
                  production: Calculate and charge
454
            - fines (when <code>misc/cronjobs/fines.pl</code> is being run).
454
            - fines (when <code>misc/cronjobs/fines.pl</code> is being run).
455
        -
456
            - pref: FinesForGracePeriod
457
              choices:
458
                  yes: Include
459
                  no: "Don't include"
460
            - the grace period when calculating the fine for an overdue item.
455
    Self Checkout:
461
    Self Checkout:
456
        -
462
        -
457
            - pref: ShowPatronImageInWebBasedSelfCheck
463
            - pref: ShowPatronImageInWebBasedSelfCheck
458
- 

Return to bug 4906