@@ -, +, @@ notforloan in checkout --- circ/circulation.pl | 4 +--- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -349,12 +349,10 @@ if (@$barcodes) { $template_params->{messages} = $messages; my $item = Koha::Items->find({ barcode => $barcode }); - my ( $biblio, $mss ); + my $biblio; if ( $item ) { $biblio = $item->biblio; - 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; } # Fix for bug 7494: optional checkout-time fallback search for a book --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -155,7 +155,7 @@ [% IF ( itemtype_notforloan ) %] Item type is normally not for loan. [% ELSIF ( item_notforloan ) %] - [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %] + [% item_notforloan_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %] Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib | html %])[% END %]. [% END %] [% IF CAN_user_circulate_force_checkout %] @@ -341,7 +341,7 @@ [% IF ( itemtype_notforloan ) %] Item type not for loan. [% ELSIF ( item_notforloan ) %] - [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %] + [% item_notforloan_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %] Item not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib | html %])[% END %]. [% END %] --