X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fdb%2Fmanufacturing_db.inc;h=f9249168536f67b86cb2c1c8d7145fc604955e75;hb=4def49c9e0be02ccdf814188c2a72ebd969a7a98;hp=0c91583723d5250005f52111013ee178a4689eb0;hpb=8692b632cf9f390579883d970c477b2095c2ff0f;p=fa-stable.git diff --git a/includes/db/manufacturing_db.inc b/includes/db/manufacturing_db.inc index 0c915837..f9249168 100644 --- a/includes/db/manufacturing_db.inc +++ b/includes/db/manufacturing_db.inc @@ -20,7 +20,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=CAST(".TB_PREF."bom.workcentre_added AS UNSIGNED) AND ".TB_PREF."bom.loc_code = ".TB_PREF."locations.loc_code ORDER BY ".TB_PREF."bom.id";