@@ -, +, @@ instead of biblioitem - elsif ($biblioitem->{'notforloan'} == 1){ + elsif ($biblioitem->notforloan == 1){ --- C4/Circulation.pm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -929,13 +929,16 @@ sub CanBookBeIssued { } } } - elsif ($biblioitem->notforloan == 1){ - if (!C4::Context->preference("AllowNotForLoanOverride")) { - $issuingimpossible{NOT_FOR_LOAN} = 1; - $issuingimpossible{itemtype_notforloan} = $effective_itemtype; - } else { - $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1; - $needsconfirmation{itemtype_notforloan} = $effective_itemtype; + else { + my $itemtype = Koha::ItemTypes->find($biblioitem->itemtype); + if ( $itemtype and $itemtype->notforloan == 1){ + if (!C4::Context->preference("AllowNotForLoanOverride")) { + $issuingimpossible{NOT_FOR_LOAN} = 1; + $issuingimpossible{itemtype_notforloan} = $effective_itemtype; + } else { + $needsconfirmation{NOT_FOR_LOAN_FORCING} = 1; + $needsconfirmation{itemtype_notforloan} = $effective_itemtype; + } } } } --