$date = date2sql($date_);
$sql = "INSERT INTO ".TB_PREF."wo_manufacture (workorder_id, reference, quantity, date_)
- VALUES ($woid, '$ref', $quantity, '$date')";
+ VALUES ($woid, ".db_escape($ref).", $quantity, '$date')";
db_query($sql,"A work order manufacture could not be added");
// update wo quantity and close wo if requested
work_order_update_finished_quantity($woid, $quantity, $close_wo);
+ // -------------------------------------------------------------------------
+
+ work_order_quick_costs($woid, $details["stock_id"], $quantity, $date_, 0, true);
+
+ // -------------------------------------------------------------------------
if ($memo_)
add_comments(29, $id, $date_, $memo_);