New feature ceiling Due Date.
This adds a feature and system preference: ceilingDueDate. If this is set to a valid ( according to dateformat syspref ) date, then calculated due dates will be less than this date. Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
parent
6ad369f80b
commit
7d61fd62f5
4 changed files with 10 additions and 0 deletions
|
@ -980,6 +980,13 @@ sub AddIssue {
|
|||
if ( C4::Context->preference('ReturnBeforeExpiry') && $datedue->output('iso') gt $borrower->{dateexpiry} ) {
|
||||
$datedue = C4::Dates->new( $borrower->{dateexpiry}, 'iso' );
|
||||
}
|
||||
|
||||
# if ceilingDueDate ON the datedue can't be after the ceiling date
|
||||
if ( C4::Context->preference('ceilingDueDate')
|
||||
&& ( C4::Context->preference('ceilingDueDate') =~ C4::Dates->regexp('syspref') )
|
||||
&& $datedue->output gt C4::Context->preference('ceilingDueDate') ) {
|
||||
$datedue = C4::Dates->new( C4::Context->preference('ceilingDueDate') );
|
||||
}
|
||||
}
|
||||
$sth->execute(
|
||||
$borrower->{'borrowernumber'}, # borrowernumber
|
||||
|
|
|
@ -130,6 +130,7 @@ $tabsysprefs{IssuingInProcess} = "Circulation";
|
|||
$tabsysprefs{patronimages} = "Circulation";
|
||||
$tabsysprefs{printcirculationslips} = "Circulation";
|
||||
$tabsysprefs{ReturnBeforeExpiry} = "Circulation";
|
||||
$tabsysprefs{ceilingDueDate} = "Circulation";
|
||||
$tabsysprefs{SpecifyDueDate} = "Circulation";
|
||||
$tabsysprefs{AutomaticItemReturn} = "Circulation";
|
||||
$tabsysprefs{ReservesMaxPickUpDelay} = "Circulation";
|
||||
|
|
|
@ -144,6 +144,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
|
|||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('libraryAddress','','The address to use for printing receipts, overdues, etc. if different than physical address',NULL,'free');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choose the fines mode, \'off\', \'test\' (emails admin report) or \'production\' (accrue overdue fines). Requires accruefines cronjob.','off|test|production','Choice');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','If set, allows a global static due date for all checkouts','10','free');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ceilingDueDate','','If set, date due will not be past this date. Enter date according to the dateformat System Preference',NULL,'free');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat','Choice');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free');
|
||||
|
|
|
@ -154,6 +154,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
|
|||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('libraryAddress','','L''adresse pour l''impression des reçus, des amendes... si elle est différente de l''adresse physique de la bibliothèque',NULL,'free');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesMode','test','Choisissez un mode pour le calcul des amendes : Test ou Production.','test|production','Choice');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('globalDueDate','','Si défini, autorise une date de retour statique pour tous les prêts','10','free');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ceilingDueDate','','Si présent, les dates de retour des prêts ne pourront être antérieures à cette date. Formatez cette date conformément à la préférence système dateformat.',NULL,'free');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('itemBarcodeInputFilter','','If set, allows specification of a item barcode input filter','whitespace|T-prefix|cuecat','Choice');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('singleBranchMode',0,'Operate in Single-branch mode, hide branch selection in the OPAC',NULL,'YesNo');
|
||||
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('URLLinkText','','Text to display as the link anchor in the OPAC',NULL,'free');
|
||||
|
|
Loading…
Reference in a new issue