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

(-)a/installer/data/mysql/kohastructure.sql (+5 lines)
Lines 636-641 CREATE TABLE `branch_borrower_circ_rules` ( -- includes default circulation rule Link Here
636
  `branchcode` VARCHAR(10) NOT NULL, -- the branch this rule applies to (branches.branchcode)
636
  `branchcode` VARCHAR(10) NOT NULL, -- the branch this rule applies to (branches.branchcode)
637
  `categorycode` VARCHAR(10) NOT NULL, -- the patron category this rule applies to (categories.categorycode)
637
  `categorycode` VARCHAR(10) NOT NULL, -- the patron category this rule applies to (categories.categorycode)
638
  `maxissueqty` int(4) default NULL, -- the maximum number of checkouts this patron category can have at this branch
638
  `maxissueqty` int(4) default NULL, -- the maximum number of checkouts this patron category can have at this branch
639
  `maxonsiteissueqty` int(4) default NULL, -- the maximum number of on-site checkouts this patron category can have at this branch
639
  PRIMARY KEY (`categorycode`, `branchcode`),
640
  PRIMARY KEY (`categorycode`, `branchcode`),
640
  CONSTRAINT `branch_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
641
  CONSTRAINT `branch_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
641
    ON DELETE CASCADE ON UPDATE CASCADE,
642
    ON DELETE CASCADE ON UPDATE CASCADE,
Lines 651-656 DROP TABLE IF EXISTS `default_borrower_circ_rules`; Link Here
651
CREATE TABLE `default_borrower_circ_rules` ( -- default checkout rules found under "Default checkout, hold and return policy"
652
CREATE TABLE `default_borrower_circ_rules` ( -- default checkout rules found under "Default checkout, hold and return policy"
652
  `categorycode` VARCHAR(10) NOT NULL, -- patron category this rul
653
  `categorycode` VARCHAR(10) NOT NULL, -- patron category this rul
653
  `maxissueqty` int(4) default NULL,
654
  `maxissueqty` int(4) default NULL,
655
  `maxonsiteissueqty` int(4) default NULL,
654
  PRIMARY KEY (`categorycode`),
656
  PRIMARY KEY (`categorycode`),
655
  CONSTRAINT `borrower_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
657
  CONSTRAINT `borrower_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
656
    ON DELETE CASCADE ON UPDATE CASCADE
658
    ON DELETE CASCADE ON UPDATE CASCADE
Lines 664-669 DROP TABLE IF EXISTS `default_branch_circ_rules`; Link Here
664
CREATE TABLE `default_branch_circ_rules` (
666
CREATE TABLE `default_branch_circ_rules` (
665
  `branchcode` VARCHAR(10) NOT NULL,
667
  `branchcode` VARCHAR(10) NOT NULL,
666
  `maxissueqty` int(4) default NULL,
668
  `maxissueqty` int(4) default NULL,
669
  `maxonsiteissueqty` int(4) default NULL,
667
  `holdallowed` tinyint(1) default NULL,
670
  `holdallowed` tinyint(1) default NULL,
668
  `returnbranch` varchar(15) default NULL,
671
  `returnbranch` varchar(15) default NULL,
669
  PRIMARY KEY (`branchcode`),
672
  PRIMARY KEY (`branchcode`),
Lines 692-697 DROP TABLE IF EXISTS `default_circ_rules`; Link Here
692
CREATE TABLE `default_circ_rules` (
695
CREATE TABLE `default_circ_rules` (
693
    `singleton` enum('singleton') NOT NULL default 'singleton',
696
    `singleton` enum('singleton') NOT NULL default 'singleton',
694
    `maxissueqty` int(4) default NULL,
697
    `maxissueqty` int(4) default NULL,
698
    `maxonsiteissueqty` int(4) default NULL,
695
    `holdallowed` int(1) default NULL,
699
    `holdallowed` int(1) default NULL,
696
    `returnbranch` varchar(15) default NULL,
700
    `returnbranch` varchar(15) default NULL,
697
    PRIMARY KEY (`singleton`)
701
    PRIMARY KEY (`singleton`)
Lines 1186-1191 CREATE TABLE `issuingrules` ( -- circulation and fine rules Link Here
1186
  `accountsent` int(11) default NULL, -- not used? always NULL
1190
  `accountsent` int(11) default NULL, -- not used? always NULL
1187
  `chargename` varchar(100) default NULL, -- not used? always NULL
1191
  `chargename` varchar(100) default NULL, -- not used? always NULL
1188
  `maxissueqty` int(4) default NULL, -- total number of checkouts allowed
1192
  `maxissueqty` int(4) default NULL, -- total number of checkouts allowed
1193
  `maxonsiteissueqty` int(4) default NULL, -- total number of on-site checkouts allowed
1189
  `issuelength` int(4) default NULL, -- length of checkout in the unit set in issuingrules.lengthunit
1194
  `issuelength` int(4) default NULL, -- length of checkout in the unit set in issuingrules.lengthunit
1190
  `lengthunit` varchar(10) default 'days', -- unit of checkout length (days, hours)
1195
  `lengthunit` varchar(10) default 'days', -- unit of checkout length (days, hours)
1191
  `hardduedate` date default NULL, -- hard due date
1196
  `hardduedate` date default NULL, -- hard due date
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 92-97 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
92
('CoceProviders', NULL, 'aws,gb,ol', 'Coce providers', 'multiple'),
92
('CoceProviders', NULL, 'aws,gb,ol', 'Coce providers', 'multiple'),
93
('COinSinOPACResults','1','','If ON, use COinS in OPAC search results page.  NOTE: this can slow down search response time significantly','YesNo'),
93
('COinSinOPACResults','1','','If ON, use COinS in OPAC search results page.  NOTE: this can slow down search response time significantly','YesNo'),
94
('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'),
94
('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'),
95
('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'),
95
('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'),
96
('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'),
96
('CurrencyFormat','US','US|FR','Determines the display format of currencies. eg: \'36000\' is displayed as \'360 000,00\'  in \'FR\' or \'360,000.00\'  in \'US\'.','Choice'),
97
('CurrencyFormat','US','US|FR','Determines the display format of currencies. eg: \'36000\' is displayed as \'360 000,00\'  in \'FR\' or \'360,000.00\'  in \'US\'.','Choice'),
97
('dateformat','us','metric|us|iso','Define global date format (us mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy-mm-dd)','Choice'),
98
('dateformat','us','metric|us|iso','Define global date format (us mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy-mm-dd)','Choice'),
(-)a/installer/data/mysql/updatedatabase.pl (+41 lines)
Lines 10814-10819 if ( CheckVersion($DBversion) ) { Link Here
10814
    SetVersion($DBversion);
10814
    SetVersion($DBversion);
10815
}
10815
}
10816
10816
10817
$DBversion = "XXX";
10818
if ( CheckVersion($DBversion) ) {
10819
    $dbh->do(q|
10820
        ALTER TABLE branch_borrower_circ_rules ADD COLUMN maxonsiteissueqty int(4) DEFAULT NULL AFTER maxissueqty;
10821
    |);
10822
    $dbh->do(q|
10823
        UPDATE branch_borrower_circ_rules SET maxonsiteissueqty = maxissueqty;
10824
    |);
10825
    $dbh->do(q|
10826
        ALTER TABLE default_borrower_circ_rules ADD COLUMN maxonsiteissueqty int(4) DEFAULT NULL AFTER maxissueqty;
10827
    |);
10828
    $dbh->do(q|
10829
        UPDATE default_borrower_circ_rules SET maxonsiteissueqty = maxissueqty;
10830
    |);
10831
    $dbh->do(q|
10832
        ALTER TABLE default_branch_circ_rules ADD COLUMN maxonsiteissueqty int(4) DEFAULT NULL AFTER maxissueqty;
10833
    |);
10834
    $dbh->do(q|
10835
        UPDATE default_branch_circ_rules SET maxonsiteissueqty = maxissueqty;
10836
    |);
10837
    $dbh->do(q|
10838
        ALTER TABLE default_circ_rules ADD COLUMN maxonsiteissueqty int(4) DEFAULT NULL AFTER maxissueqty;
10839
    |);
10840
    $dbh->do(q|
10841
        UPDATE default_circ_rules SET maxonsiteissueqty = maxissueqty;
10842
    |);
10843
    $dbh->do(q|
10844
        ALTER TABLE issuingrules ADD COLUMN maxonsiteissueqty int(4) DEFAULT NULL AFTER maxissueqty;
10845
    |);
10846
    $dbh->do(q|
10847
        UPDATE issuingrules SET maxonsiteissueqty = maxissueqty;
10848
    |);
10849
    $dbh->do(q|
10850
        INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
10851
        VALUES ('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo');
10852
    |);
10853
10854
    print "Upgrade to $DBversion done (Bug 14045: Add DB fields maxonsiteissueqty and pref ConsiderOnSiteCheckoutsAsNormalCheckouts)\n";
10855
    SetVersion ($DBversion);
10856
}
10857
10817
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
10858
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
10818
# SEE bug 13068
10859
# SEE bug 13068
10819
# if there is anything in the atomicupdate, read and execute it.
10860
# if there is anything in the atomicupdate, read and execute it.
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +9 lines)
Lines 391-396 Circulation: Link Here
391
                  yes: Enable
391
                  yes: Enable
392
                  no: Disable
392
                  no: Disable
393
            - the on-site for all cases (Even if a user is debarred, etc.).
393
            - the on-site for all cases (Even if a user is debarred, etc.).
394
        -
395
            - pref: ConsiderOnSiteCheckoutsAsNormalCheckouts
396
              choices:
397
                  yes: Consider
398
                  no: "Don't consider"
399
            - on-site checkouts as normal checkouts.
400
            - If enabled, the number of checkouts allowed will be normal checkouts + on-site checkouts.
401
            - If disabled, both values will be checked separately.
402
394
    Checkin Policy:
403
    Checkin Policy:
395
        -
404
        -
396
            - pref: BlockReturnOfWithdrawnItems
405
            - pref: BlockReturnOfWithdrawnItems
397
- 

Return to bug 14045