Lines 220-231
elsif ($op eq "set-branch-defaults") {
Link Here
|
220 |
my $holdallowed = $input->param('holdallowed'); |
220 |
my $holdallowed = $input->param('holdallowed'); |
221 |
my $hold_fulfillment_policy = $input->param('hold_fulfillment_policy'); |
221 |
my $hold_fulfillment_policy = $input->param('hold_fulfillment_policy'); |
222 |
my $returnbranch = $input->param('returnbranch'); |
222 |
my $returnbranch = $input->param('returnbranch'); |
|
|
223 |
my $max_holds = $input->param('max_holds'); |
223 |
$maxissueqty =~ s/\s//g; |
224 |
$maxissueqty =~ s/\s//g; |
224 |
$maxissueqty = undef if $maxissueqty !~ /^\d+/; |
225 |
$maxissueqty = undef if $maxissueqty !~ /^\d+/; |
225 |
$maxonsiteissueqty =~ s/\s//g; |
226 |
$maxonsiteissueqty =~ s/\s//g; |
226 |
$maxonsiteissueqty = undef if $maxonsiteissueqty !~ /^\d+/; |
227 |
$maxonsiteissueqty = undef if $maxonsiteissueqty !~ /^\d+/; |
227 |
$holdallowed =~ s/\s//g; |
228 |
$holdallowed =~ s/\s//g; |
228 |
$holdallowed = undef if $holdallowed !~ /^\d+/; |
229 |
$holdallowed = undef if $holdallowed !~ /^\d+/; |
|
|
230 |
$max_holds =~ s/\s//g; |
231 |
$max_holds = undef if $max_holds !~ /^\d+/; |
229 |
|
232 |
|
230 |
if ($branch eq "*") { |
233 |
if ($branch eq "*") { |
231 |
my $sth_search = $dbh->prepare("SELECT count(*) AS total |
234 |
my $sth_search = $dbh->prepare("SELECT count(*) AS total |
Lines 261-266
elsif ($op eq "set-branch-defaults") {
Link Here
|
261 |
$sth_insert->execute($branch, $maxissueqty, $maxonsiteissueqty, $holdallowed, $hold_fulfillment_policy, $returnbranch); |
264 |
$sth_insert->execute($branch, $maxissueqty, $maxonsiteissueqty, $holdallowed, $hold_fulfillment_policy, $returnbranch); |
262 |
} |
265 |
} |
263 |
} |
266 |
} |
|
|
267 |
Koha::CirculationRules->set_rule( |
268 |
{ |
269 |
branchcode => $branch, |
270 |
categorycode => '*', |
271 |
itemtype => undef, |
272 |
rule_name => 'max_holds', |
273 |
rule_value => $max_holds, |
274 |
} |
275 |
); |
264 |
} |
276 |
} |
265 |
elsif ($op eq "add-branch-cat") { |
277 |
elsif ($op eq "add-branch-cat") { |
266 |
my $categorycode = $input->param('categorycode'); |
278 |
my $categorycode = $input->param('categorycode'); |
Lines 333-339
elsif ($op eq "add-branch-cat") {
Link Here
|
333 |
|
345 |
|
334 |
Koha::CirculationRules->set_rule( |
346 |
Koha::CirculationRules->set_rule( |
335 |
{ |
347 |
{ |
336 |
branchcode => undef, |
348 |
branchcode => '*', |
337 |
categorycode => $categorycode, |
349 |
categorycode => $categorycode, |
338 |
itemtype => undef, |
350 |
itemtype => undef, |
339 |
rule_name => 'max_holds', |
351 |
rule_name => 'max_holds', |