- //Chaitanya : Compatibility for Service Items
- if (!is_service($issue["mb_flag"]))
- $ivaccount = $issue["inventory_account"];
- else
- $ivaccount = $issue["cogs_account"];
-
- if ($issue_cost != 0)
- {
- $total_cost += add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $ivaccount, 0, 0,
- $date_.": "._("Reversed the issue of")." ".$stockitem["description"],
- -$issue_cost);
- $issue_total += $issue_cost;
- }
- }
- if ($issue_total != 0)
- //Chaitanya : Revese cost effect on manfactured stock item as adjustment only
- add_issue_cost($manf_stock_id, 0, $date_, $issue_total, true);
- $issue = get_stock_gl_code($manf_stock_id);
- $stockitem = get_item($manf_stock_id);
- if ($total_cost != 0)
- add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $issue["inventory_account"],
- 0, 0, $date_.": "._("Reversed the issue to")." ".$stockitem["description"],
- -$total_cost);
-
- //Chaitanya : Shifted below void all related stock moves