db_query($sql, "The stock movement standard_cost cannot be updated");
}
-function update_stock_move_pid($type, $type_no, $stock_id, $pid, $cost)
-{
- $sql = "UPDATE ".TB_PREF."stock_moves SET standard_cost=".db_escape($cost)
- ." WHERE type=".db_escape($type)
- ." AND trans_no=".db_escape($type_no)
- ." AND stock_id=".db_escape($stock_id)
- ." AND person_id = ".db_escape($pid);
- db_query($sql, "The stock movement standard_cost cannot be updated");
-}
-
//--------------------------------------------------------------------------------------------------
function get_stock_moves($type, $type_no, $visible=false)
add_audit_trail(ST_JOURNAL, $id, $old_date);
add_comments(ST_JOURNAL, $id, $old_date, $memo);
- $Refs->save(ST_JOURNAL, $id, $ref);
- }
- }
- /*$deliveries = get_deliveries_between($details_row["stock_id"], $old_date, $date_);
- if ($deliveries[0] != 0) // have deliveries been done during the period?
- {
- update_stock_move_pid(ST_CUSTDELIVERY, $details_row["stock_id"], $old_date, $date_, 0, $mat_cost);
+ $Refs->save(ST_JOURNAL, $id, $ref);
+ }
}
- update_stock_move_pid(ST_SUPPRECEIVE, $details_row["stock_id"], $old_date, $old_date, $grn['supplier_id'], $mat_cost);
- */
}
}
}