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