(by syspref)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
( $item->{'biblioitemnumber'}, $itemtype ) = $sth->fetchrow;
$sth =
$dbh->prepare(
- "SELECT notforloan FROM itemtypes WHERE itemtype='$itemtype'");
- $sth->execute();
+ "SELECT notforloan FROM itemtypes WHERE itemtype=?");
+ $sth->execute( C4::Context->preference('item-level_itype') ? $item->{'ccode'} : $itemtype );
my $notforloan = $sth->fetchrow;
##Change the notforloan field if $notforloan found
if ( $notforloan > 0 ) {