query => $query,
type => "opac",
authnotrequired => 0,
- flagsrequired => { borrow => 1 },
debug => 1,
}
);
&get_out($query, $cookie, $template->output);
}
+ my $failed_holds = 0;
while (@selectedItems) {
my $biblioNum = shift(@selectedItems);
my $itemNum = shift(@selectedItems);
# Here we actually do the reserveration. Stage 3.
if ($canreserve) {
- AddReserve(
+ my $reserve_id = AddReserve(
$branch, $borrowernumber,
- $biblioNum, 'a',
+ $biblioNum,
[$biblioNum], $rank,
$startdate, $expiration_date,
$notes, $biblioData->{title},
$itemNum, $found
);
+ $failed_holds++ unless $reserve_id;
++$reserve_cnt;
}
}
- print $query->redirect("/cgi-bin/koha/opac-user.pl#opac-user-holds");
+ print $query->redirect("/cgi-bin/koha/opac-user.pl?" . ( $failed_holds ? "failed_holds=$failed_holds" : q|| ) . "#opac-user-holds");
exit;
}
$biblioLoopIter{mandatorynotes}=0; #FIXME: For future use
if (!$itemLevelTypes && $biblioData->{itemtype}) {
- $biblioLoopIter{description} = $itemTypes->{$biblioData->{itemtype}}{description};
+ $biblioLoopIter{translated_description} = $itemTypes->{$biblioData->{itemtype}}{translated_description};
$biblioLoopIter{imageurl} = getitemtypeimagesrc() . "/". $itemTypes->{$biblioData->{itemtype}}{imageurl};
}
foreach my $itemInfo (@{$biblioData->{itemInfos}}) {
- $debug and warn $itemInfo->{'notforloan'};
-
- # Get reserve fee.
- my $fee = GetReserveFee(undef, $borrowernumber, $itemInfo->{'biblionumber'}, 'a',
- ( $itemInfo->{'biblioitemnumber'} ) );
- $itemInfo->{'reservefee'} = sprintf "%.02f", ($fee ? $fee : 0.0);
-
if ($itemLevelTypes && $itemInfo->{itype}) {
- $itemInfo->{description} = $itemTypes->{$itemInfo->{itype}}{description};
+ $itemInfo->{translated_description} = $itemTypes->{$itemInfo->{itype}}{translated_description};
$itemInfo->{imageurl} = getitemtypeimagesrc() . "/". $itemTypes->{$itemInfo->{itype}}{imageurl};
}
$itemLoopIter->{enumchron} = $itemInfo->{enumchron};
$itemLoopIter->{copynumber} = $itemInfo->{copynumber};
if ($itemLevelTypes) {
- $itemLoopIter->{description} = $itemInfo->{description};
+ $itemLoopIter->{translated_description} = $itemInfo->{translated_description};
$itemLoopIter->{imageurl} = $itemInfo->{imageurl};
}
# the item could be reserved for this borrower vi a host record, flag this
$reservedfor //= '';
- if ($reservedfor eq $borrowernumber){
+ if ($reservedfor eq $borrowernumber){
$itemLoopIter->{already_reserved} = 1;
}
);
}
-output_html_with_http_headers $query, $cookie, $template->output;
-
+output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };