fix the previous patch to add a syspref that permit to choose the renewal period(day or date_due).

This patch just check the syspref and use it as base date of renew.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
Nahuel Angelinetti 2009-03-06 11:38:04 +01:00 committed by Galen Charlton
parent 3587400ea7
commit 314e818294
4 changed files with 7 additions and 2 deletions

View File

@ -2142,8 +2142,11 @@ sub AddRenewal {
$item->{homebranch} # item's homebranch determines loanlength OR do we want the branch specified by the AddRenewal argument?
);
$datedue = (C4::Context->preference('RenewalPeriodBase') eq 'date_due') ?
C4::Dates->new($issuedata->{date_due}, 'iso') :
C4::Dates->new();
#FIXME -- use circControl?
$datedue = CalcDateDue(C4::Dates->new($issuedata->{date_due}, 'iso'),$loanlength,$branch); # this branch is the transactional branch.
$datedue = CalcDateDue($datedue,$loanlength,$branch); # this branch is the transactional branch.
# The question of whether to use item's homebranch calendar is open.
}

View File

@ -240,3 +240,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('L
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('LibraryThingForLibrariesEnabled','0','Enable or Disable Library Thing for Libraries Features','','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('LibraryThingForLibrariesTabbedView','0','Put LibraryThingForLibraries Content in Tabs.','','YesNo');
INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'AllowNotForLoanOverride', '0', '', 'If ON, Koha will allow the librarian to loan a not for loan item.', 'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RenewalPeriodBase', 'date_due', 'Set whether the renewal date should be counted from the date_due or from the moment the Patron asks for renewal ','date_due|now','Choice');

View File

@ -242,3 +242,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('L
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('LibraryThingForLibrariesEnabled','0','Enable or Disable Library Thing for Libraries Features','','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('LibraryThingForLibrariesTabbedView','0','Put LibraryThingForLibraries Content in Tabs.','','YesNo');
INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'AllowNotForLoanOverride', '0', '', 'If ON, Koha will allow the librarian to loan a not for loan item.', 'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RenewalPeriodBase', 'date_due', 'Permet de déterminer si la période de renouvellement doit être calculée sur la date de retour ou sur le jour du renouvellement','date_due|now','Choice');

View File

@ -10,7 +10,7 @@
use strict;
sub kohaversion {
our $VERSION = '3.01.00.031';
our $VERSION = '3.01.00.032';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install