0); } //-------------------------------------------------------------------------------------------- function void_work_order_produce($type_no) { begin_transaction(); $row = get_work_order_produce($type_no); // deduct the quantity of this production from the parent work order work_order_update_finished_quantity($row["workorder_id"], -$row["quantity"]); // clear the production record $sql = "UPDATE ".TB_PREF."wo_manufacture SET quantity=0 WHERE id=$type_no"; db_query($sql, "Cannot void a wo production"); // void all related stock moves void_stock_move(29, $type_no); // void any related gl trans void_gl_trans(29, $type_no, true); commit_transaction(); } ?>