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

(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 4963-4969 DROP TABLE IF EXISTS `overduerules`; Link Here
4963
CREATE TABLE `overduerules` (
4963
CREATE TABLE `overduerules` (
4964
  `overduerules_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'unique identifier for the overduerules',
4964
  `overduerules_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'unique identifier for the overduerules',
4965
  `branchcode` varchar(10) COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'foreign key from the branches table to define which branch this rule is for (if blank it''s all libraries)',
4965
  `branchcode` varchar(10) COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'foreign key from the branches table to define which branch this rule is for (if blank it''s all libraries)',
4966
  `categorycode` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'foreign key from the categories table to define which patron category this rule is for',
4966
  `categorycode` varchar(10) COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'foreign key from the categories table to define which patron category this rule is for',
4967
  `delay1` int(4) DEFAULT NULL COMMENT 'number of days after the item is overdue that the first notice is sent',
4967
  `delay1` int(4) DEFAULT NULL COMMENT 'number of days after the item is overdue that the first notice is sent',
4968
  `letter1` varchar(20) DEFAULT NULL COMMENT 'foreign key from the letter table to define which notice should be sent as the first notice',
4968
  `letter1` varchar(20) DEFAULT NULL COMMENT 'foreign key from the letter table to define which notice should be sent as the first notice',
4969
  `debarred1` varchar(1) DEFAULT '0' COMMENT 'is the patron restricted when the first notice is sent (1 for yes, 0 for no)',
4969
  `debarred1` varchar(1) DEFAULT '0' COMMENT 'is the patron restricted when the first notice is sent (1 for yes, 0 for no)',
(-)a/t/db_dependent/Overdues.t (-6 / +5 lines)
Lines 103-109 $dbh->do(q| Link Here
103
    INSERT INTO overduerules
103
    INSERT INTO overduerules
104
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
104
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
105
        VALUES
105
        VALUES
106
        ( '', '', 1, 'LETTER_CODE1', 1, 5, 'LETTER_CODE2', 1, 10, 'LETTER_CODE3', 1 )
106
        ( NULL, NULL, 1, 'LETTER_CODE1', 1, 5, 'LETTER_CODE2', 1, 10, 'LETTER_CODE3', 1 )
107
|);
107
|);
108
108
109
my @branchcodes = map { $_->branchcode } Koha::Libraries->search->as_list;
109
my @branchcodes = map { $_->branchcode } Koha::Libraries->search->as_list;
Lines 115-121 $dbh->do(q| Link Here
115
    INSERT INTO overduerules
115
    INSERT INTO overduerules
116
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
116
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
117
        VALUES
117
        VALUES
118
        ( 'CPL', '', 1, 'LETTER_CODE1', 1, 5, 'LETTER_CODE2', 1, 10, 'LETTER_CODE3', 1 )
118
        ( 'CPL', NULL, 1, 'LETTER_CODE1', 1, 5, 'LETTER_CODE2', 1, 10, 'LETTER_CODE3', 1 )
119
|);
119
|);
120
120
121
@overdue_branches = C4::Overdues::GetBranchcodesWithOverdueRules();
121
@overdue_branches = C4::Overdues::GetBranchcodesWithOverdueRules();
Lines 126-132 $dbh->do(q| Link Here
126
    INSERT INTO overduerules
126
    INSERT INTO overduerules
127
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
127
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
128
        VALUES
128
        VALUES
129
        ( 'CPL', '', 1, 'LETTER_CODE1', 1, 5, 'LETTER_CODE2', 1, 10, 'LETTER_CODE3', 1 )
129
        ( 'CPL', NULL, 1, 'LETTER_CODE1', 1, 5, 'LETTER_CODE2', 1, 10, 'LETTER_CODE3', 1 )
130
|);
130
|);
131
131
132
@overdue_branches = C4::Overdues::GetBranchcodesWithOverdueRules();
132
@overdue_branches = C4::Overdues::GetBranchcodesWithOverdueRules();
Lines 137-144 $dbh->do(q| Link Here
137
    INSERT INTO overduerules
137
    INSERT INTO overduerules
138
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
138
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
139
        VALUES
139
        VALUES
140
        ( 'CPL', '', 1, 'LETTER_CODE1_CPL', 1, 5, 'LETTER_CODE2_CPL', 1, 10, 'LETTER_CODE3_CPL', 1 ),
140
        ( 'CPL', NULL, 1, 'LETTER_CODE1_CPL', 1, 5, 'LETTER_CODE2_CPL', 1, 10, 'LETTER_CODE3_CPL', 1 ),
141
        ( 'MPL', '', 1, 'LETTER_CODE1_MPL', 1, 5, 'LETTER_CODE2_MPL', 1, 10, 'LETTER_CODE3_MPL', 1 )
141
        ( 'MPL', NULL, 1, 'LETTER_CODE1_MPL', 1, 5, 'LETTER_CODE2_MPL', 1, 10, 'LETTER_CODE3_MPL', 1 )
142
|);
142
|);
143
143
144
@overdue_branches = C4::Overdues::GetBranchcodesWithOverdueRules();
144
@overdue_branches = C4::Overdues::GetBranchcodesWithOverdueRules();
145
- 

Return to bug 18086