MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
WHERE ".TB_PREF."stock_master.category_id=".TB_PREF."stock_category.category_id
AND (".TB_PREF."stock_master.mb_flag='B' OR ".TB_PREF."stock_master.mb_flag='M')";
if ($category != 0)
WHERE ".TB_PREF."stock_master.category_id=".TB_PREF."stock_category.category_id
AND (".TB_PREF."stock_master.mb_flag='B' OR ".TB_PREF."stock_master.mb_flag='M')";
if ($category != 0)
$sql .= " GROUP BY ".TB_PREF."stock_master.category_id,
".TB_PREF."stock_category.description,
".TB_PREF."stock_master.stock_id,
$sql .= " GROUP BY ".TB_PREF."stock_master.category_id,
".TB_PREF."stock_category.description,
".TB_PREF."stock_master.stock_id,
$custqty = get_demand_qty($trans['stock_id'], $loc_code);
$custqty += get_demand_asm_qty($trans['stock_id'], $loc_code);
$suppqty = get_on_porder_qty($trans['stock_id'], $loc_code);
$custqty = get_demand_qty($trans['stock_id'], $loc_code);
$custqty += get_demand_asm_qty($trans['stock_id'], $loc_code);
$suppqty = get_on_porder_qty($trans['stock_id'], $loc_code);