Lines 138-148
elsif ($op eq 'cud-delete-branch-cat') {
Link Here
|
138 |
); |
138 |
); |
139 |
Koha::CirculationRules->set_rules( |
139 |
Koha::CirculationRules->set_rules( |
140 |
{ |
140 |
{ |
141 |
branchcode => undef, |
141 |
branchcode => undef, |
142 |
itemtype => undef, |
142 |
itemtype => undef, |
143 |
rules => { |
143 |
rules => { |
144 |
holdallowed => undef, |
144 |
holdallowed => undef, |
145 |
hold_fulfillment_policy => undef, |
145 |
hold_fulfillment_policy => undef, |
|
|
146 |
bookings_lead_period => undef, |
147 |
bookings_trail_period => undef, |
146 |
returnbranch => undef, |
148 |
returnbranch => undef, |
147 |
} |
149 |
} |
148 |
} |
150 |
} |
Lines 174-184
elsif ($op eq 'cud-delete-branch-cat') {
Link Here
|
174 |
); |
176 |
); |
175 |
Koha::CirculationRules->set_rules( |
177 |
Koha::CirculationRules->set_rules( |
176 |
{ |
178 |
{ |
177 |
branchcode => $branch, |
179 |
branchcode => $branch, |
178 |
itemtype => undef, |
180 |
itemtype => undef, |
179 |
rules => { |
181 |
rules => { |
180 |
holdallowed => undef, |
182 |
holdallowed => undef, |
181 |
hold_fulfillment_policy => undef, |
183 |
hold_fulfillment_policy => undef, |
|
|
184 |
bookings_lead_period => undef, |
185 |
bookings_trail_period => undef, |
182 |
returnbranch => undef, |
186 |
returnbranch => undef, |
183 |
} |
187 |
} |
184 |
} |
188 |
} |
Lines 203-213
elsif ($op eq 'cud-delete-branch-item') {
Link Here
|
203 |
if ($itemtype eq "*") { |
207 |
if ($itemtype eq "*") { |
204 |
Koha::CirculationRules->set_rules( |
208 |
Koha::CirculationRules->set_rules( |
205 |
{ |
209 |
{ |
206 |
branchcode => undef, |
210 |
branchcode => undef, |
207 |
itemtype => undef, |
211 |
itemtype => undef, |
208 |
rules => { |
212 |
rules => { |
209 |
holdallowed => undef, |
213 |
holdallowed => undef, |
210 |
hold_fulfillment_policy => undef, |
214 |
hold_fulfillment_policy => undef, |
|
|
215 |
bookings_lead_period => undef, |
216 |
bookings_trail_period => undef, |
211 |
returnbranch => undef, |
217 |
returnbranch => undef, |
212 |
} |
218 |
} |
213 |
} |
219 |
} |
Lines 215-225
elsif ($op eq 'cud-delete-branch-item') {
Link Here
|
215 |
} else { |
221 |
} else { |
216 |
Koha::CirculationRules->set_rules( |
222 |
Koha::CirculationRules->set_rules( |
217 |
{ |
223 |
{ |
218 |
branchcode => undef, |
224 |
branchcode => undef, |
219 |
itemtype => $itemtype, |
225 |
itemtype => $itemtype, |
220 |
rules => { |
226 |
rules => { |
221 |
holdallowed => undef, |
227 |
holdallowed => undef, |
222 |
hold_fulfillment_policy => undef, |
228 |
hold_fulfillment_policy => undef, |
|
|
229 |
bookings_lead_period => undef, |
230 |
bookings_trail_period => undef, |
223 |
returnbranch => undef, |
231 |
returnbranch => undef, |
224 |
} |
232 |
} |
225 |
} |
233 |
} |
Lines 228-238
elsif ($op eq 'cud-delete-branch-item') {
Link Here
|
228 |
} elsif ($itemtype eq "*") { |
236 |
} elsif ($itemtype eq "*") { |
229 |
Koha::CirculationRules->set_rules( |
237 |
Koha::CirculationRules->set_rules( |
230 |
{ |
238 |
{ |
231 |
branchcode => $branch, |
239 |
branchcode => $branch, |
232 |
itemtype => undef, |
240 |
itemtype => undef, |
233 |
rules => { |
241 |
rules => { |
234 |
holdallowed => undef, |
242 |
holdallowed => undef, |
235 |
hold_fulfillment_policy => undef, |
243 |
hold_fulfillment_policy => undef, |
|
|
244 |
bookings_lead_period => undef, |
245 |
bookings_trail_period => undef, |
236 |
returnbranch => undef, |
246 |
returnbranch => undef, |
237 |
} |
247 |
} |
238 |
} |
248 |
} |
Lines 240-250
elsif ($op eq 'cud-delete-branch-item') {
Link Here
|
240 |
} else { |
250 |
} else { |
241 |
Koha::CirculationRules->set_rules( |
251 |
Koha::CirculationRules->set_rules( |
242 |
{ |
252 |
{ |
243 |
branchcode => $branch, |
253 |
branchcode => $branch, |
244 |
itemtype => $itemtype, |
254 |
itemtype => $itemtype, |
245 |
rules => { |
255 |
rules => { |
246 |
holdallowed => undef, |
256 |
holdallowed => undef, |
247 |
hold_fulfillment_policy => undef, |
257 |
hold_fulfillment_policy => undef, |
|
|
258 |
bookings_lead_period => undef, |
259 |
bookings_trail_period => undef, |
248 |
returnbranch => undef, |
260 |
returnbranch => undef, |
249 |
} |
261 |
} |
250 |
} |
262 |
} |
Lines 357-379
elsif ( $op eq 'cud-add' ) {
Link Here
|
357 |
|
369 |
|
358 |
} |
370 |
} |
359 |
elsif ($op eq "cud-set-branch-defaults") { |
371 |
elsif ($op eq "cud-set-branch-defaults") { |
360 |
my $categorycode = $input->param('categorycode'); |
372 |
my $categorycode = $input->param('categorycode'); |
361 |
my $patron_maxissueqty = strip_non_numeric( scalar $input->param('patron_maxissueqty') ); |
373 |
my $patron_maxissueqty = strip_non_numeric( scalar $input->param('patron_maxissueqty') ); |
362 |
my $patron_maxonsiteissueqty = $input->param('patron_maxonsiteissueqty'); |
374 |
my $patron_maxonsiteissueqty = $input->param('patron_maxonsiteissueqty'); |
363 |
$patron_maxonsiteissueqty = strip_non_numeric($patron_maxonsiteissueqty); |
375 |
$patron_maxonsiteissueqty = strip_non_numeric($patron_maxonsiteissueqty); |
364 |
my $holdallowed = $input->param('holdallowed'); |
376 |
my $holdallowed = $input->param('holdallowed'); |
365 |
my $hold_fulfillment_policy = $input->param('hold_fulfillment_policy'); |
377 |
my $hold_fulfillment_policy = $input->param('hold_fulfillment_policy'); |
366 |
my $returnbranch = $input->param('returnbranch'); |
378 |
my $bookings_lead_period = $input->param('bookings_lead_period'); |
367 |
my $max_holds = strip_non_numeric( scalar $input->param('max_holds') ); |
379 |
my $bookings_trail_period = $input->param('bookings_trail_period'); |
|
|
380 |
my $returnbranch = $input->param('returnbranch'); |
381 |
my $max_holds = strip_non_numeric( scalar $input->param('max_holds') ); |
368 |
|
382 |
|
369 |
if ($branch eq "*") { |
383 |
if ($branch eq "*") { |
370 |
Koha::CirculationRules->set_rules( |
384 |
Koha::CirculationRules->set_rules( |
371 |
{ |
385 |
{ |
372 |
itemtype => undef, |
386 |
itemtype => undef, |
373 |
branchcode => undef, |
387 |
branchcode => undef, |
374 |
rules => { |
388 |
rules => { |
375 |
holdallowed => $holdallowed, |
389 |
holdallowed => $holdallowed, |
376 |
hold_fulfillment_policy => $hold_fulfillment_policy, |
390 |
hold_fulfillment_policy => $hold_fulfillment_policy, |
|
|
391 |
bookings_lead_period => $bookings_lead_period, |
392 |
bookings_trail_period => $bookings_trail_period, |
377 |
returnbranch => $returnbranch, |
393 |
returnbranch => $returnbranch, |
378 |
} |
394 |
} |
379 |
} |
395 |
} |
Lines 391-401
elsif ($op eq "cud-set-branch-defaults") {
Link Here
|
391 |
} else { |
407 |
} else { |
392 |
Koha::CirculationRules->set_rules( |
408 |
Koha::CirculationRules->set_rules( |
393 |
{ |
409 |
{ |
394 |
itemtype => undef, |
410 |
itemtype => undef, |
395 |
branchcode => $branch, |
411 |
branchcode => $branch, |
396 |
rules => { |
412 |
rules => { |
397 |
holdallowed => $holdallowed, |
413 |
holdallowed => $holdallowed, |
398 |
hold_fulfillment_policy => $hold_fulfillment_policy, |
414 |
hold_fulfillment_policy => $hold_fulfillment_policy, |
|
|
415 |
bookings_lead_period => $bookings_lead_period, |
416 |
bookings_trail_period => $bookings_trail_period, |
399 |
returnbranch => $returnbranch, |
417 |
returnbranch => $returnbranch, |
400 |
} |
418 |
} |
401 |
} |
419 |
} |
Lines 584-600
elsif ($op eq "cud-add-branch-item") {
Link Here
|
584 |
my $itemtype = $input->param('itemtype'); |
602 |
my $itemtype = $input->param('itemtype'); |
585 |
my $holdallowed = $input->param('holdallowed'); |
603 |
my $holdallowed = $input->param('holdallowed'); |
586 |
my $hold_fulfillment_policy = $input->param('hold_fulfillment_policy'); |
604 |
my $hold_fulfillment_policy = $input->param('hold_fulfillment_policy'); |
|
|
605 |
my $bookings_lead_period = $input->param('bookings_lead_period'); |
606 |
my $bookings_trail_period = $input->param('bookings_trail_period'); |
587 |
my $returnbranch = $input->param('returnbranch'); |
607 |
my $returnbranch = $input->param('returnbranch'); |
588 |
|
608 |
|
589 |
if ($branch eq "*") { |
609 |
if ($branch eq "*") { |
590 |
if ($itemtype eq "*") { |
610 |
if ($itemtype eq "*") { |
591 |
Koha::CirculationRules->set_rules( |
611 |
Koha::CirculationRules->set_rules( |
592 |
{ |
612 |
{ |
593 |
itemtype => undef, |
613 |
itemtype => undef, |
594 |
branchcode => undef, |
614 |
branchcode => undef, |
595 |
rules => { |
615 |
rules => { |
596 |
holdallowed => $holdallowed, |
616 |
holdallowed => $holdallowed, |
597 |
hold_fulfillment_policy => $hold_fulfillment_policy, |
617 |
hold_fulfillment_policy => $hold_fulfillment_policy, |
|
|
618 |
bookings_lead_period => $bookings_lead_period, |
619 |
bookings_trail_period => $bookings_trail_period, |
598 |
returnbranch => $returnbranch, |
620 |
returnbranch => $returnbranch, |
599 |
} |
621 |
} |
600 |
} |
622 |
} |
Lines 602-612
elsif ($op eq "cud-add-branch-item") {
Link Here
|
602 |
} else { |
624 |
} else { |
603 |
Koha::CirculationRules->set_rules( |
625 |
Koha::CirculationRules->set_rules( |
604 |
{ |
626 |
{ |
605 |
itemtype => $itemtype, |
627 |
itemtype => $itemtype, |
606 |
branchcode => undef, |
628 |
branchcode => undef, |
607 |
rules => { |
629 |
rules => { |
608 |
holdallowed => $holdallowed, |
630 |
holdallowed => $holdallowed, |
609 |
hold_fulfillment_policy => $hold_fulfillment_policy, |
631 |
hold_fulfillment_policy => $hold_fulfillment_policy, |
|
|
632 |
bookings_lead_period => $bookings_lead_period, |
633 |
bookings_trail_period => $bookings_trail_period, |
610 |
returnbranch => $returnbranch, |
634 |
returnbranch => $returnbranch, |
611 |
} |
635 |
} |
612 |
} |
636 |
} |
Lines 615-625
elsif ($op eq "cud-add-branch-item") {
Link Here
|
615 |
} elsif ($itemtype eq "*") { |
639 |
} elsif ($itemtype eq "*") { |
616 |
Koha::CirculationRules->set_rules( |
640 |
Koha::CirculationRules->set_rules( |
617 |
{ |
641 |
{ |
618 |
itemtype => undef, |
642 |
itemtype => undef, |
619 |
branchcode => $branch, |
643 |
branchcode => $branch, |
620 |
rules => { |
644 |
rules => { |
621 |
holdallowed => $holdallowed, |
645 |
holdallowed => $holdallowed, |
622 |
hold_fulfillment_policy => $hold_fulfillment_policy, |
646 |
hold_fulfillment_policy => $hold_fulfillment_policy, |
|
|
647 |
bookings_lead_period => $bookings_lead_period, |
648 |
bookings_trail_period => $bookings_trail_period, |
623 |
returnbranch => $returnbranch, |
649 |
returnbranch => $returnbranch, |
624 |
} |
650 |
} |
625 |
} |
651 |
} |
Lines 627-637
elsif ($op eq "cud-add-branch-item") {
Link Here
|
627 |
} else { |
653 |
} else { |
628 |
Koha::CirculationRules->set_rules( |
654 |
Koha::CirculationRules->set_rules( |
629 |
{ |
655 |
{ |
630 |
itemtype => $itemtype, |
656 |
itemtype => $itemtype, |
631 |
branchcode => $branch, |
657 |
branchcode => $branch, |
632 |
rules => { |
658 |
rules => { |
633 |
holdallowed => $holdallowed, |
659 |
holdallowed => $holdallowed, |
634 |
hold_fulfillment_policy => $hold_fulfillment_policy, |
660 |
hold_fulfillment_policy => $hold_fulfillment_policy, |
|
|
661 |
bookings_lead_period => $bookings_lead_period, |
662 |
bookings_trail_period => $bookings_trail_period, |
635 |
returnbranch => $returnbranch, |
663 |
returnbranch => $returnbranch, |
636 |
} |
664 |
} |
637 |
} |
665 |
} |