- SUM(-IF(move.standard_cost <> 0, move.qty * move.standard_cost, move.qty *(item.material_cost + item.labour_cost + item.overhead_cost))) AS cost
+ SUM(-IF(move.standard_cost <> 0, move.qty * move.standard_cost, move.qty *item.material_cost)) AS cost
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,