From 2558ea4aea49e79f7ff77edba9efca5e555876b6 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 --- 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.1.4