diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 386357b207..92a58ac2cb 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -194,10 +194,9 @@ sub printbasketgrouppdf{ } } - my $item_has_type_description = ($ord->{itemtype} - and $biblioitem->itemtype - and Koha::ItemTypes->find( $biblioitem->itemtype )); - $ord->{itemtype} = $item_has_type_description ? Koha::ItemTypes->find( $biblioitem->itemtype )->description : undef; + my $itemtype = Koha::ItemTypes->find( $biblioitem->itemtype ); + my $item_has_type_description = $ord->{itemtype} && $biblioitem->itemtype && $itemtype; + $ord->{itemtype} = $item_has_type_description ? $itemtype->description : undef; $ord->{en} = $en ? $en : undef; $ord->{edition} = $edition ? $edition : undef;