From e44b409b1643330f665dab0051b516b8d8d6f1ed Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Wed, 7 Nov 2007 12:12:20 -0600 Subject: [PATCH] notforloan from items.ccode->itemtypes.notforloan instead of bi.itemtype (by syspref) Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Biblio.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 451e0728f7..f0257fc5b5 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -257,8 +257,8 @@ sub AddItem { ( $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 ) { -- 2.39.5