Lines 108-195
$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 |
onshelfholds => 0, |
135 |
maxsuspensiondays => 0, |
136 |
opacitemholds => 'N', |
136 |
onshelfholds => 0, |
|
|
137 |
opacitemholds => 'N', |
137 |
}; |
138 |
}; |
138 |
my $sampleissuingrule2 = { |
139 |
my $sampleissuingrule2 = { |
139 |
branchcode => $samplebranch2->{branchcode}, |
140 |
branchcode => $samplebranch2->{branchcode}, |
140 |
categorycode => $samplecat->{categorycode}, |
141 |
categorycode => $samplecat->{categorycode}, |
141 |
itemtype => 'BOOK', |
142 |
itemtype => 'BOOK', |
142 |
maxissueqty => 2, |
143 |
maxissueqty => 2, |
143 |
renewalsallowed => 'Null', |
144 |
renewalsallowed => 'Null', |
144 |
renewalperiod => 2, |
145 |
renewalperiod => 2, |
145 |
norenewalbefore => 7, |
146 |
norenewalbefore => 7, |
146 |
auto_renew => 0, |
147 |
auto_renew => 0, |
147 |
reservesallowed => 'Null', |
148 |
reservesallowed => 'Null', |
148 |
issuelength => 2, |
149 |
issuelength => 2, |
149 |
lengthunit => 'Null', |
150 |
lengthunit => 'Null', |
150 |
hardduedate => 2, |
151 |
hardduedate => 2, |
151 |
hardduedatecompare => 'Null', |
152 |
hardduedatecompare => 'Null', |
152 |
fine => 'Null', |
153 |
fine => 'Null', |
153 |
finedays => 'Null', |
154 |
finedays => 'Null', |
154 |
firstremind => 'Null', |
155 |
firstremind => 'Null', |
155 |
chargeperiod => 'Null', |
156 |
chargeperiod => 'Null', |
156 |
rentaldiscount => 2.00, |
157 |
chargeperiod_charge_at => 0, |
157 |
overduefinescap => 'Null', |
158 |
rentaldiscount => 2.00, |
158 |
accountsent => 'Null', |
159 |
overduefinescap => 'Null', |
159 |
reservecharge => 'Null', |
160 |
accountsent => 'Null', |
160 |
chargename => 'Null', |
161 |
reservecharge => 'Null', |
161 |
restrictedtype => 'Null', |
162 |
chargename => 'Null', |
162 |
maxsuspensiondays => 0, |
163 |
restrictedtype => 'Null', |
163 |
onshelfholds => 1, |
164 |
maxsuspensiondays => 0, |
164 |
opacitemholds => 'Y', |
165 |
onshelfholds => 1, |
|
|
166 |
opacitemholds => 'Y', |
165 |
}; |
167 |
}; |
166 |
my $sampleissuingrule3 = { |
168 |
my $sampleissuingrule3 = { |
167 |
branchcode => $samplebranch1->{branchcode}, |
169 |
branchcode => $samplebranch1->{branchcode}, |
168 |
categorycode => $samplecat->{categorycode}, |
170 |
categorycode => $samplecat->{categorycode}, |
169 |
itemtype => 'DVD', |
171 |
itemtype => 'DVD', |
170 |
maxissueqty => 3, |
172 |
maxissueqty => 3, |
171 |
renewalsallowed => 'Null', |
173 |
renewalsallowed => 'Null', |
172 |
renewalperiod => 3, |
174 |
renewalperiod => 3, |
173 |
norenewalbefore => 8, |
175 |
norenewalbefore => 8, |
174 |
auto_renew => 0, |
176 |
auto_renew => 0, |
175 |
reservesallowed => 'Null', |
177 |
reservesallowed => 'Null', |
176 |
issuelength => 3, |
178 |
issuelength => 3, |
177 |
lengthunit => 'Null', |
179 |
lengthunit => 'Null', |
178 |
hardduedate => 3, |
180 |
hardduedate => 3, |
179 |
hardduedatecompare => 'Null', |
181 |
hardduedatecompare => 'Null', |
180 |
fine => 'Null', |
182 |
fine => 'Null', |
181 |
finedays => 'Null', |
183 |
finedays => 'Null', |
182 |
firstremind => 'Null', |
184 |
firstremind => 'Null', |
183 |
chargeperiod => 'Null', |
185 |
chargeperiod => 'Null', |
184 |
rentaldiscount => 3.00, |
186 |
chargeperiod_charge_at => 0, |
185 |
overduefinescap => 'Null', |
187 |
rentaldiscount => 3.00, |
186 |
accountsent => 'Null', |
188 |
overduefinescap => 'Null', |
187 |
reservecharge => 'Null', |
189 |
accountsent => 'Null', |
188 |
chargename => 'Null', |
190 |
reservecharge => 'Null', |
189 |
restrictedtype => 'Null', |
191 |
chargename => 'Null', |
190 |
maxsuspensiondays => 0, |
192 |
restrictedtype => 'Null', |
191 |
onshelfholds => 1, |
193 |
maxsuspensiondays => 0, |
192 |
opacitemholds => 'F', |
194 |
onshelfholds => 1, |
|
|
195 |
opacitemholds => 'F', |
193 |
}; |
196 |
}; |
194 |
$query = 'INSERT INTO issuingrules ( |
197 |
$query = 'INSERT INTO issuingrules ( |
195 |
branchcode, |
198 |
branchcode, |
Lines 209-214
$query = 'INSERT INTO issuingrules (
Link Here
|
209 |
finedays, |
212 |
finedays, |
210 |
firstremind, |
213 |
firstremind, |
211 |
chargeperiod, |
214 |
chargeperiod, |
|
|
215 |
chargeperiod_charge_at, |
212 |
rentaldiscount, |
216 |
rentaldiscount, |
213 |
overduefinescap, |
217 |
overduefinescap, |
214 |
accountsent, |
218 |
accountsent, |
Lines 216-222
$query = 'INSERT INTO issuingrules (
Link Here
|
216 |
chargename, |
220 |
chargename, |
217 |
restrictedtype, |
221 |
restrictedtype, |
218 |
maxsuspensiondays |
222 |
maxsuspensiondays |
219 |
) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)'; |
223 |
) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)'; |
220 |
my $sth = $dbh->prepare($query); |
224 |
my $sth = $dbh->prepare($query); |
221 |
$sth->execute( |
225 |
$sth->execute( |
222 |
$sampleissuingrule1->{branchcode}, |
226 |
$sampleissuingrule1->{branchcode}, |
Lines 236-241
$sth->execute(
Link Here
|
236 |
$sampleissuingrule1->{finedays}, |
240 |
$sampleissuingrule1->{finedays}, |
237 |
$sampleissuingrule1->{firstremind}, |
241 |
$sampleissuingrule1->{firstremind}, |
238 |
$sampleissuingrule1->{chargeperiod}, |
242 |
$sampleissuingrule1->{chargeperiod}, |
|
|
243 |
$sampleissuingrule1->{chargeperiod_charge_at}, |
239 |
$sampleissuingrule1->{rentaldiscount}, |
244 |
$sampleissuingrule1->{rentaldiscount}, |
240 |
$sampleissuingrule1->{overduefinescap}, |
245 |
$sampleissuingrule1->{overduefinescap}, |
241 |
$sampleissuingrule1->{accountsent}, |
246 |
$sampleissuingrule1->{accountsent}, |
Lines 262-267
$sth->execute(
Link Here
|
262 |
$sampleissuingrule2->{finedays}, |
267 |
$sampleissuingrule2->{finedays}, |
263 |
$sampleissuingrule2->{firstremind}, |
268 |
$sampleissuingrule2->{firstremind}, |
264 |
$sampleissuingrule2->{chargeperiod}, |
269 |
$sampleissuingrule2->{chargeperiod}, |
|
|
270 |
$sampleissuingrule2->{chargeperiod_charge_at}, |
265 |
$sampleissuingrule2->{rentaldiscount}, |
271 |
$sampleissuingrule2->{rentaldiscount}, |
266 |
$sampleissuingrule2->{overduefinescap}, |
272 |
$sampleissuingrule2->{overduefinescap}, |
267 |
$sampleissuingrule2->{accountsent}, |
273 |
$sampleissuingrule2->{accountsent}, |
Lines 288-293
$sth->execute(
Link Here
|
288 |
$sampleissuingrule3->{finedays}, |
294 |
$sampleissuingrule3->{finedays}, |
289 |
$sampleissuingrule3->{firstremind}, |
295 |
$sampleissuingrule3->{firstremind}, |
290 |
$sampleissuingrule3->{chargeperiod}, |
296 |
$sampleissuingrule3->{chargeperiod}, |
|
|
297 |
$sampleissuingrule3->{chargeperiod_charge_at}, |
291 |
$sampleissuingrule3->{rentaldiscount}, |
298 |
$sampleissuingrule3->{rentaldiscount}, |
292 |
$sampleissuingrule3->{overduefinescap}, |
299 |
$sampleissuingrule3->{overduefinescap}, |
293 |
$sampleissuingrule3->{accountsent}, |
300 |
$sampleissuingrule3->{accountsent}, |