Browse Source

Merge branch 'bug_4906' into 3.12-master

3.12.x
Jared Camins-Esakov 11 years ago
parent
commit
835cb6e36b
  1. 6
      C4/Overdues.pm
  2. 1
      installer/data/mysql/sysprefs.sql
  3. 7
      installer/data/mysql/updatedatabase.pl
  4. 6
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
  5. 2
      kohaversion.pl

6
C4/Overdues.pm

@ -264,7 +264,11 @@ sub CalcFine {
my $units_minus_grace = $chargeable_units - $data->{firstremind};
my $amount = 0;
if ($data->{'chargeperiod'} && ($units_minus_grace > 0) ) {
$amount = int($chargeable_units / $data->{'chargeperiod'}) * $data->{'fine'};# TODO fine calc should be in cents
if ( C4::Context->preference('FinesIncludeGracePeriod') ) {
$amount = int($chargeable_units / $data->{'chargeperiod'}) * $data->{'fine'};# TODO fine calc should be in cents
} else {
$amount = int($units_minus_grace / $data->{'chargeperiod'}) * $data->{'fine'};
}
} else {
# a zero (or null) chargeperiod or negative units_minus_grace value means no charge.
}

1
installer/data/mysql/sysprefs.sql

@ -420,3 +420,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('TrackClicks','0','Track links clicked',NULL,'Integer');
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('PatronSelfRegistrationAdditionalInstructions','','A free text field to display additional instructions to newly self registered patrons.','','free');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UseQueryParser', '0', 'If enabled, try to use QueryParser for queries.', NULL, 'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('FinesIncludeGracePeriod','1','If enabled, fines calculations will include the grace period.',NULL,'YesNo');

7
installer/data/mysql/updatedatabase.pl

@ -6477,6 +6477,13 @@ if ( CheckVersion($DBversion) ) {
SetVersion($DBversion);
}
$DBversion = "3.11.00.030";
if ( CheckVersion($DBversion) ) {
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('FinesIncludeGracePeriod','1','If enabled, fines calculations will include the grace period.',NULL,'YesNo');");
print "Upgrade to $DBversion done (Add system preference FinesIncludeGracePeriod)\n";
SetVersion($DBversion);
}
$DBversion = "3.11.00.026";
if ( CheckVersion($DBversion) ) {

6
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref

@ -482,6 +482,12 @@ Circulation:
yes: Refund
no: "Don't refund"
- lost item fees charged to a borrower when the lost item is returned.
-
- pref: FinesIncludeGracePeriod
choices:
yes: Include
no: "Don't include"
- the grace period when calculating the fine for an overdue item.
Self Checkout:
-
- "Include the following JavaScript on all pages in the web-based self checkout:"

2
kohaversion.pl

@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts :
use strict;
sub kohaversion {
our $VERSION = '3.11.00.029';
our $VERSION = '3.11.00.030';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install

Loading…
Cancel
Save