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 111-117 $dbh->do(q| Link Here
111
    INSERT INTO overduerules
111
    INSERT INTO overduerules
112
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
112
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
113
        VALUES
113
        VALUES
114
        ( '', '', 1, 'LETTER_CODE1', 1, 5, 'LETTER_CODE2', 1, 10, 'LETTER_CODE3', 1 )
114
        ( NULL, NULL, 1, 'LETTER_CODE1', 1, 5, 'LETTER_CODE2', 1, 10, 'LETTER_CODE3', 1 )
115
|);
115
|);
116
116
117
my @branchcodes = map { $_->branchcode } Koha::Libraries->search->as_list;
117
my @branchcodes = map { $_->branchcode } Koha::Libraries->search->as_list;
Lines 123-129 $dbh->do(q| Link Here
123
    INSERT INTO overduerules
123
    INSERT INTO overduerules
124
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
124
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
125
        VALUES
125
        VALUES
126
        ( 'CPL', '', 1, 'LETTER_CODE1', 1, 5, 'LETTER_CODE2', 1, 10, 'LETTER_CODE3', 1 )
126
        ( 'CPL', NULL, 1, 'LETTER_CODE1', 1, 5, 'LETTER_CODE2', 1, 10, 'LETTER_CODE3', 1 )
127
|);
127
|);
128
128
129
@overdue_branches = C4::Overdues::GetBranchcodesWithOverdueRules();
129
@overdue_branches = C4::Overdues::GetBranchcodesWithOverdueRules();
Lines 134-140 $dbh->do(q| Link Here
134
    INSERT INTO overduerules
134
    INSERT INTO overduerules
135
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
135
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
136
        VALUES
136
        VALUES
137
        ( 'CPL', '', 1, 'LETTER_CODE1', 1, 5, 'LETTER_CODE2', 1, 10, 'LETTER_CODE3', 1 )
137
        ( 'CPL', NULL, 1, 'LETTER_CODE1', 1, 5, 'LETTER_CODE2', 1, 10, 'LETTER_CODE3', 1 )
138
|);
138
|);
139
139
140
@overdue_branches = C4::Overdues::GetBranchcodesWithOverdueRules();
140
@overdue_branches = C4::Overdues::GetBranchcodesWithOverdueRules();
Lines 145-152 $dbh->do(q| Link Here
145
    INSERT INTO overduerules
145
    INSERT INTO overduerules
146
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
146
        ( branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3 )
147
        VALUES
147
        VALUES
148
        ( 'CPL', '', 1, 'LETTER_CODE1_CPL', 1, 5, 'LETTER_CODE2_CPL', 1, 10, 'LETTER_CODE3_CPL', 1 ),
148
        ( 'CPL', NULL, 1, 'LETTER_CODE1_CPL', 1, 5, 'LETTER_CODE2_CPL', 1, 10, 'LETTER_CODE3_CPL', 1 ),
149
        ( 'MPL', '', 1, 'LETTER_CODE1_MPL', 1, 5, 'LETTER_CODE2_MPL', 1, 10, 'LETTER_CODE3_MPL', 1 )
149
        ( 'MPL', NULL, 1, 'LETTER_CODE1_MPL', 1, 5, 'LETTER_CODE2_MPL', 1, 10, 'LETTER_CODE3_MPL', 1 )
150
|);
150
|);
151
151
152
@overdue_branches = C4::Overdues::GetBranchcodesWithOverdueRules();
152
@overdue_branches = C4::Overdues::GetBranchcodesWithOverdueRules();
153
- 

Return to bug 18086