X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=manufacturing%2Fincludes%2Fdb%2Fwork_order_produce_items_db.inc;h=b9fd16f0e9198ad61d94b74a281e21b4aebc84b8;hb=9aa3fde4cf67babeae4a60264c74321a7f97e8af;hp=428508112d75d9428b950d7366b5a6886b4e1b78;hpb=2ad053537e89208467a888923e6f1702aa168142;p=fa-stable.git diff --git a/manufacturing/includes/db/work_order_produce_items_db.inc b/manufacturing/includes/db/work_order_produce_items_db.inc index 42850811..b9fd16f0 100644 --- a/manufacturing/includes/db/work_order_produce_items_db.inc +++ b/manufacturing/includes/db/work_order_produce_items_db.inc @@ -42,7 +42,7 @@ function work_order_produce($woid, $ref, $quantity, $date_, $memo_, $close_wo) // ------------------------------------------------------------------------- - work_order_quick_costs($woid, $details["stock_id"], $quantity, $date_, true); + work_order_quick_costs($woid, $details["stock_id"], $quantity, $date_, $id); // ------------------------------------------------------------------------- // insert a +ve stock move for the item being manufactured @@ -107,7 +107,7 @@ function void_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"]); - work_order_quick_costs($row['workorder_id'], $row['stock_id'], -$row['quantity'], sql2date($row['date_']), true); + work_order_quick_costs($row['workorder_id'], $row['stock_id'], -$row['quantity'], sql2date($row['date_']), $type_no); // clear the production record $sql = "UPDATE ".TB_PREF."wo_manufacture SET quantity=0 WHERE id=".db_escape($type_no);