}
);
+my $patron = Koha::Patrons->find( $loggedinuser );
my $borcat = q{};
-if ( C4::Context->preference('OpacHiddenItemsExceptions') ) {
- # we need to fetch the borrower info here, so we can pass the category
- my $patron = Koha::Patrons->find( { borrowernumber => $loggedinuser } );
- $borcat = $patron ? $patron->categorycode : $borcat;
+if ( $patron && C4::Context->preference('OpacHiddenItemsExceptions') ) {
+ $borcat = $patron->categorycode;
}
my $record = GetMarcBiblio({
});
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } };
-my $patron = Koha::Patrons->find( $loggedinuser );
for my $itm (@all_items) {
my $item = Koha::Items->find( $itm->{itemnumber} );
$norequests = 0