From cc98e9b6533d727d3a2b57b860e4d45fb2e66ed7 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Tue, 19 Apr 2016 12:13:05 +0200 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 e1aa890..bda0d81 100755 --- a/reserve/placerequest.pl +++ b/reserve/placerequest.pl @@ -102,9 +102,13 @@ if ( $type eq 'str8' && $borrower ) { } else { 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