Lines 251-267
if ( $step == 5 ) {
Link Here
|
251 |
categorycode => $categorycode, |
251 |
categorycode => $categorycode, |
252 |
itemtype => $itemtype, |
252 |
itemtype => $itemtype, |
253 |
rules => { |
253 |
rules => { |
254 |
renewalsallowed => $renewalsallowed, |
254 |
renewalsallowed => $renewalsallowed, |
255 |
renewalperiod => $renewalperiod, |
255 |
renewalperiod => $renewalperiod, |
256 |
issuelength => $issuelength, |
256 |
issuelength => $issuelength, |
257 |
lengthunit => $lengthunit, |
257 |
lengthunit => $lengthunit, |
258 |
onshelfholds => $onshelfholds, |
258 |
onshelfholds => $onshelfholds, |
|
|
259 |
article_requests => "no", |
260 |
auto_renew => 0, |
261 |
cap_fine_to_replacement_price => 0, |
262 |
chargeperiod => 0, |
263 |
chargeperiod_charge_at => 0, |
264 |
fine => 0, |
265 |
finedays => 0, |
266 |
firstremind => 0, |
267 |
hardduedate => "", |
268 |
hardduedatecompare => -1, |
269 |
holds_per_day => undef, |
270 |
holds_per_record => 1, |
271 |
maxissueqty => "", |
272 |
maxonsiteissueqty => "", |
273 |
maxsuspensiondays => "", |
274 |
no_auto_renewal_after => "", |
275 |
no_auto_renewal_after_hard_limit => "", |
276 |
norenewalbefore => "", |
277 |
opacitemholds => "N", |
278 |
overduefinescap => "", |
279 |
rentaldiscount => 0, |
280 |
reservesallowed => 0, |
281 |
suspension_chargeperiod => undef, |
282 |
} |
283 |
}; |
284 |
|
285 |
my $params_2 = { |
286 |
branchcode => $branchcode, |
287 |
categorycode => $categorycode, |
288 |
rules => { |
289 |
patron_maxissueqty => "", |
290 |
patron_maxonsiteissueqty => "", |
291 |
max_holds => "", |
292 |
} |
293 |
}; |
294 |
|
295 |
my $params_3 = { |
296 |
branchcode => $branchcode, |
297 |
itemtype => $itemtype, |
298 |
rules => { |
299 |
holdallowed => "", |
300 |
hold_fulfillment_policy => "", |
301 |
returnbranch => "", |
259 |
} |
302 |
} |
260 |
}; |
303 |
}; |
261 |
|
304 |
|
262 |
eval { Koha::CirculationRules->set_rules( $params ) }; |
305 |
eval { |
|
|
306 |
Koha::CirculationRules->set_rules($params); |
307 |
Koha::CirculationRules->set_rules($params_2); |
308 |
Koha::CirculationRules->set_rules($params_3); |
309 |
}; |
263 |
|
310 |
|
264 |
if ($@) { |
311 |
if ($@) { |
|
|
312 |
warn $@; |
265 |
push @messages, { code => 'error_on_insert_circ_rule' }; |
313 |
push @messages, { code => 'error_on_insert_circ_rule' }; |
266 |
} else { |
314 |
} else { |
267 |
|
315 |
|
268 |
- |
|
|