Lines 402-412
sub CanBookBeReserved{
Link Here
|
402 |
if ($canReserve->{status} eq 'OK') { #We can reserve this Item! } |
402 |
if ($canReserve->{status} eq 'OK') { #We can reserve this Item! } |
403 |
|
403 |
|
404 |
current params are: |
404 |
current params are: |
405 |
'ignore_found_holds' - if true holds that have been trapped are not counted |
|
|
406 |
toward the patron limit, used by checkHighHolds to avoid counting the hold we will fill with the |
407 |
current checkout against the high holds threshold |
408 |
'ignore_hold_counts' - we use this routine to check if an item can fill a hold - on this case we |
405 |
'ignore_hold_counts' - we use this routine to check if an item can fill a hold - on this case we |
409 |
should not check if there are too many holds as we only csre about reservability |
406 |
should not check if there are too many holds as we only care about reservability |
410 |
|
407 |
|
411 |
@RETURNS { status => OK }, if the Item can be reserved. |
408 |
@RETURNS { status => OK }, if the Item can be reserved. |
412 |
{ status => ageRestricted }, if the Item is age restricted for this borrower. |
409 |
{ status => ageRestricted }, if the Item is age restricted for this borrower. |
Lines 519-525
sub CanItemBeReserved {
Link Here
|
519 |
borrowernumber => $patron->borrowernumber, |
516 |
borrowernumber => $patron->borrowernumber, |
520 |
biblionumber => $item->biblionumber, |
517 |
biblionumber => $item->biblionumber, |
521 |
}; |
518 |
}; |
522 |
$search_params->{found} = undef if $params->{ignore_found_holds}; |
|
|
523 |
my $holds = Koha::Holds->search($search_params); |
519 |
my $holds = Koha::Holds->search($search_params); |
524 |
return { status => "tooManyHoldsForThisRecord", limit => $holds_per_record } if $holds->count() >= $holds_per_record; |
520 |
return { status => "tooManyHoldsForThisRecord", limit => $holds_per_record } if $holds->count() >= $holds_per_record; |
525 |
} |
521 |
} |