+
+ # grab all the items...
+ my @all_items = &GetItemsInfo( $biblionumber );
+
+ # determine which ones should be hidden / visible
+ my @hidden_items = GetHiddenItemnumbers({ items => \@all_items, borcat => $borcat });
+
+ # If every item is hidden, then the biblio should be hidden too.
+ next if (scalar @all_items >= 1 && scalar @hidden_items == scalar @all_items);
+
+ # copy the visible ones into the items array.
+ my @items;
+ foreach my $item (@all_items) {
+ if ( none { $item->{itemnumber} ne $_ } @hidden_items ) {
+ push @items, $item;
+ }
+ }
+