View | Details | Raw Unified | Return to bug 8585
Collapse All | Expand All

(-)a/circ/pendingreserves.pl (-2 / +3 lines)
Lines 68-75 my ( $year, $month, $day ) = Today(); Link Here
68
my $todaysdate     = sprintf("%-04.4d-%-02.2d-%02.2d", $year, $month, $day);
68
my $todaysdate     = sprintf("%-04.4d-%-02.2d-%02.2d", $year, $month, $day);
69
my $yesterdaysdate = sprintf("%-04.4d-%-02.2d-%02.2d", Add_Delta_YMD($year, $month, $day,   0, 0, -1));
69
my $yesterdaysdate = sprintf("%-04.4d-%-02.2d-%02.2d", Add_Delta_YMD($year, $month, $day,   0, 0, -1));
70
# changed from delivered range of 10 years-yesterday to 2 days ago-today
70
# changed from delivered range of 10 years-yesterday to 2 days ago-today
71
# Find two days ago for the default shelf pull start and end dates
71
# Find two days ago for the default shelf pull start and end dates, unless HoldsToPullStartDate sys pref is set.
72
my $pastdate       = sprintf("%-04.4d-%-02.2d-%02.2d", Add_Delta_YMD($year, $month, $day, 0, 0, -2));
72
my $defaultstartdate = ( C4::Context->preference('HoldsToPullStartDate') ) ? "-".C4::Context->preference('HoldsToPullStartDate') : -2;
73
my $pastdate       = sprintf("%-04.4d-%-02.2d-%02.2d", Add_Delta_YMD($year, $month, $day, 0, 0, $defaultstartdate));
73
74
74
# Predefine the start and end dates if they are not already defined
75
# Predefine the start and end dates if they are not already defined
75
$startdate =~ s/^\s+//;
76
$startdate =~ s/^\s+//;
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 374-376 INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( Link Here
374
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('EnableBorrowerFiles','0','If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo');
374
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('EnableBorrowerFiles','0','If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo');
375
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UpdateTotalIssuesOnCirc','0','Whether to update the totalissues field in the biblio on each circ.',NULL,'YesNo');
375
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UpdateTotalIssuesOnCirc','0','Whether to update the totalissues field in the biblio on each circ.',NULL,'YesNo');
376
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IntranetSlipPrinterJS','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','','Free');
376
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IntranetSlipPrinterJS','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','','Free');
377
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');
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 5635-5640 if(C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
5635
    SetVersion($DBversion);
5635
    SetVersion($DBversion);
5636
}
5636
}
5637
5637
5638
$DBversion = "XXX";
5639
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
5640
    $dbh->do("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'");
5641
    print "Upgrade to $DBversion done (Added HoldsToPullStartDate syspref)\n";
5642
    SetVersion($DBversion);
5643
}
5644
5638
=head1 FUNCTIONS
5645
=head1 FUNCTIONS
5639
5646
5640
=head2 TableExists($table)
5647
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +5 lines)
Lines 52-57 Circulation: Link Here
52
                  no: "Don't allow"
52
                  no: "Don't allow"
53
            - staff to specify a due date for a checkout.
53
            - staff to specify a due date for a checkout.
54
        -
54
        -
55
            - Set the default start date for the Holds to pull list to
56
            - pref: HoldsToPullStartDate
57
              class: integer
58
            - ago. 
59
        -
55
            - pref: AllowAllMessageDeletion
60
            - pref: AllowAllMessageDeletion
56
              choices:
61
              choices:
57
                  yes: Allow
62
                  yes: Allow
58
- 

Return to bug 8585