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

(-)a/installer/data/mysql/kohastructure.sql (+5 lines)
Lines 633-638 CREATE TABLE `branch_borrower_circ_rules` ( -- includes default circulation rule Link Here
633
  `branchcode` VARCHAR(10) NOT NULL, -- the branch this rule applies to (branches.branchcode)
633
  `branchcode` VARCHAR(10) NOT NULL, -- the branch this rule applies to (branches.branchcode)
634
  `categorycode` VARCHAR(10) NOT NULL, -- the patron category this rule applies to (categories.categorycode)
634
  `categorycode` VARCHAR(10) NOT NULL, -- the patron category this rule applies to (categories.categorycode)
635
  `maxissueqty` int(4) default NULL, -- the maximum number of checkouts this patron category can have at this branch
635
  `maxissueqty` int(4) default NULL, -- the maximum number of checkouts this patron category can have at this branch
636
  `maxonsiteissueqty` int(4) default NULL, -- the maximum number of on-site checkouts this patron category can have at this branch
636
  PRIMARY KEY (`categorycode`, `branchcode`),
637
  PRIMARY KEY (`categorycode`, `branchcode`),
637
  CONSTRAINT `branch_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
638
  CONSTRAINT `branch_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
638
    ON DELETE CASCADE ON UPDATE CASCADE,
639
    ON DELETE CASCADE ON UPDATE CASCADE,
Lines 648-653 DROP TABLE IF EXISTS `default_borrower_circ_rules`; Link Here
648
CREATE TABLE `default_borrower_circ_rules` ( -- default checkout rules found under "Default checkout, hold and return policy"
649
CREATE TABLE `default_borrower_circ_rules` ( -- default checkout rules found under "Default checkout, hold and return policy"
649
  `categorycode` VARCHAR(10) NOT NULL, -- patron category this rul
650
  `categorycode` VARCHAR(10) NOT NULL, -- patron category this rul
650
  `maxissueqty` int(4) default NULL,
651
  `maxissueqty` int(4) default NULL,
652
  `maxonsiteissueqty` int(4) default NULL,
651
  PRIMARY KEY (`categorycode`),
653
  PRIMARY KEY (`categorycode`),
652
  CONSTRAINT `borrower_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
654
  CONSTRAINT `borrower_borrower_circ_rules_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`)
653
    ON DELETE CASCADE ON UPDATE CASCADE
655
    ON DELETE CASCADE ON UPDATE CASCADE
Lines 661-666 DROP TABLE IF EXISTS `default_branch_circ_rules`; Link Here
661
CREATE TABLE `default_branch_circ_rules` (
663
CREATE TABLE `default_branch_circ_rules` (
662
  `branchcode` VARCHAR(10) NOT NULL,
664
  `branchcode` VARCHAR(10) NOT NULL,
663
  `maxissueqty` int(4) default NULL,
665
  `maxissueqty` int(4) default NULL,
666
  `maxonsiteissueqty` int(4) default NULL,
664
  `holdallowed` tinyint(1) default NULL,
667
  `holdallowed` tinyint(1) default NULL,
665
  `returnbranch` varchar(15) default NULL,
668
  `returnbranch` varchar(15) default NULL,
666
  PRIMARY KEY (`branchcode`),
669
  PRIMARY KEY (`branchcode`),
Lines 689-694 DROP TABLE IF EXISTS `default_circ_rules`; Link Here
689
CREATE TABLE `default_circ_rules` (
692
CREATE TABLE `default_circ_rules` (
690
    `singleton` enum('singleton') NOT NULL default 'singleton',
693
    `singleton` enum('singleton') NOT NULL default 'singleton',
691
    `maxissueqty` int(4) default NULL,
694
    `maxissueqty` int(4) default NULL,
695
    `maxonsiteissueqty` int(4) default NULL,
692
    `holdallowed` int(1) default NULL,
696
    `holdallowed` int(1) default NULL,
693
    `returnbranch` varchar(15) default NULL,
697
    `returnbranch` varchar(15) default NULL,
694
    PRIMARY KEY (`singleton`)
698
    PRIMARY KEY (`singleton`)
Lines 1183-1188 CREATE TABLE `issuingrules` ( -- circulation and fine rules Link Here
1183
  `accountsent` int(11) default NULL, -- not used? always NULL
1187
  `accountsent` int(11) default NULL, -- not used? always NULL
1184
  `chargename` varchar(100) default NULL, -- not used? always NULL
1188
  `chargename` varchar(100) default NULL, -- not used? always NULL
1185
  `maxissueqty` int(4) default NULL, -- total number of checkouts allowed
1189
  `maxissueqty` int(4) default NULL, -- total number of checkouts allowed
1190
  `maxonsiteissueqty` int(4) default NULL, -- total number of on-site checkouts allowed
1186
  `issuelength` int(4) default NULL, -- length of checkout in the unit set in issuingrules.lengthunit
1191
  `issuelength` int(4) default NULL, -- length of checkout in the unit set in issuingrules.lengthunit
1187
  `lengthunit` varchar(10) default 'days', -- unit of checkout length (days, hours)
1192
  `lengthunit` varchar(10) default 'days', -- unit of checkout length (days, hours)
1188
  `hardduedate` date default NULL, -- hard due date
1193
  `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 10486-10491 if ( CheckVersion($DBversion) ) { Link Here
10486
    SetVersion ($DBversion);
10486
    SetVersion ($DBversion);
10487
}
10487
}
10488
10488
10489
$DBversion = "XXX";
10490
if ( CheckVersion($DBversion) ) {
10491
    $dbh->do(q|
10492
        ALTER TABLE branch_borrower_circ_rules ADD COLUMN maxonsiteissueqty int(4) DEFAULT NULL AFTER maxissueqty;
10493
    |);
10494
    $dbh->do(q|
10495
        UPDATE branch_borrower_circ_rules SET maxonsiteissueqty = maxissueqty;
10496
    |);
10497
    $dbh->do(q|
10498
        ALTER TABLE default_borrower_circ_rules ADD COLUMN maxonsiteissueqty int(4) DEFAULT NULL AFTER maxissueqty;
10499
    |);
10500
    $dbh->do(q|
10501
        UPDATE default_borrower_circ_rules SET maxonsiteissueqty = maxissueqty;
10502
    |);
10503
    $dbh->do(q|
10504
        ALTER TABLE default_branch_circ_rules ADD COLUMN maxonsiteissueqty int(4) DEFAULT NULL AFTER maxissueqty;
10505
    |);
10506
    $dbh->do(q|
10507
        UPDATE default_branch_circ_rules SET maxonsiteissueqty = maxissueqty;
10508
    |);
10509
    $dbh->do(q|
10510
        ALTER TABLE default_circ_rules ADD COLUMN maxonsiteissueqty int(4) DEFAULT NULL AFTER maxissueqty;
10511
    |);
10512
    $dbh->do(q|
10513
        UPDATE default_circ_rules SET maxonsiteissueqty = maxissueqty;
10514
    |);
10515
    $dbh->do(q|
10516
        ALTER TABLE issuingrules ADD COLUMN maxonsiteissueqty int(4) DEFAULT NULL AFTER maxissueqty;
10517
    |);
10518
    $dbh->do(q|
10519
        UPDATE issuingrules SET maxonsiteissueqty = maxissueqty;
10520
    |);
10521
    $dbh->do(q|
10522
        INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
10523
        VALUES ('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo');
10524
    |);
10525
10526
    print "Upgrade to $DBversion done (Bug 14045: Add DB fields maxonsiteissueqty and pref ConsiderOnSiteCheckoutsAsNormalCheckouts)\n";
10527
    SetVersion ($DBversion);
10528
}
10529
10489
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
10530
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
10490
# SEE bug 13068
10531
# SEE bug 13068
10491
# if there is anything in the atomicupdate, read and execute it.
10532
# 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