From 7408ffe1dd65790a83a4994aefda76cf480d5631 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 --- reserve/placerequest.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/reserve/placerequest.pl b/reserve/placerequest.pl index db07ff0..298d0a3 100755 --- a/reserve/placerequest.pl +++ b/reserve/placerequest.pl @@ -104,9 +104,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.7.4