# For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item
my $userenv = C4::Context->userenv;
if ( $item->{onloan}
# For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item
my $userenv = C4::Context->userenv;
if ( $item->{onloan}