From 7fdf6c376f0d19e25d601717a6c7dfdefff478be Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Wed, 12 Oct 2016 07:08:19 +0000 Subject: [PATCH] Bug 15565: Use item's biblionumber only on item-level request MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Séverine QUEUNE Signed-off-by: Kyle M Hall Signed-off-by: Benjamin Rokseth --- reserve/placerequest.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/reserve/placerequest.pl b/reserve/placerequest.pl index 3b93836..a07cdc6 100755 --- a/reserve/placerequest.pl +++ b/reserve/placerequest.pl @@ -105,9 +105,13 @@ if ( $type eq 'str8' && $borrower ) { } else { # place a request on 1st available for ( my $i = 0 ; $i < $holds_to_place_count ; $i++ ) { - my $item = GetItem($checkitems[$i]); + my $item; + if ($checkitems[$i]) { + $item = GetItem($checkitems[$i]); + } AddReserve( $branch, $borrower->{'borrowernumber'}, - $item->{biblionumber}, \@realbi, $rank[0], $startdate, $expirationdate, $notes, $title, + ($item ? $item->{biblionumber} : $biblionumber), \@realbi, + $rank[0], $startdate, $expirationdate, $notes, $title, $checkitems[$i], $found[$i] ); } } -- 2.1.4