From d13007e5a604a584aac5b79ba1a5e7168589eb78 Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Sun, 6 Apr 2008 20:39:00 -0500 Subject: [PATCH] Fix authorised_value '0' problem with last commit on detail.pl Signed-off-by: Joshua Ferraro --- catalogue/detail.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 3c2bbe8e7a..0eb3304aa4 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -113,9 +113,11 @@ foreach my $item (@items) { } #get shelf location and collection code description if they are authorised value. my $shelflocations = GetKohaAuthorisedValues('items.location',$fw ); - $item->{'location'} = $shelflocations->{$item->{'location'}} if($shelflocations->{$item->{'location'}}); + my $shelfcode= $item->{'location'}; + $item->{'location'} = $shelflocations->{$shelfcode} if(defined($shelflocations) && exists($shelflocations->{$shelfcode})); my $collections = GetKohaAuthorisedValues('items.ccode',$fw ); - $item->{'ccode'} = $collections->{$item->{'ccode'}} if($collections->{$item->{'ccode'}}); + my $ccode= $item->{'ccode'}; + $item->{'ccode'} = $collections->{$ccode} if(defined($collections) && exists($collections->{$ccode})); # checking for holds my ($reservedate,$reservedfor,$expectedAt) = GetReservesFromItemnumber($item->{itemnumber}); -- 2.20.1