# cannot reserve, their card has expired and the rules set mean this is not allowed
$template->param( message => 1, expired_patron => 1 );
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
+ exit;
}
}
if ((! $biblionumbers) && (! $query->param('place_reserve'))) {
$template->param(message=>1, no_biblionumber=>1);
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
+ exit;
}
# Pass the numbers to the page so they can be fed back
# TODO: New message?
$template->param(message=>1, no_biblionumber=>1);
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
+ exit;
}
if (($selectionCount == 0) || (($selectionCount % 3) != 0)) {
$template->param(message=>1, bad_data=>1);
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
+ exit;
}
my $failed_holds = 0;
my $rank = $biblioData->{rank};
if ( $itemNum ne '' ) {
- $canreserve = 1 if CanItemBeReserved( $borrowernumber, $itemNum )->{status} eq 'OK';
+ $canreserve = 1 if CanItemBeReserved( $borrowernumber, $itemNum, $branch )->{status} eq 'OK';
}
else {
- $canreserve = 1 if CanBookBeReserved( $borrowernumber, $biblioNum )->{status} eq 'OK';
+ $canreserve = 1 if CanBookBeReserved( $borrowernumber, $biblioNum, $branch )->{status} eq 'OK';
# Inserts a null into the 'itemnumber' field of 'reserves' table.
$itemNum = undef;
foreach my $biblioNum (@biblionumbers) {
- my $record = GetMarcBiblio({ biblionumber => $biblioNum });
# Init the bib item with the choices for branch pickup
my %biblioLoopIter;
if (! $biblioData) {
$template->param(message=>1, bad_biblionumber=>$biblioNum);
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
+ exit;
}
my @not_available_at = ();
my $frameworkcode = GetFrameworkCode( $biblioData->{biblionumber} );
$biblioLoopIter{biblionumber} = $biblioData->{biblionumber};
$biblioLoopIter{title} = $biblioData->{title};
- $biblioLoopIter{subtitle} = GetRecordValue('subtitle', $record, $frameworkcode);
+ $biblioLoopIter{subtitle} = $biblioData->{'subtitle'};
+ $biblioLoopIter{medium} = $biblioData->{medium};
+ $biblioLoopIter{part_number} = $biblioData->{part_number};
+ $biblioLoopIter{part_name} = $biblioData->{part_name};
$biblioLoopIter{author} = $biblioData->{author};
$biblioLoopIter{rank} = $biblioData->{rank};
$biblioLoopIter{reservecount} = $biblioData->{reservecount};
my $policy_holdallowed = !$itemLoopIter->{already_reserved};
$policy_holdallowed &&=
- IsAvailableForItemLevelRequest($itemInfo,$patron_unblessed) &&
+ IsAvailableForItemLevelRequest($item, $patron) &&
CanItemBeReserved( $borrowernumber, $itemNum )->{status} eq 'OK';
if ($policy_holdallowed) {