-my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } };
-my $patron = Koha::Patrons->find( $loggedinuser );
-for my $itm (@items) {
- my $item = Koha::Items->find( $itm->{itemnumber} );
- $norequests = 0
- if $norequests
- && !$itm->{'withdrawn'}
- && !$itm->{'itemlost'}
- && ($itm->{'itemnotforloan'}<0 || not $itm->{'itemnotforloan'})
- && !$itemtypes->{$itm->{'itype'}}->{notforloan}
- && $itm->{'itemnumber'};
-
- $allow_onshelf_holds = Koha::IssuingRules->get_onshelfholds_policy( { item => $item, patron => $patron } )
+my $items = $biblio->items;
+while ( my $item = $items->next ) {
+
+ $allow_onshelf_holds = Koha::CirculationRules->get_onshelfholds_policy( { item => $item, patron => $patron } )