- $item->{itemlostloop}= GetAuthorisedValues(GetAuthValCode('items.itemlost',$fw)) if GetAuthValCode('items.itemlost',$fw);
- $item->{itemdamagedloop}= GetAuthorisedValues(GetAuthValCode('items.damaged',$fw)) if GetAuthValCode('items.damaged',$fw);
- $item->{itemwithdrawnloop}= GetAuthorisedValues(GetAuthValCode('items.withdrawn',$fw)) if GetAuthValCode('items.withdrawn',$fw);
- $item->{'collection'} = $ccodes->{ $item->{ccode} } if ($ccodes);
- $item->{'itype'} = $itemtypes->{ $item->{'itype'} }->{'translated_description'};
- $item->{'replacementprice'} = sprintf( "%.2f", $item->{'replacementprice'} );
+ $item->{'collection'} = $ccodes->{ $item->{ccode} } if $ccodes && $item->{ccode} && exists $ccodes->{ $item->{ccode} };
+ $item->{'itype'} = $itemtypes->{ $item->{'itype'} }->{'translated_description'} if exists $itemtypes->{ $item->{'itype'} };
+ $item->{'replacementprice'} = $item->{'replacementprice'};