FROM reserves
WHERE found IS NULL
AND priority > 0
- AND reservedate <= CURRENT_DATE()";
+ AND reservedate <= CURRENT_DATE()
+ AND suspend = 0
+ ";
my $sth = $dbh->prepare($bib_query);
$sth->execute();
AND found IS NULL
AND priority > 0
AND reservedate <= CURRENT_DATE()
+ AND suspend = 0
ORDER BY priority";
my $sth = $dbh->prepare($request_query);
$sth->execute($biblionumber);
foreach my $item (@$available_items) {
next unless $item->{holdallowed};
- push @{ $items_by_branch{ $automatic_return ? $item->{homebranch}
- : $item->{holdingbranch} } }, $item
+ push @{ $items_by_branch{ $item->{holdingbranch} } }, $item
unless exists $allocated_items{ $item->{itemnumber} };
}
- return unless keys %items_by_branch;
+ return \%item_map unless keys %items_by_branch;
# now handle the title-level requests
$num_items_remaining = scalar(@$available_items) - scalar(keys %allocated_items);