|
Lines 224-235
elsif ($op eq "set-branch-defaults") {
Link Here
|
| 224 |
my $holdallowed = $input->param('holdallowed'); |
224 |
my $holdallowed = $input->param('holdallowed'); |
| 225 |
my $hold_fulfillment_policy = $input->param('hold_fulfillment_policy'); |
225 |
my $hold_fulfillment_policy = $input->param('hold_fulfillment_policy'); |
| 226 |
my $returnbranch = $input->param('returnbranch'); |
226 |
my $returnbranch = $input->param('returnbranch'); |
|
|
227 |
my $max_holds = $input->param('max_holds'); |
| 227 |
$maxissueqty =~ s/\s//g; |
228 |
$maxissueqty =~ s/\s//g; |
| 228 |
$maxissueqty = undef if $maxissueqty !~ /^\d+/; |
229 |
$maxissueqty = undef if $maxissueqty !~ /^\d+/; |
| 229 |
$maxonsiteissueqty =~ s/\s//g; |
230 |
$maxonsiteissueqty =~ s/\s//g; |
| 230 |
$maxonsiteissueqty = undef if $maxonsiteissueqty !~ /^\d+/; |
231 |
$maxonsiteissueqty = undef if $maxonsiteissueqty !~ /^\d+/; |
| 231 |
$holdallowed =~ s/\s//g; |
232 |
$holdallowed =~ s/\s//g; |
| 232 |
$holdallowed = undef if $holdallowed !~ /^\d+/; |
233 |
$holdallowed = undef if $holdallowed !~ /^\d+/; |
|
|
234 |
$max_holds =~ s/\s//g; |
| 235 |
$max_holds = undef if $max_holds !~ /^\d+/; |
| 233 |
|
236 |
|
| 234 |
if ($branch eq "*") { |
237 |
if ($branch eq "*") { |
| 235 |
my $sth_search = $dbh->prepare("SELECT count(*) AS total |
238 |
my $sth_search = $dbh->prepare("SELECT count(*) AS total |
|
Lines 265-270
elsif ($op eq "set-branch-defaults") {
Link Here
|
| 265 |
$sth_insert->execute($branch, $maxissueqty, $maxonsiteissueqty, $holdallowed, $hold_fulfillment_policy, $returnbranch); |
268 |
$sth_insert->execute($branch, $maxissueqty, $maxonsiteissueqty, $holdallowed, $hold_fulfillment_policy, $returnbranch); |
| 266 |
} |
269 |
} |
| 267 |
} |
270 |
} |
|
|
271 |
Koha::CirculationRules->set_rule( |
| 272 |
{ |
| 273 |
branchcode => $branch, |
| 274 |
categorycode => '*', |
| 275 |
itemtype => undef, |
| 276 |
rule_name => 'max_holds', |
| 277 |
rule_value => $max_holds, |
| 278 |
} |
| 279 |
); |
| 268 |
} |
280 |
} |
| 269 |
elsif ($op eq "add-branch-cat") { |
281 |
elsif ($op eq "add-branch-cat") { |
| 270 |
my $categorycode = $input->param('categorycode'); |
282 |
my $categorycode = $input->param('categorycode'); |
|
Lines 337-343
elsif ($op eq "add-branch-cat") {
Link Here
|
| 337 |
|
349 |
|
| 338 |
Koha::CirculationRules->set_rule( |
350 |
Koha::CirculationRules->set_rule( |
| 339 |
{ |
351 |
{ |
| 340 |
branchcode => undef, |
352 |
branchcode => '*', |
| 341 |
categorycode => $categorycode, |
353 |
categorycode => $categorycode, |
| 342 |
itemtype => undef, |
354 |
itemtype => undef, |
| 343 |
rule_name => 'max_holds', |
355 |
rule_name => 'max_holds', |