- $sql = "SELECT ".TB_PREF."stock_master.stock_id, ".TB_PREF."stock_master.description AS name,
- ".TB_PREF."stock_master.material_cost+".TB_PREF."stock_master.labour_cost+".TB_PREF."stock_master.overhead_cost AS Standardcost,
- ".TB_PREF."stock_master.category_id,
- ".TB_PREF."stock_category.description
- FROM ".TB_PREF."stock_master,
- ".TB_PREF."stock_category
- WHERE ".TB_PREF."stock_master.category_id=".TB_PREF."stock_category.category_id AND NOT ".TB_PREF."stock_master.inactive";
+ $sql = "SELECT item.stock_id, item.description AS name,
+ item.material_cost AS Standardcost,
+ item.category_id,item.units,
+ category.description
+ FROM ".TB_PREF."stock_master item,
+ ".TB_PREF."stock_category category
+ WHERE item.category_id=category.category_id AND NOT item.inactive";