Lines 351-361
sub CanBookBeReserved{
Link Here
|
351 |
if ($canReserve->{status} eq 'OK') { #We can reserve this Item! } |
351 |
if ($canReserve->{status} eq 'OK') { #We can reserve this Item! } |
352 |
|
352 |
|
353 |
current params are: |
353 |
current params are: |
354 |
'ignore_found_holds' - if true holds that have been trapped are not counted |
|
|
355 |
toward the patron limit, used by checkHighHolds to avoid counting the hold we will fill with the |
356 |
current checkout against the high holds threshold |
357 |
'ignore_hold_counts' - we use this routine to check if an item can fill a hold - on this case we |
354 |
'ignore_hold_counts' - we use this routine to check if an item can fill a hold - on this case we |
358 |
should not check if there are too many holds as we only csre about reservability |
355 |
should not check if there are too many holds as we only care about reservability |
359 |
|
356 |
|
360 |
@RETURNS { status => OK }, if the Item can be reserved. |
357 |
@RETURNS { status => OK }, if the Item can be reserved. |
361 |
{ status => ageRestricted }, if the Item is age restricted for this borrower. |
358 |
{ status => ageRestricted }, if the Item is age restricted for this borrower. |
Lines 457-463
sub CanItemBeReserved {
Link Here
|
457 |
borrowernumber => $borrowernumber, |
454 |
borrowernumber => $borrowernumber, |
458 |
biblionumber => $item->biblionumber, |
455 |
biblionumber => $item->biblionumber, |
459 |
}; |
456 |
}; |
460 |
$search_params->{found} = undef if $params->{ignore_found_holds}; |
|
|
461 |
|
457 |
|
462 |
my $holds = Koha::Holds->search($search_params); |
458 |
my $holds = Koha::Holds->search($search_params); |
463 |
if ( defined $holds_per_record && $holds_per_record ne '' ){ |
459 |
if ( defined $holds_per_record && $holds_per_record ne '' ){ |