|
|
@ -649,10 +649,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
|
|
|
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
|
if ($_POST['form_name'] == 'update_date_form') { |
|
|
|
|
|
|
|
$creater = $user_id; |
|
|
|
|
|
|
|
foreach ($_POST as $k => $v) |
|
|
|
$$k = htmlspecialchars(stripslashes(trim($v))); |
|
|
|
|
|
|
|
$real_contract_arrival_date = $_POST['real_arrival_date']; |
|
|
|
$real_arrival_date = $_POST['real_arrival_date']; |
|
|
|
$updatesql = " |
|
|
|
UPDATE wipwholestatus |
|
|
|
SET |
|
|
@ -661,6 +664,49 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
|
"; |
|
|
|
mysqli_query($link, $updatesql); |
|
|
|
|
|
|
|
|
|
|
|
$sql = " |
|
|
|
SELECT |
|
|
|
`custom`, |
|
|
|
`facilityno`, |
|
|
|
`salesid` |
|
|
|
FROM `wipwholestatus` |
|
|
|
where `id` = '$id' |
|
|
|
"; |
|
|
|
$result = mysqli_query($link, $sql); |
|
|
|
foreach ($result as $row) { |
|
|
|
$permission = $row["salesid"]; |
|
|
|
$custom = $row["custom"]; |
|
|
|
$facilityno = $row["facilityno"]; |
|
|
|
$title = "客戶:$custom 作番:$facilityno 實際出貨日變更"; |
|
|
|
$content = "客戶:$custom |
|
|
|
作番:$facilityno |
|
|
|
實際出貨日(到工地):$real_arrival_date"; |
|
|
|
|
|
|
|
$sql = " |
|
|
|
INSERT INTO notice( |
|
|
|
kind, |
|
|
|
related_id, |
|
|
|
title, |
|
|
|
content, |
|
|
|
haveread, |
|
|
|
permission, |
|
|
|
creater, |
|
|
|
create_at |
|
|
|
)VALUES( |
|
|
|
'1', |
|
|
|
'$id', |
|
|
|
'$title', |
|
|
|
'$content', |
|
|
|
null, |
|
|
|
'$permission', |
|
|
|
'$creater', |
|
|
|
'" . date("Y-m-d H:i:s") . "' |
|
|
|
); |
|
|
|
"; |
|
|
|
mysqli_query($link, $sql); |
|
|
|
} |
|
|
|
|
|
|
|
echo "<script type ='text/JavaScript'>"; |
|
|
|
echo "alert('已更新日期');"; |
|
|
|
echo "location.href='wipwhole-rec-invoice-edit.php?function_name=pricereview&id=$id&" . $token_link . "';"; |
|
|
|