From: Ryan Higgins Date: Wed, 7 Nov 2007 18:12:20 +0000 (-0600) Subject: notforloan from items.ccode->itemtypes.notforloan instead of bi.itemtype X-Git-Tag: v3.00.00-alpha~1027 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=e44b409b1643330f665dab0051b516b8d8d6f1ed;p=koha_fer notforloan from items.ccode->itemtypes.notforloan instead of bi.itemtype (by syspref) Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- 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 ) {