Lines 287-293
if ( $query->param('place_reserve') ) {
Link Here
|
287 |
} |
287 |
} |
288 |
|
288 |
|
289 |
unless ( $can_place_hold_if_available_at_pickup ) { |
289 |
unless ( $can_place_hold_if_available_at_pickup ) { |
290 |
$canreserve = 0 if Koha::Items->search({ biblionumber => $biblioNum, holdingbranch => $branch })->count; |
290 |
my $items_in_this_library = Koha::Items->search({ biblionumber => $biblioNum, holdingbranch => $branch }); |
|
|
291 |
my $nb_of_items_issued = $items_in_this_library->search({ 'issue.itemnumber' => { not => undef }}, { join => 'issue' })->count; |
292 |
if ( $items_in_this_library->count > $nb_of_items_issued ) { |
293 |
$canreserve = 0 |
294 |
} |
291 |
} |
295 |
} |
292 |
|
296 |
|
293 |
my $itemtype = $query->param('itemtype') || undef; |
297 |
my $itemtype = $query->param('itemtype') || undef; |
Lines 535-541
foreach my $biblioNum (@biblionumbers) {
Link Here
|
535 |
$numCopiesAvailable++; |
539 |
$numCopiesAvailable++; |
536 |
|
540 |
|
537 |
unless ( $can_place_hold_if_available_at_pickup ) { |
541 |
unless ( $can_place_hold_if_available_at_pickup ) { |
538 |
push @not_available_at, $itemInfo->{holdingbranch}; |
542 |
my $items_in_this_library = Koha::Items->search({ biblionumber => $itemInfo->{biblionumber}, holdingbranch => $itemInfo->{holdingbranch} }); |
|
|
543 |
my $nb_of_items_issued = $items_in_this_library->search({ 'issue.itemnumber' => { not => undef }}, { join => 'issue' })->count; |
544 |
if ( $items_in_this_library->count > $nb_of_items_issued ) { |
545 |
push @not_available_at, $itemInfo->{holdingbranch}; |
546 |
} |
539 |
} |
547 |
} |
540 |
} |
548 |
} |
541 |
|
549 |
|
542 |
- |
|
|