Fix authorised_value '0' problem with last commit on detail.pl

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Ryan Higgins 2008-04-06 20:39:00 -05:00 committed by Joshua Ferraro
parent d48e0998d0
commit d13007e5a6

View file

@ -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});