From: Janusz Dobrowolski Date: Sun, 10 Jan 2016 08:50:38 +0000 (+0100) Subject: Reverted invalid changes in manufacturing accounts back to cogs_account for BOM servi... X-Git-Tag: 2.3-final~29 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=e0544eddcab799b9088e0a774f63443e3f634bb6 Reverted invalid changes in manufacturing accounts back to cogs_account for BOM service items. This partially reverts commit d5618f84e921515fa6ce6ec05180f0651119c297. --- diff --git a/manufacturing/includes/db/work_order_issues_db.inc b/manufacturing/includes/db/work_order_issues_db.inc index 13f4e840..ca2f4a86 100644 --- a/manufacturing/includes/db/work_order_issues_db.inc +++ b/manufacturing/includes/db/work_order_issues_db.inc @@ -75,8 +75,7 @@ function add_work_order_issue($woid, $ref, $to_work_order, $items, $location, $w if (!is_service($issue["mb_flag"])) $ivaccount = $issue["inventory_account"]; else - // $ivaccount = $issue["cogs_account"]; - $ivaccount = $issue["assembly_account"]; // changed 2015.10.14 by Petros . + $ivaccount = $issue["cogs_account"]; $total_cost += add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $ivaccount, 0, 0, $date_.": "._("Issue of")." ".$stockitem["description"], -$issue_cost); @@ -201,8 +200,7 @@ function void_work_order_issue($type_no) if (!is_service($issue["mb_flag"])) $ivaccount = $issue["inventory_account"]; else - // $ivaccount = $issue["cogs_account"]; - $ivaccount = $issue["assembly_account"]; // changed 2015.10.14 by Petros . + $ivaccount = $issue["cogs_account"]; if ($issue_cost != 0) { diff --git a/manufacturing/includes/db/work_order_produce_items_db.inc b/manufacturing/includes/db/work_order_produce_items_db.inc index 2b72be3f..d67d2e90 100644 --- a/manufacturing/includes/db/work_order_produce_items_db.inc +++ b/manufacturing/includes/db/work_order_produce_items_db.inc @@ -163,8 +163,7 @@ function void_work_order_produce($type_no) if (!is_service($issue["mb_flag"])) $ivaccount = $issue["inventory_account"]; else - //$ivaccount = $issue["cogs_account"]; - $ivaccount = $issue["assembly_account"]; // changed 2015.10.14 by Petros . + $ivaccount = $issue["cogs_account"]; if ($issue_cost != 0) { diff --git a/manufacturing/includes/db/work_orders_db.inc b/manufacturing/includes/db/work_orders_db.inc index 5b9bea52..50fdf816 100644 --- a/manufacturing/includes/db/work_orders_db.inc +++ b/manufacturing/includes/db/work_orders_db.inc @@ -106,7 +106,7 @@ function add_overhead_cost($stock_id, $qty, $date_, $costs, $adj_only=false) -$costs); //GL Posting to inventory adjustment account add_gl_trans_std_cost(ST_JOURNAL, $id, $date_, - $stock_gl_code["assembly_account"], // changed 2015.10.14 from adjustment to assembly account. Petros. + $stock_gl_code["assembly_account"], $stock_gl_code['dimension_id'], $stock_gl_code['dimension2_id'], $memo, $costs); @@ -164,7 +164,7 @@ function add_labour_cost($stock_id, $qty, $date_, $costs, $adj_only=false) -$costs); //GL Posting to inventory adjustment account add_gl_trans_std_cost(ST_JOURNAL, $id, $date_, - $stock_gl_code["assembly_account"], // changed 2015.10.14 from adjustment to assembly account. Petros. + $stock_gl_code["assembly_account"], $stock_gl_code['dimension_id'], $stock_gl_code['dimension2_id'], $memo, $costs); @@ -217,7 +217,7 @@ function add_issue_cost($stock_id, $qty, $date_, $costs, $adj_only=false) -$costs); //GL Posting to inventory adjustment account add_gl_trans_std_cost(ST_JOURNAL, $id, $date_, - $stock_gl_code["assembly_account"], // changed 2015.10.14 from adjustment to assembly account. Petros. + $stock_gl_code["assembly_account"], $stock_gl_code['dimension_id'], $stock_gl_code['dimension2_id'], $memo, $costs); diff --git a/manufacturing/includes/db/work_orders_quick_db.inc b/manufacturing/includes/db/work_orders_quick_db.inc index e28ee7f0..3700fa35 100644 --- a/manufacturing/includes/db/work_orders_quick_db.inc +++ b/manufacturing/includes/db/work_orders_quick_db.inc @@ -144,8 +144,7 @@ function work_order_quick_costs($woid, $stock_id, $units_reqd, $date_, $advanced if (!is_service($bom_accounts["mb_flag"])) $ivaccount = $bom_accounts["inventory_account"]; else - // $ivaccount = $bom_accounts["cogs_account"]; - $ivaccount = $bom_accounts["assembly_account"]; // changed 2015.10.14 by Petros . + $ivaccount = $bom_accounts["cogs_account"]; $total_cost += add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $ivaccount, 0, 0, $memo, -$bom_cost); $total_material_cost += $bom_cost;