FROM ".TB_PREF."stock_master item,
".TB_PREF."stock_category category,
".TB_PREF."debtor_trans trans,
FROM ".TB_PREF."stock_master item,
".TB_PREF."stock_category category,
".TB_PREF."debtor_trans trans,
AND (line.debtor_trans_type = ".ST_SALESINVOICE." OR line.debtor_trans_type = ".ST_CUSTCREDIT.")";
if ($category != 0)
$sql .= " AND item.category_id = ".db_escape($category);
AND (line.debtor_trans_type = ".ST_SALESINVOICE." OR line.debtor_trans_type = ".ST_CUSTCREDIT.")";
if ($category != 0)
$sql .= " AND item.category_id = ".db_escape($category);
$res = getTransactions($category, $from, $to);
$total = $grandtotal = 0.0;
$res = getTransactions($category, $from, $to);
$total = $grandtotal = 0.0;
}
$rep->TextCol(0, 1, $trans['category_id']);
$rep->TextCol(1, 7, $trans['cat_description']);
}
$rep->TextCol(0, 1, $trans['category_id']);
$rep->TextCol(1, 7, $trans['cat_description']);