my $dbh = C4::Context->dbh;
my $branch_issuer = C4::Context->userenv->{'branchcode'};
-
+#TODO : specify issuer or borrower for circrule.
my $type = (C4::Context->preference('item-level_itype'))
- ? $item->{'itype'} # item-level
+ ? $item->{'ccode'} # item-level
: $item->{'itemtype'}; # biblio-level
my $sth =
AND i.itemnumber = s2.itemnumber
AND s1.biblioitemnumber = s2.biblioitemnumber"
. (C4::Context->preference('item-level_itype'))
- ? " AND s2.itype=? "
+ ? " AND s2.ccode=? "
: " AND s1.itemtype= ? ";
my $sth2= $dbh->prepare($query2);
my $sth3 =
my $borrower = GetMemberDetails( $borrowernumber, 0 );
my $loanlength = GetLoanLength(
$borrower->{'categorycode'},
- (C4::Context->preference('item-level_itypes')) ? $biblio->{'itype'} : $biblio->{'itemtype'} ,
+ (C4::Context->preference('item-level_itypes')) ? $biblio->{'ccode'} : $biblio->{'itemtype'} ,
$borrower->{'branchcode'}
);
#FIXME -- choose issuer or borrower branch.
LEFT JOIN itemtypes ON (itemtypes.itemtype=issuingrules.itemtype)
WHERE categorycode=?
" );
-my @issued_itemtypes_count_loop; # huh?
+#my @issued_itemtypes_count; # huh?
$issueqty_sth->execute("*");
while ( my $data = $issueqty_sth->fetchrow_hashref() ) {