|
Lines 108-189
$dbh->do(
Link Here
|
| 108 |
|
108 |
|
| 109 |
#Test GetIssuingRule |
109 |
#Test GetIssuingRule |
| 110 |
my $sampleissuingrule1 = { |
110 |
my $sampleissuingrule1 = { |
| 111 |
reservecharge => '0.000000', |
111 |
reservecharge => '0.000000', |
| 112 |
chargename => 'Null', |
112 |
chargename => 'Null', |
| 113 |
restrictedtype => 0, |
113 |
restrictedtype => 0, |
| 114 |
accountsent => 0, |
114 |
accountsent => 0, |
| 115 |
maxissueqty => 5, |
115 |
maxissueqty => 5, |
| 116 |
finedays => 0, |
116 |
finedays => 0, |
| 117 |
lengthunit => 'Null', |
117 |
lengthunit => 'Null', |
| 118 |
renewalperiod => 5, |
118 |
renewalperiod => 5, |
| 119 |
norenewalbefore => 6, |
119 |
norenewalbefore => 6, |
| 120 |
auto_renew => 0, |
120 |
auto_renew => 0, |
| 121 |
issuelength => 5, |
121 |
issuelength => 5, |
| 122 |
chargeperiod => 0, |
122 |
chargeperiod => 0, |
| 123 |
rentaldiscount => '2.000000', |
123 |
chargeperiod_charge_at => 0, |
| 124 |
reservesallowed => 0, |
124 |
rentaldiscount => '2.000000', |
| 125 |
hardduedate => '2013-01-01', |
125 |
reservesallowed => 0, |
| 126 |
branchcode => $samplebranch1->{branchcode}, |
126 |
hardduedate => '2013-01-01', |
| 127 |
fine => '0.000000', |
127 |
branchcode => $samplebranch1->{branchcode}, |
| 128 |
hardduedatecompare => 5, |
128 |
fine => '0.000000', |
| 129 |
overduefinescap => '0.000000', |
129 |
hardduedatecompare => 5, |
| 130 |
renewalsallowed => 0, |
130 |
overduefinescap => '0.000000', |
| 131 |
firstremind => 0, |
131 |
renewalsallowed => 0, |
| 132 |
itemtype => 'BOOK', |
132 |
firstremind => 0, |
| 133 |
categorycode => $samplecat->{categorycode}, |
133 |
itemtype => 'BOOK', |
| 134 |
maxsuspensiondays => 0, |
134 |
categorycode => $samplecat->{categorycode}, |
|
|
135 |
maxsuspensiondays => 0, |
| 135 |
}; |
136 |
}; |
| 136 |
my $sampleissuingrule2 = { |
137 |
my $sampleissuingrule2 = { |
| 137 |
branchcode => $samplebranch2->{branchcode}, |
138 |
branchcode => $samplebranch2->{branchcode}, |
| 138 |
categorycode => $samplecat->{categorycode}, |
139 |
categorycode => $samplecat->{categorycode}, |
| 139 |
itemtype => 'BOOK', |
140 |
itemtype => 'BOOK', |
| 140 |
maxissueqty => 2, |
141 |
maxissueqty => 2, |
| 141 |
renewalsallowed => 'Null', |
142 |
renewalsallowed => 'Null', |
| 142 |
renewalperiod => 2, |
143 |
renewalperiod => 2, |
| 143 |
norenewalbefore => 7, |
144 |
norenewalbefore => 7, |
| 144 |
auto_renew => 0, |
145 |
auto_renew => 0, |
| 145 |
reservesallowed => 'Null', |
146 |
reservesallowed => 'Null', |
| 146 |
issuelength => 2, |
147 |
issuelength => 2, |
| 147 |
lengthunit => 'Null', |
148 |
lengthunit => 'Null', |
| 148 |
hardduedate => 2, |
149 |
hardduedate => 2, |
| 149 |
hardduedatecompare => 'Null', |
150 |
hardduedatecompare => 'Null', |
| 150 |
fine => 'Null', |
151 |
fine => 'Null', |
| 151 |
finedays => 'Null', |
152 |
finedays => 'Null', |
| 152 |
firstremind => 'Null', |
153 |
firstremind => 'Null', |
| 153 |
chargeperiod => 'Null', |
154 |
chargeperiod => 'Null', |
| 154 |
rentaldiscount => 2.00, |
155 |
chargeperiod_charge_at => 0, |
| 155 |
overduefinescap => 'Null', |
156 |
rentaldiscount => 2.00, |
| 156 |
accountsent => 'Null', |
157 |
overduefinescap => 'Null', |
| 157 |
reservecharge => 'Null', |
158 |
accountsent => 'Null', |
| 158 |
chargename => 'Null', |
159 |
reservecharge => 'Null', |
| 159 |
restrictedtype => 'Null', |
160 |
chargename => 'Null', |
| 160 |
maxsuspensiondays => 0, |
161 |
restrictedtype => 'Null', |
|
|
162 |
maxsuspensiondays => 0, |
| 161 |
}; |
163 |
}; |
| 162 |
my $sampleissuingrule3 = { |
164 |
my $sampleissuingrule3 = { |
| 163 |
branchcode => $samplebranch1->{branchcode}, |
165 |
branchcode => $samplebranch1->{branchcode}, |
| 164 |
categorycode => $samplecat->{categorycode}, |
166 |
categorycode => $samplecat->{categorycode}, |
| 165 |
itemtype => 'DVD', |
167 |
itemtype => 'DVD', |
| 166 |
maxissueqty => 3, |
168 |
maxissueqty => 3, |
| 167 |
renewalsallowed => 'Null', |
169 |
renewalsallowed => 'Null', |
| 168 |
renewalperiod => 3, |
170 |
renewalperiod => 3, |
| 169 |
norenewalbefore => 8, |
171 |
norenewalbefore => 8, |
| 170 |
auto_renew => 0, |
172 |
auto_renew => 0, |
| 171 |
reservesallowed => 'Null', |
173 |
reservesallowed => 'Null', |
| 172 |
issuelength => 3, |
174 |
issuelength => 3, |
| 173 |
lengthunit => 'Null', |
175 |
lengthunit => 'Null', |
| 174 |
hardduedate => 3, |
176 |
hardduedate => 3, |
| 175 |
hardduedatecompare => 'Null', |
177 |
hardduedatecompare => 'Null', |
| 176 |
fine => 'Null', |
178 |
fine => 'Null', |
| 177 |
finedays => 'Null', |
179 |
finedays => 'Null', |
| 178 |
firstremind => 'Null', |
180 |
firstremind => 'Null', |
| 179 |
chargeperiod => 'Null', |
181 |
chargeperiod => 'Null', |
| 180 |
rentaldiscount => 3.00, |
182 |
chargeperiod_charge_at => 0, |
| 181 |
overduefinescap => 'Null', |
183 |
rentaldiscount => 3.00, |
| 182 |
accountsent => 'Null', |
184 |
overduefinescap => 'Null', |
| 183 |
reservecharge => 'Null', |
185 |
accountsent => 'Null', |
| 184 |
chargename => 'Null', |
186 |
reservecharge => 'Null', |
| 185 |
restrictedtype => 'Null', |
187 |
chargename => 'Null', |
| 186 |
maxsuspensiondays => 0, |
188 |
restrictedtype => 'Null', |
|
|
189 |
maxsuspensiondays => 0, |
| 187 |
}; |
190 |
}; |
| 188 |
$query = 'INSERT INTO issuingrules ( |
191 |
$query = 'INSERT INTO issuingrules ( |
| 189 |
branchcode, |
192 |
branchcode, |
|
Lines 203-208
$query = 'INSERT INTO issuingrules (
Link Here
|
| 203 |
finedays, |
206 |
finedays, |
| 204 |
firstremind, |
207 |
firstremind, |
| 205 |
chargeperiod, |
208 |
chargeperiod, |
|
|
209 |
chargeperiod_charge_at, |
| 206 |
rentaldiscount, |
210 |
rentaldiscount, |
| 207 |
overduefinescap, |
211 |
overduefinescap, |
| 208 |
accountsent, |
212 |
accountsent, |
|
Lines 210-216
$query = 'INSERT INTO issuingrules (
Link Here
|
| 210 |
chargename, |
214 |
chargename, |
| 211 |
restrictedtype, |
215 |
restrictedtype, |
| 212 |
maxsuspensiondays |
216 |
maxsuspensiondays |
| 213 |
) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)'; |
217 |
) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)'; |
| 214 |
my $sth = $dbh->prepare($query); |
218 |
my $sth = $dbh->prepare($query); |
| 215 |
$sth->execute( |
219 |
$sth->execute( |
| 216 |
$sampleissuingrule1->{branchcode}, |
220 |
$sampleissuingrule1->{branchcode}, |
|
Lines 230-235
$sth->execute(
Link Here
|
| 230 |
$sampleissuingrule1->{finedays}, |
234 |
$sampleissuingrule1->{finedays}, |
| 231 |
$sampleissuingrule1->{firstremind}, |
235 |
$sampleissuingrule1->{firstremind}, |
| 232 |
$sampleissuingrule1->{chargeperiod}, |
236 |
$sampleissuingrule1->{chargeperiod}, |
|
|
237 |
$sampleissuingrule1->{chargeperiod_charge_at}, |
| 233 |
$sampleissuingrule1->{rentaldiscount}, |
238 |
$sampleissuingrule1->{rentaldiscount}, |
| 234 |
$sampleissuingrule1->{overduefinescap}, |
239 |
$sampleissuingrule1->{overduefinescap}, |
| 235 |
$sampleissuingrule1->{accountsent}, |
240 |
$sampleissuingrule1->{accountsent}, |
|
Lines 256-261
$sth->execute(
Link Here
|
| 256 |
$sampleissuingrule2->{finedays}, |
261 |
$sampleissuingrule2->{finedays}, |
| 257 |
$sampleissuingrule2->{firstremind}, |
262 |
$sampleissuingrule2->{firstremind}, |
| 258 |
$sampleissuingrule2->{chargeperiod}, |
263 |
$sampleissuingrule2->{chargeperiod}, |
|
|
264 |
$sampleissuingrule2->{chargeperiod_charge_at}, |
| 259 |
$sampleissuingrule2->{rentaldiscount}, |
265 |
$sampleissuingrule2->{rentaldiscount}, |
| 260 |
$sampleissuingrule2->{overduefinescap}, |
266 |
$sampleissuingrule2->{overduefinescap}, |
| 261 |
$sampleissuingrule2->{accountsent}, |
267 |
$sampleissuingrule2->{accountsent}, |
|
Lines 282-287
$sth->execute(
Link Here
|
| 282 |
$sampleissuingrule3->{finedays}, |
288 |
$sampleissuingrule3->{finedays}, |
| 283 |
$sampleissuingrule3->{firstremind}, |
289 |
$sampleissuingrule3->{firstremind}, |
| 284 |
$sampleissuingrule3->{chargeperiod}, |
290 |
$sampleissuingrule3->{chargeperiod}, |
|
|
291 |
$sampleissuingrule3->{chargeperiod_charge_at}, |
| 285 |
$sampleissuingrule3->{rentaldiscount}, |
292 |
$sampleissuingrule3->{rentaldiscount}, |
| 286 |
$sampleissuingrule3->{overduefinescap}, |
293 |
$sampleissuingrule3->{overduefinescap}, |
| 287 |
$sampleissuingrule3->{accountsent}, |
294 |
$sampleissuingrule3->{accountsent}, |