use C4::Members;
use C4::Overdues;
use C4::Debug;
+use Koha::AuthorisedValues;
use Koha::DateUtils;
use Koha::Libraries;
use Koha::Patrons;
# and items for each biblionumber.
#
#
-my $notforloan_label_of = get_notforloan_label_of();
my $biblioLoop = [];
my $numBibsAvailable = 0;
&get_out($query, $cookie, $template->output);
}
+ my $frameworkcode = GetFrameworkCode( $biblioData->{biblionumber} );
$biblioLoopIter{biblionumber} = $biblioData->{biblionumber};
$biblioLoopIter{title} = $biblioData->{title};
- $biblioLoopIter{subtitle} = GetRecordValue('subtitle', $record, GetFrameworkCode($biblioData->{biblionumber}));
+ $biblioLoopIter{subtitle} = GetRecordValue('subtitle', $record, $frameworkcode);
$biblioLoopIter{author} = $biblioData->{author};
$biblioLoopIter{rank} = $biblioData->{rank};
$biblioLoopIter{reservecount} = $biblioData->{reservecount};
}
}
+ my @notforloan_avs = Koha::AuthorisedValues->search_by_koha_field({ kohafield => 'items.notforloan', frameworkcode => $frameworkcode });
+ my $notforloan_label_of = { map { $_->authorised_value => $_->opac_description } @notforloan_avs };
+
$biblioLoopIter{itemLoop} = [];
my $numCopiesAvailable = 0;
my $numCopiesOPACAvailable = 0;
## Should be same as biblionumber
my @biblioitemnumbers = keys %itemnumbers_of_biblioitem;
- my $notforloan_label_of = get_notforloan_label_of();
-
## Hash of biblioitemnumber to 'biblioitem' table records
my $biblioiteminfos_of = GetBiblioItemInfosOf(@biblioitemnumbers);
+ my $frameworkcode = GetFrameworkCode( $biblionumber );
+ my @notforloan_avs = Koha::AuthorisedValues->search_by_koha_field({ kohafield => 'items.notforloan', frameworkcode => $frameworkcode });
+ my $notforloan_label_of = { map { $_->authorised_value => $_->lib } @notforloan_avs };
+
my @bibitemloop;
my @available_itemtypes;