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

(-)a/installer/data/mysql/kohastructure.sql (+5 lines)
Lines 632-637 CREATE TABLE `branch_borrower_circ_rules` ( -- includes default circulation rule Link Here
632
  `branchcode` VARCHAR(10) NOT NULL, -- the branch this rule applies to (branches.branchcode)
632
  `branchcode` VARCHAR(10) NOT NULL, -- the branch this rule applies to (branches.branchcode)
633
  `categorycode` VARCHAR(10) NOT NULL, -- the patron category this rule applies to (categories.categorycode)
633
  `categorycode` VARCHAR(10) NOT NULL, -- the patron category this rule applies to (categories.categorycode)
634
  `maxissueqty` int(4) default NULL, -- the maximum number of checkouts this patron category can have at this branch
634
  `maxissueqty` int(4) default NULL, -- the maximum number of checkouts this patron category can have at this branch
635
  `maxonsiteissueqty` int(4) default NULL, -- the maximum number of on-site checkouts this patron category can have at this branch
635
  PRIMARY KEY (`categorycode`, `branchcode`),
636
  PRIMARY KEY (`categorycode`, `branchcode`),
636
  CONSTRAINT `branch_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
637
  CONSTRAINT `branch_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
637
    ON DELETE CASCADE ON UPDATE CASCADE,
638
    ON DELETE CASCADE ON UPDATE CASCADE,
Lines 647-652 DROP TABLE IF EXISTS `default_borrower_circ_rules`; Link Here
647
CREATE TABLE `default_borrower_circ_rules` ( -- default checkout rules found under "Default checkout, hold and return policy"
648
CREATE TABLE `default_borrower_circ_rules` ( -- default checkout rules found under "Default checkout, hold and return policy"
648
  `categorycode` VARCHAR(10) NOT NULL, -- patron category this rul
649
  `categorycode` VARCHAR(10) NOT NULL, -- patron category this rul
649
  `maxissueqty` int(4) default NULL,
650
  `maxissueqty` int(4) default NULL,
651
  `maxonsiteissueqty` int(4) default NULL,
650
  PRIMARY KEY (`categorycode`),
652
  PRIMARY KEY (`categorycode`),
651
  CONSTRAINT `borrower_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
653
  CONSTRAINT `borrower_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
652
    ON DELETE CASCADE ON UPDATE CASCADE
654
    ON DELETE CASCADE ON UPDATE CASCADE
Lines 660-665 DROP TABLE IF EXISTS `default_branch_circ_rules`; Link Here
660
CREATE TABLE `default_branch_circ_rules` (
662
CREATE TABLE `default_branch_circ_rules` (
661
  `branchcode` VARCHAR(10) NOT NULL,
663
  `branchcode` VARCHAR(10) NOT NULL,
662
  `maxissueqty` int(4) default NULL,
664
  `maxissueqty` int(4) default NULL,
665
  `maxonsiteissueqty` int(4) default NULL,
663
  `holdallowed` tinyint(1) default NULL,
666
  `holdallowed` tinyint(1) default NULL,
664
  `returnbranch` varchar(15) default NULL,
667
  `returnbranch` varchar(15) default NULL,
665
  PRIMARY KEY (`branchcode`),
668
  PRIMARY KEY (`branchcode`),
Lines 688-693 DROP TABLE IF EXISTS `default_circ_rules`; Link Here
688
CREATE TABLE `default_circ_rules` (
691
CREATE TABLE `default_circ_rules` (
689
    `singleton` enum('singleton') NOT NULL default 'singleton',
692
    `singleton` enum('singleton') NOT NULL default 'singleton',
690
    `maxissueqty` int(4) default NULL,
693
    `maxissueqty` int(4) default NULL,
694
    `maxonsiteissueqty` int(4) default NULL,
691
    `holdallowed` int(1) default NULL,
695
    `holdallowed` int(1) default NULL,
692
    `returnbranch` varchar(15) default NULL,
696
    `returnbranch` varchar(15) default NULL,
693
    PRIMARY KEY (`singleton`)
697
    PRIMARY KEY (`singleton`)
Lines 1182-1187 CREATE TABLE `issuingrules` ( -- circulation and fine rules Link Here
1182
  `accountsent` int(11) default NULL, -- not used? always NULL
1186
  `accountsent` int(11) default NULL, -- not used? always NULL
1183
  `chargename` varchar(100) default NULL, -- not used? always NULL
1187
  `chargename` varchar(100) default NULL, -- not used? always NULL
1184
  `maxissueqty` int(4) default NULL, -- total number of checkouts allowed
1188
  `maxissueqty` int(4) default NULL, -- total number of checkouts allowed
1189
  `maxonsiteissueqty` int(4) default NULL, -- total number of on-site checkouts allowed
1185
  `issuelength` int(4) default NULL, -- length of checkout in the unit set in issuingrules.lengthunit
1190
  `issuelength` int(4) default NULL, -- length of checkout in the unit set in issuingrules.lengthunit
1186
  `lengthunit` varchar(10) default 'days', -- unit of checkout length (days, hours)
1191
  `lengthunit` varchar(10) default 'days', -- unit of checkout length (days, hours)
1187
  `hardduedate` date default NULL, -- hard due date
1192
  `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 10401-10406 if ( CheckVersion($DBversion) ) { Link Here
10401
    SetVersion ($DBversion);
10401
    SetVersion ($DBversion);
10402
}
10402
}
10403
10403
10404
$DBversion = "XXX";
10405
if ( CheckVersion($DBversion) ) {
10406
    $dbh->do(q|
10407
        ALTER TABLE branch_borrower_circ_rules ADD COLUMN maxonsiteissueqty int(4) DEFAULT NULL AFTER maxissueqty;
10408
    |);
10409
    $dbh->do(q|
10410
        UPDATE branch_borrower_circ_rules SET maxonsiteissueqty = maxissueqty;
10411
    |);
10412
    $dbh->do(q|
10413
        ALTER TABLE default_borrower_circ_rules ADD COLUMN maxonsiteissueqty int(4) DEFAULT NULL AFTER maxissueqty;
10414
    |);
10415
    $dbh->do(q|
10416
        UPDATE default_borrower_circ_rules SET maxonsiteissueqty = maxissueqty;
10417
    |);
10418
    $dbh->do(q|
10419
        ALTER TABLE default_branch_circ_rules ADD COLUMN maxonsiteissueqty int(4) DEFAULT NULL AFTER maxissueqty;
10420
    |);
10421
    $dbh->do(q|
10422
        UPDATE default_branch_circ_rules SET maxonsiteissueqty = maxissueqty;
10423
    |);
10424
    $dbh->do(q|
10425
        ALTER TABLE default_circ_rules ADD COLUMN maxonsiteissueqty int(4) DEFAULT NULL AFTER maxissueqty;
10426
    |);
10427
    $dbh->do(q|
10428
        UPDATE default_circ_rules SET maxonsiteissueqty = maxissueqty;
10429
    |);
10430
    $dbh->do(q|
10431
        ALTER TABLE issuingrules ADD COLUMN maxonsiteissueqty int(4) DEFAULT NULL AFTER maxissueqty;
10432
    |);
10433
    $dbh->do(q|
10434
        UPDATE issuingrules SET maxonsiteissueqty = maxissueqty;
10435
    |);
10436
    $dbh->do(q|
10437
        INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
10438
        VALUES ('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo');
10439
    |);
10440
10441
    print "Upgrade to $DBversion done (Bug 14045: Add DB fields maxonsiteissueqty and pref ConsiderOnSiteCheckoutsAsNormalCheckouts)\n";
10442
    SetVersion ($DBversion);
10443
}
10444
10404
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
10445
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
10405
# SEE bug 13068
10446
# SEE bug 13068
10406
# if there is anything in the atomicupdate, read and execute it.
10447
# 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 398-403 Circulation: Link Here
398
                  yes: Enable
398
                  yes: Enable
399
                  no: Disable
399
                  no: Disable
400
            - the on-site for all cases (Even if a user is debarred, etc.).
400
            - the on-site for all cases (Even if a user is debarred, etc.).
401
        -
402
            - pref: ConsiderOnSiteCheckoutsAsNormalCheckouts
403
              choices:
404
                  yes: Consider
405
                  no: "Don't consider"
406
            - on-site checkouts as normal checkouts.
407
            - If enabled, the number of checkouts allowed will be normal checkouts + on-site checkouts.
408
            - If disabled, both values will be checked separately.
409
401
    Checkin Policy:
410
    Checkin Policy:
402
        -
411
        -
403
            - pref: BlockReturnOfWithdrawnItems
412
            - pref: BlockReturnOfWithdrawnItems
404
- 

Return to bug 14045