+ //Chaitanya : skipped this step as BOM may have got changed\r
+ //work_order_quick_costs($row['workorder_id'], $row['stock_id'], -$row['quantity'], sql2date($row['date_']), $type_no);\r
+
+ // void any related gl trans\r
+ //Chaitanya : Nothing happens due to next statement as all gl postings are done against WO\r
+ //void_gl_trans(ST_MANURECEIVE, $type_no, true);\r
+ \r
+ $woid = $row["workorder_id"];\r
+ $date_ = sql2date($row["date_"]);\r
+ \r
+ $result = get_stock_moves(ST_MANURECEIVE, $type_no);\r
+ while ($myrow = db_fetch($result))\r
+ {\r
+ $issue_cost = $myrow["qty"]*$myrow["standard_cost"];\r
+ $issue = get_stock_gl_code($myrow["stock_id"]);\r
+ $stockitem = get_item($myrow["stock_id"]);\r
+ \r
+ //Chaitanya : Compatibility for Service Items\r
+ if (!is_service($issue["mb_flag"]))\r
+ $ivaccount = $issue["inventory_account"];\r
+ else\r
+ $ivaccount = $issue["cogs_account"]; \r
+ \r
+ if ($issue_cost != 0)\r
+ {\r
+ add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $ivaccount, 0, 0,\r
+ $date_.": "._("Reversed the production ")." ".$stockitem["description"],\r
+ -$issue_cost);\r
+ }\r
+ } \r
+ \r