+function update_stock_move_pid($type, $stock_id, $from, $to, $pid, $cost)
+{
+ $from = date2sql($from);
+ $to = date2sql($to);
+ $sql = "UPDATE ".TB_PREF."stock_moves SET standard_cost=$cost WHERE type=$type
+ AND stock_id='$stock_id' AND tran_date>='$from' AND tran_date<='$to' AND person_id = $pid";
+ db_query($sql, "The stock movement standard_cost cannot be updated");
+}
+