if ( $item ) {
$biblio = $item->biblio;
- my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $biblio->frameworkcode, kohafield => 'items.notforloan', authorised_value => { not => undef } });
+ my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $biblio->frameworkcode, kohafield => 'items.notforloan', authorised_value => [ -and => {'!=' => undef }, {'!=' => ''}] });
$template_params->{authvalcode_notforloan} = $mss->count ? $mss->next->authorised_value : undef;
}
my $account = $patron->account;
if( ( my $owing = $account->non_issues_charges ) > 0 ) {
my $noissuescharge = C4::Context->preference("noissuescharge") || 5; # FIXME If noissuescharge == 0 then 5, why??
- $noissues = ( not C4::Context->preference("AllowFineOverride") and ( $owing > $noissuescharge ) );
+ $noissues ||= ( not C4::Context->preference("AllowFineOverride") and ( $owing > $noissuescharge ) );
$template->param(
charges => 1,
chargesamount => $owing,
}
}
-if ( $patron && $patron->is_child) {
- my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']});
- $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1;
- $template->param( 'catcode' => $patron_categories->next->categorycode ) if $patron_categories->count == 1;
-}
-
my $messages = Koha::Patron::Messages->search(
{
'me.borrowernumber' => $borrowernumber,