X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fdb%2Fmanufacturing_db.inc;h=de03445e99e883f6cb882001038dbce99b6d34b6;hb=fe1f5b5e9c57ff544939158bab7334cc77ce2169;hp=fa63bbf86254035088878f43237fa3789c3495a8;hpb=da8311619dd73feae101d246a1957b972e00cbd2;p=fa-stable.git diff --git a/includes/db/manufacturing_db.inc b/includes/db/manufacturing_db.inc index fa63bbf8..de03445e 100644 --- a/includes/db/manufacturing_db.inc +++ b/includes/db/manufacturing_db.inc @@ -1,5 +1,14 @@ . +***********************************************************************/ function get_mb_flag($stock_id) { $sql = "SELECT mb_flag FROM ".TB_PREF."stock_master WHERE stock_id = '" . $stock_id . "'"; @@ -20,7 +29,7 @@ function get_bom($item) ".TB_PREF."stock_master.description, ".TB_PREF."stock_master.mb_flag AS ResourceType, ".TB_PREF."stock_master.material_cost+ ".TB_PREF."stock_master.labour_cost+".TB_PREF."stock_master.overhead_cost AS standard_cost, units, ".TB_PREF."bom.quantity * (".TB_PREF."stock_master.material_cost+ ".TB_PREF."stock_master.labour_cost+ ".TB_PREF."stock_master.overhead_cost) AS ComponentCost - FROM ".TB_PREF."workcentres, ".TB_PREF."locations, ".TB_PREF."bom INNER JOIN ".TB_PREF."stock_master ON ".TB_PREF."bom.component = ".TB_PREF."stock_master.stock_id + FROM (".TB_PREF."workcentres, ".TB_PREF."locations, ".TB_PREF."bom) INNER JOIN ".TB_PREF."stock_master ON ".TB_PREF."bom.component = ".TB_PREF."stock_master.stock_id WHERE ".TB_PREF."bom.parent = '" . $item . "' AND ".TB_PREF."workcentres.id=".TB_PREF."bom.workcentre_added AND ".TB_PREF."bom.loc_code = ".TB_PREF."locations.loc_code ORDER BY ".TB_PREF."bom.id";