Lines 457-462
elsif ($op eq "add-branch-cat") {
Link Here
|
457 |
); |
457 |
); |
458 |
} |
458 |
} |
459 |
} |
459 |
} |
|
|
460 |
elsif ( $op eq "add-max-daily-article-requests" ) { |
461 |
my $categorycode = $input->param('categorycode'); |
462 |
my $max_daily_article_requests = strip_non_numeric( scalar $input->param('max_daily_article_requests') ); |
463 |
|
464 |
if ( $branch eq "*" ) { |
465 |
if ( $categorycode eq "*" ) { |
466 |
Koha::CirculationRules->set_rules( |
467 |
{ categorycode => undef, |
468 |
branchcode => undef, |
469 |
rules => { max_daily_article_requests => $max_daily_article_requests, } |
470 |
} |
471 |
); |
472 |
} else { |
473 |
Koha::CirculationRules->set_rules( |
474 |
{ categorycode => $categorycode, |
475 |
branchcode => undef, |
476 |
rules => { max_daily_article_requests => $max_daily_article_requests, } |
477 |
} |
478 |
); |
479 |
} |
480 |
} elsif ( $categorycode eq "*" ) { |
481 |
Koha::CirculationRules->set_rules( |
482 |
{ categorycode => undef, |
483 |
branchcode => $branch, |
484 |
rules => { max_daily_article_requests => $max_daily_article_requests, } |
485 |
} |
486 |
); |
487 |
} else { |
488 |
Koha::CirculationRules->set_rules( |
489 |
{ categorycode => $categorycode, |
490 |
branchcode => $branch, |
491 |
rules => { max_daily_article_requests => $max_daily_article_requests, } |
492 |
} |
493 |
); |
494 |
} |
495 |
} elsif ( $op eq 'del-max-daily-article-requests' ) { |
496 |
my $categorycode = $input->param('categorycode'); |
497 |
if ( $branch eq "*" ) { |
498 |
if ( $categorycode eq "*" ) { |
499 |
Koha::CirculationRules->set_rules( |
500 |
{ branchcode => undef, |
501 |
categorycode => undef, |
502 |
rules => { max_daily_article_requests => undef, } |
503 |
} |
504 |
); |
505 |
} else { |
506 |
Koha::CirculationRules->set_rules( |
507 |
{ categorycode => $categorycode, |
508 |
branchcode => undef, |
509 |
rules => { max_daily_article_requests => undef, } |
510 |
} |
511 |
); |
512 |
} |
513 |
} elsif ( $categorycode eq "*" ) { |
514 |
Koha::CirculationRules->set_rules( |
515 |
{ branchcode => $branch, |
516 |
categorycode => undef, |
517 |
rules => { max_daily_article_requests => undef, } |
518 |
} |
519 |
); |
520 |
} else { |
521 |
Koha::CirculationRules->set_rules( |
522 |
{ categorycode => $categorycode, |
523 |
branchcode => $branch, |
524 |
rules => { max_daily_article_requests => undef, } |
525 |
} |
526 |
); |
527 |
} |
528 |
} |
460 |
elsif ($op eq "add-branch-item") { |
529 |
elsif ($op eq "add-branch-item") { |
461 |
my $itemtype = $input->param('itemtype'); |
530 |
my $itemtype = $input->param('itemtype'); |
462 |
my $holdallowed = $input->param('holdallowed'); |
531 |
my $holdallowed = $input->param('holdallowed'); |