}
-my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield => 'items.itemlost' });
+my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield => 'items.itemlost', authorised_value => { not => undef } });
if ( $mss->count ) {
- $template->param( itemlostloop => GetAuthorisedValues( $mss->next->authorisedvalue ) );
+ $template->param( itemlostloop => GetAuthorisedValues( $mss->next->authorised_value ) );
}
-$mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield => 'items.damaged' });
+$mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield => 'items.damaged', authorised_value => { not => undef } });
if ( $mss->count ) {
- $template->param( itemdamagedloop => GetAuthorisedValues( $mss->next->authorisedvalue ) );
+ $template->param( itemdamagedloop => GetAuthorisedValues( $mss->next->authorised_value ) );
}
-$mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield => 'items.withdrawn' });
+$mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield => 'items.withdrawn', authorised_value => { not => undef } });
if ( $mss->count ) {
- $template->param( itemwithdrawnloop => GetAuthorisedValues( $mss->next->authorisedvalue) );
+ $template->param( itemwithdrawnloop => GetAuthorisedValues( $mss->next->authorised_value) );
}
$template->param(count => $data->{'count'},