diff --git a/prv/pricereview-record-submit.php b/prv/pricereview-record-submit.php
index f86c6126..aa7b13e4 100644
--- a/prv/pricereview-record-submit.php
+++ b/prv/pricereview-record-submit.php
@@ -1,58 +1,60 @@
- $v) {
- $$k = htmlspecialchars(stripslashes(trim($v)));
- }
-
- $maintance_contract_id=$_POST['maintance_contract_id'];
- $sitename=$_POST['sitename'];
- $contractor=$_POST['contractor'];
- $contractsnum=$_POST['contractsnum'];
- $siteaddress=$_POST['siteaddress'];
- $startdate=$_POST['startdate'];
- $enddate=$_POST['enddate'];
- $contractsigningperiod=$startdate.'_'.$enddate;
- $pricereviewer=$_POST['pricereviewer'];
- $contracttype=$_POST['contracttype'];
- $Maintenanceoperationcategory=$_POST['Maintenanceoperationcategory'];
- $contractsigningnature=$_POST['contractsigningnature'];
- $contractsignname=$_POST['contractsignname'];
-
- $servicefee=$_POST['servicefee'];
- $managebili=$_POST['managebili'];
-
- $creater = $_POST['creater'];
- $create_at = date('Y/m/d H:i:s');
- $updatee_at=date('Y/m/d H:i:s');
-
- $db_query = "insert into maintance_contract_info(maintance_contract_id,sitename,contractor,contractsnum,siteaddress";
- $db_query .= ",contractsigningperiod,pricereviewer,contracttype,Maintenanceoperationcategory,contractsigningnature,contractsignname";
- $db_query .= ",creater,create_at,updatee_at,servicefee,managebili) values (";
- $db_query .= "'$maintance_contract_id', '$sitename', '$contractor', '$contractsnum', '$siteaddress', '$contractsigningperiod',";
- $db_query .= "'$pricereviewer', '$contracttype', '$Maintenanceoperationcategory', '$contractsigningnature','$contractsignname',";
- $db_query .= "'$creater', '$create_at', '$updatee_at','$servicefee','$managebili')";
-
- $result = mysqli_query($link, $db_query);
- if ($mid = mysqli_insert_id($link)) {
- header("Location: pricereview-index.php?account=".$_POST['account']);
- if (mysqli_affected_rows($link) > 0) {
- echo "";
- //header("Location: pricereview-index.php");
- } else {
- echo "";
- }
- } else {
- echo "";
- }
-
- mysqli_close($link);
-}
+
+
+ $v) {
+ $$k = htmlspecialchars(stripslashes(trim($v)));
+ }
+
+ $maintance_contract_id = $_POST['maintance_contract_id'];
+ $sitename = $_POST['sitename'];
+ $contractor = $_POST['contractor'];
+ $contractsnum = $_POST['contractsnum'];
+ $siteaddress = $_POST['siteaddress'];
+ $startdate = $_POST['startdate'];
+ $enddate = $_POST['enddate'];
+ $contractsigningperiod = $startdate . '_' . $enddate;
+ $pricereviewer = $_POST['pricereviewer'];
+ $contracttype = $_POST['contracttype'];
+ $Maintenanceoperationcategory = $_POST['Maintenanceoperationcategory'];
+ $contractsigningnature = $_POST['contractsigningnature'];
+ $contractsignname = $_POST['contractsignname'];
+
+ $servicefee = $_POST['servicefee'];
+ $managebili = $_POST['managebili'];
+
+ $creater = $_POST['creater'];
+ $create_at = date('Y/m/d H:i:s');
+ $updatee_at = date('Y/m/d H:i:s');
+
+ $db_query = "insert into maintance_contract_info(maintance_contract_id,sitename,contractor,contractsnum,siteaddress";
+ $db_query .= ",contractsigningperiod,pricereviewer,contracttype,Maintenanceoperationcategory,contractsigningnature,contractsignname";
+ $db_query .= ",creater,create_at,updatee_at,servicefee,managebili) values (";
+ $db_query .= "'$maintance_contract_id', '$sitename', '$contractor', '$contractsnum', '$siteaddress', '$contractsigningperiod',";
+ $db_query .= "'$pricereviewer', '$contracttype', '$Maintenanceoperationcategory', '$contractsigningnature','$contractsignname',";
+ $db_query .= "'$creater', '$create_at', '$updatee_at','$servicefee','$managebili')";
+
+ $result = mysqli_query($link, $db_query);
+ if ($mid = mysqli_insert_id($link)) {
+ header("Location: pricereview-index.php?account=" . $_POST['account']);
+ if (mysqli_affected_rows($link) > 0) {
+ echo "";
+ //header("Location: pricereview-index.php");
+ } else {
+ echo "";
+ }
+ } else {
+ echo "";
+ }
+
+ mysqli_close($link);
+}
?>
\ No newline at end of file
diff --git a/wms/T8_APItest.php b/wms/T8_APItest.php
index 029c9bd2..e174719a 100644
--- a/wms/T8_APItest.php
+++ b/wms/T8_APItest.php
@@ -12,42 +12,42 @@ echo "ii";
console.log(validation);
// var corsurl = 'http://cors-anywhere.herokuapp.com/';
- var apiurl = 'https:127.0.0.1:780/twWebAPI/V1/SALINCOMEAPPLY/PostERPData';
+ var apiurl = 'https://erp.masada.com.tw:780/twWebAPI/V1/SALINCOMEAPPLY/PostERPData';
headerParam = {
CHI_Authorization: `${validation}`,
};
var body = [{
"name": "salIncomeApplyMaster",
"rows": [{
- "BillNo": "Z001",
- "BillDate": 20160811,
+ "BillNo": "B23100061",
+ "BillDate": 20231220,
"OrgId": "1000",
"FOrgId": "1000",
- "TypeId": "RR",
+ "TypeId": "RAS",
"BpOrgId": "1000",
- "BizPartnerId": "C002",
- "CurrId": "RMB",
+ "BizPartnerId": "B23100061",
+ "CurrId": "TWD",
"CurrOAmount": 1,
"CurrLAmount": 1,
- "PersonId": "T001",
+ "PersonId": "M0065",
"DtOrgId": "1000",
- "DueToId": "C002",
- "TaxId": "123",
- "CompId": "1000"
+ "DueToId": "B23100061",
+ "TaxId": "ST005",
+ "CompId": "1001"
}]
},
{
"name": "salIncomeApplyDetail",
"rows": [{
- "BillNo": "Z001",
- "IncomeId": "F203",
- "TaxId": "ST003",
+ "BillNo": "B23100061",
+ "IncomeId": "A40003",
+ "TaxId": "ST005",
"RowCode": 1,
"ItemType": "1",
- "SPrice": 50,
- "SQuantity": 1,
+ "SPrice": 10000,
+ "SQuantity": 2,
"FromSourceTag": 0,
- "FromBillNo": "123"
+ "FromBillNo": ""
}]
}
];
@@ -56,9 +56,9 @@ echo "ii";
type: 'POST',
// url: `${corsurl}${apiurl}`,
url: `${apiurl}`,
- // dataType: 'json',
+ dataType: 'json',
headers: headerParam,
- // data: json,
+ data: json,
// dataType: "json",
success: function(res) {
console.log(res.Status);
diff --git a/wms/contract-repair/api/putContractData.php b/wms/contract-repair/api/putContractData.php
index cffa48a0..70f080ab 100644
--- a/wms/contract-repair/api/putContractData.php
+++ b/wms/contract-repair/api/putContractData.php
@@ -6,7 +6,7 @@ ini_set('date.timezone', 'Asia/Taipei');
if (isset($_POST['contracttype']) && $_POST['contracttype'] == 'r' && isset($_POST["id"]) && $_POST['id'] != "") {
try {
$create_date = date('Y-m-d H:i:s');
- $repair_no = !empty($POST['repair_no']) ? $_POST['repair_no'] : null;
+ $repair_no = !empty($_POST['repair_no']) ? $_POST['repair_no'] : null;
$contractno = !empty($_POST['contractno']) ? $_POST['contractno'] : null;
$company = !empty($_POST['company']) ? $_POST['company'] : null;
$taxid = !empty($_POST['taxid']) ? $_POST['taxid'] : null;
@@ -21,7 +21,7 @@ if (isset($_POST['contracttype']) && $_POST['contracttype'] == 'r' && isset($_PO
$fail_arr = [];
// if (empty($repair_no)) $fail_arr[] = '號為必填';
- if (empty($contractno)) $fail_arr[] = '合約號為必填';
+ // if (empty($contractno)) $fail_arr[] = '合約號為必填';
if (empty($company)) $fail_arr[] = '客戶名稱為必填';
if (empty($taxid)) $fail_arr[] = '統一編號為必填';
if (empty($facilityno)) $fail_arr[] = '電梯號為必填';
@@ -35,7 +35,7 @@ if (isset($_POST['contracttype']) && $_POST['contracttype'] == 'r' && isset($_PO
echo json_encode($fail_arr);
exit();
}
- // $conn->beginTransaction();
+ $conn->beginTransaction();
$sql = "UPDATE contract_r_signed_back SET
repaireid = :repaireid,facilityno= :facilityno, invoice=:invoice, taxid=:taxid, address=:address,type=:type,contract_status=:contract_status,update_user=:update_user,update_date=:update_date
@@ -56,135 +56,50 @@ if (isset($_POST['contracttype']) && $_POST['contracttype'] == 'r' && isset($_PO
// echo json_encode($sql);
// exit;
$stmt->execute();
+ t8Insert($_POST);
// header("HTTP/1.1 204 NO Content");
- // $conn->commit();
+ $conn->commit();
} catch (PDOException $e) {
// $conn->rollback();
header("HTTPP/1.1 500 Internal Server Error");
die('Error!:' . $e->getMessage());
}
}
-// if (isset($_POST['contractno']) && $_POST['contractno'] != "" && isset($_POST["id"]) && $_POST['id'] != "") {
-// try {
-// $created_at = date('Y-m-d H:i:s');
-// $created_by = $_POST['user_id'];
-// $id = $_POST["id"];
-// $contract_no = !empty($_POST['contractno']) ? $_POST['contractno'] : null;
-// $customer = !empty($_POST['customer']) ? $_POST['customer'] : null;
-// $manager = !empty($_POST['manager']) ? $_POST['manager'] : null;
-// $vat = !empty($_POST['vat']) ? $_POST['vat'] : null;
-// $case_name = !empty($_POST['case_name']) ? $_POST['case_name'] : null;
-// $linkman = !empty($_POST['linkman']) ? $_POST['linkman'] : null;
-// $lm_tel = !empty($_POST['lm_tel']) ? $_POST['lm_tel'] : null;
-// $address = !empty($_POST['address']) ? $_POST['address'] : null;
-// $salesman = !empty($_POST['salesman']) ? $_POST['salesman'] : null;
-// $qc = !empty($_POST['qc']) ? $_POST['qc'] : null;
-// $deletefiles = !empty($_POST['deletefiles']) ? $_POST['deletefiles'] : null;
-// $files_id = !empty($_POST['files_id']) ? $_POST['files_id'] : null;
-// $files = !empty($_FILES['files']) ? $_FILES['files'] : null;
-// $deletefilesArr = explode(',', $_POST['deletefiles']);
-// $fail_arr = [];
-// if (empty($contract_no)) $fail_arr[] = '合約號為必填';
-// if (empty($customer)) $fail_arr[] = '客戶名稱為必填';
-// if (empty($manager)) $fail_arr[] = '負責人為必填';
-// if (empty($vat)) $fail_arr[] = '統編/身分證為必填';
-// if (empty($case_name)) $fail_arr[] = '案名為必填';
-// if (empty($linkman)) $fail_arr[] = '聯絡人為必填';
-// if (empty($lm_tel)) $fail_arr[] = '聯絡人電話為必填';
-// if (empty($address)) $fail_arr[] = '地址為必填';
-// if (empty($salesman)) $fail_arr[] = '營業員為必填';
-// if (empty($qc)) $fail_arr[] = '請選擇QC或管檢';
-// if (count($fail_arr) > 0) {
-// header("HTTP/1.1 422 Unprocessable Entity");
-// echo json_encode($fail_arr);
-// exit();
-// }
+function t8Insert($data)
+{
+ require_once('../../contract/connt8.php');
+ $create_date = date('Y-m-dH-i-s');
+ $repair_no = !empty($data['repair_no']) ? $data['repair_no'] : null; // 報價單號
+ $company = !empty($data['company']) ? $data['company'] : null; //立約人
+ $repaireid = !empty($data['repaireid']) ? $data['repaireid'] : null; //維保人員
+ $facilityno = !empty($data['facilityno']) ? $data['facilityno'] : null; // 電梯編號
+ $type = !empty($data['type']) ? $data['type'] : null; //工程進度
+ $sign_date = !empty($data['sign_date']) ? $data['sign_date'] : null; //簽訂時間
+ $invoice = !empty($data['invoice']) ? $data['invoice'] : null; // 發票抬頭
+ $taxid = !empty($data['taxid']) ? $data['taxid'] : null; //統編
+ $address = !empty($data['address']) ? $data['address'] : null; //工程地址
+ $contract_status = !empty($data['contract_status']) ? $data['contract_status'] : null;
+ $user_id = !empty($_data['user_id']) ? $data['user_id'] : null;
-// $conn->beginTransaction();
+ $sign = str_replace("-", '', $sign_date);
+ $create = str_replace('-', '', $create_date);
-// $sql_str = "UPDATE contract_m_signed_back SET contract_no=:contract_no, customer=:customer, manager=:manager, vat=:vat, case_name=:case_name, linkman=:linkman, lm_tel=:lm_tel, address=:address, salesman=:salesman, qc_official_type=:qc WHERE id = :id";
-// $stmt = $conn->prepare($sql_str);
-// $stmt->bindParam(':contract_no', $contract_no);
-// $stmt->bindParam(':customer', $customer);
-// $stmt->bindParam(':manager', $manager);
-// $stmt->bindParam(':vat', $vat);
-// $stmt->bindParam(':case_name', $case_name);
-// $stmt->bindParam(':linkman', $linkman);
-// $stmt->bindParam(':lm_tel', $lm_tel);
-// $stmt->bindParam(':address', $address);
-// $stmt->bindParam(':salesman', $salesman);
-// $stmt->bindParam(':qc', $qc);
-// $stmt->bindParam(':id', $id);
-// $stmt->execute();
-// if (!empty($deletefiles)) {
-// $sql_str = "DELETE FROM contract_back_files WHERE id IN ($deletefiles)";
-// $stmt = $conn->prepare($sql_str);
-// $stmt->execute();
-// }
+ $sql = "INSERT INTO comBusinessPartner
+ (BizPartnerId,BizPartnerName,BusinessAttr,CountryId,BizToDate,TaxNo,ContactAddress,CreatorId,CreateTime,BizPartnerTypeId)
+ VALUES(:BizPartnerId,:BizPartnerName,1,'TW',99999999,:TaxNo,:ContactAddress,:CreatorId,:CreateTime,'10')";
+ $stmt = $connT8->prepare($sql);
+ $stmt->bindParam(':BizPartnerId', $repair_no); //報價單編號
+ $stmt->bindParam(':BizPartnerName', $company);
+ $stmt->bindParam(':TaxNo', $taxid);
+ $stmt->bindParam(':ContactAddress', $address);
+ $stmt->bindParam(':CreatorId', $user_id);
+ $stmt->bindParam(':CreateTime', $create);
+ $stmt->execute();
-// if (!empty($files)) {
-// $englisharr = range('a', 'z');
-// $files = $_FILES['files'];
-// $newfiles = [];
-// foreach ($files as $file) {
-// $i = 0; //新陣列的索引編號
-// foreach ($file as $key => $val) {
-// $newfiles[$i]['name'] = $files['name'][$key];
-// $newfiles[$i]['type'] = $files['type'][$key];
-// $newfiles[$i]['tmp_name'] = $files['tmp_name'][$key];
-// $newfiles[$i]['error'] = $files['error'][$key];
-// $newfiles[$i]['size'] = $files['size'][$key];
-// $i++;
-// } //foreach 第2層 end
-// }
-// $max_size = 4096 * 4096; //設定允許上傳檔案容量的最大值(1M)
-// $allow_ext = array('jpeg', 'jpg', 'png', 'JPG', 'JPEG', 'PNG', 'GIF'); //設定允許上傳檔案的類型
-// $path = '../images/contracts/';
-// if (!file_exists($path)) {
-// mkdir($path);
-// }
-// $msg_result = ''; //負責接收所有檔案檢測後的回傳訊息
-// $datetime = (string)date('YmdHis');
-// $files_id = ($files_id !== null) ? $files_id : 'm' . $datetime; // 新梯=>m + 日期時間
-// foreach ($newfiles as $key => $file) {
-// $randNum = rand(1000, 9999);
-// $randEnglish = $englisharr[rand(0, 25)];
-// $file_name = 'm' . (string)date('YmdHis') . $randNum . $randEnglish . $randNum . $file['name'];
-// $msg = upload_chk($file, $path, $max_size, $allow_ext, $file_name);
-// if ($msg == 1) {
-// $msg = '檔案傳送成功!';
-// $sql_str = "INSERT INTO contract_back_files (files_id, file_name, file_mime, file_size, created_at, created_by) VALUES (:files_id, :file_name, :file_mime, :file_size, :created_at, :created_by)";
-// $stmt = $conn->prepare($sql_str);
-// $stmt->bindParam(':files_id', $files_id);
-// $stmt->bindParam(':file_name', $file_name);
-// $stmt->bindParam(':file_mime', $file['type']);
-// $stmt->bindParam(':file_size', $file['size']);
-// $stmt->bindParam(':created_at', $created_at);
-// $stmt->bindParam(':created_by', $created_by);
-// $stmt->execute();
-// } else {
-// throw new PDOException('檔案上傳失敗:' . $msg);
-// }
-// $msg_result .= '第' . ($key + 1) . '個上傳檔案的結果:' . $msg . '
';
-// $src_name = $path . $file['name'];
-// if (file_exists($src_name)) {
-// //副檔名
-// $extname = pathinfo($src_name, PATHINFO_EXTENSION);
-// //主檔名
-// $basename = basename($src_name, '.' . $extname);
-// }
-// }
-// } else {
-// $files = null;
-// }
-// $conn->commit();
-// } catch (PDOException $e) {
-// $conn->rollback();
-// header("HTTP/1.1 500 Internal Server Error");
-// die('Error!:' . $e->getMessage());
-// }
-// }
+
+ $connT8->commit();
+}
diff --git a/wms/contract-repair/js/alpine.js b/wms/contract-repair/js/alpine.js
index 8ab51dfd..8877b11b 100644
--- a/wms/contract-repair/js/alpine.js
+++ b/wms/contract-repair/js/alpine.js
@@ -328,7 +328,7 @@ const contractRepair = () => {
nextStepFn() {
- if (this.data.contractno == '') return alert('合約號為必填')
+ if (this.data.repair_no == '') return alert('合約號為必填')
this.isLoading = true
if (this.step == 1) {
this.getContractDate();
@@ -503,7 +503,7 @@ const contractInput = () => {
fail_arr: [],
nextStepFn() {
if (this.step == 1) {
- if (this.data.repair_no == '') return alert('請輸入合約號');
+ if (this.data.contractno == '') return alert('請輸入合約號');
this.isLoading = true
this.getContractDate();
} else if (this.step == 2) {
diff --git a/wms/contract/api/postContractData.php b/wms/contract/api/postContractData.php
index 1789bfac..85b38f89 100644
--- a/wms/contract/api/postContractData.php
+++ b/wms/contract/api/postContractData.php
@@ -374,6 +374,7 @@ function T8insert($data, $facilityno)
$endDate = str_replace("-", '', $contract_end_date);
if ($contractno == '') {
echo 'Error';
+ exit;
}
if (empty($result)) {
// 若 客戶資料為空,新增一筆到 comCustomer
diff --git a/wms/fun_global.php b/wms/fun_global.php
index 7da2f70c..c57b3a3d 100644
--- a/wms/fun_global.php
+++ b/wms/fun_global.php
@@ -86,7 +86,7 @@ function manage_class($user_id, &$ret = [])
function pricereview_class($rate, $user_id, &$ret = [], $special_fee)
{
global $link;
-
+
$sql = "select manager from account where accountid = '$user_id'";
$res = mysqli_query($link, $sql);
while ($row = mysqli_fetch_assoc($res)) {
@@ -97,9 +97,9 @@ function pricereview_class($rate, $user_id, &$ret = [], $special_fee)
} else {
$ret[2] = "M0024,,<##>M0107,,"; // 業務部專員:M0024許伃廷、M0107許紓晴(第2關有多位審核人)
$ret[3] = "M0060,,"; // 業務協理
- if ($rate < 80 || $special_fee > 0){
+ if ($rate < 80 || $special_fee > 0) {
$ret[4] = "M0006,,"; // 總經理
- }
+ }
}
}
mysqli_free_result($res);
@@ -129,13 +129,14 @@ function pricereview_renovate_class($rate, $user_id, $renovate_flag)
}
}
mysqli_free_result($res);
-
+ $ret[2] = 'M0012';
if ($renovate_flag == "REN") {
- if ($rate < 80) $ret[3] = "M0008"; // 詹總
- if ($rate < 60) $ret[4] = "M0006"; // 總經理
+ // $ret[2] = 'M0012';
+ if ($rate < 1000) $ret[3] = "M0008"; // 詹總
+ if ($rate < 75) $ret[4] = "M0006"; // 總經理
} else {
// 全汰改
- if ($rate < 80) $ret[3] = "M0008"; // 詹總
+ if ($rate < 1000) $ret[3] = "M0008"; // 詹總
if ($rate < 75) $ret[4] = "M0006"; // 總經理
}
@@ -612,15 +613,14 @@ function collect_month($contractday)
$latest_timestamp = $contractday;
$latest_date = new DateTime();
$latest_date->setTimestamp($latest_timestamp);
- if($latest_timestamp < $today_date->getTimestamp()) {
+ if ($latest_timestamp < $today_date->getTimestamp()) {
$interval = $latest_date->diff($today_date);
$interval2 = $latest_date->diff($today_date);
$year = $interval2->format('%y');
$month = $interval->format('%m');
$total_month = $year * 12 + $month;
return $total_month;
- }else{
+ } else {
return 0;
}
-
}
diff --git a/wms/mkt/pricereview-index.php b/wms/mkt/pricereview-index.php
index 20ab2b61..662b9a05 100644
--- a/wms/mkt/pricereview-index.php
+++ b/wms/mkt/pricereview-index.php
@@ -246,6 +246,10 @@ if ($data) :
} elseif ($data["status"] == "YS") {
?>
填規調
+
+ 重填規調
-
-
+
+
待申請
-
+
-
-
+
+
-
+
diff --git a/wms/mkt/pricereview-record-submit.php b/wms/mkt/pricereview-record-submit.php
index 6d8fb233..1772ae02 100644
--- a/wms/mkt/pricereview-record-submit.php
+++ b/wms/mkt/pricereview-record-submit.php
@@ -1,6 +1,7 @@
$v) {
$$k = htmlspecialchars(stripslashes(trim($v)));
}
@@ -67,9 +68,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$temp_file_name = $_FILES["attatch1"]["tmp_name"];
$file_size = $_FILES["attatch1"]["size"];
$img_file_type = pathinfo($file_name, PATHINFO_EXTENSION);
- $target_file1 = $target_dir.$vol_no."-price-".$tds.".".$img_file_type;
+ $target_file1 = $target_dir . $vol_no . "-price-" . $tds . "." . $img_file_type;
$upload_ok = 1;
- foreach (glob($target_dir.$vol_no."-price-*") as $todelfile) {
+ foreach (glob($target_dir . $vol_no . "-price-*") as $todelfile) {
unlink($todelfile);
}
$upload_res_1 = move_uploaded_file($temp_file_name, $target_file1);
@@ -81,9 +82,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$temp_file_name = $_FILES["attatch2"]["tmp_name"];
$file_size = $_FILES["attatch2"]["size"];
$img_file_type = pathinfo($file_name, PATHINFO_EXTENSION);
- $target_file2 = $target_dir.$vol_no."-appendix-".$tds.".".$img_file_type;
+ $target_file2 = $target_dir . $vol_no . "-appendix-" . $tds . "." . $img_file_type;
$upload_ok = 1;
- foreach (glob($target_dir.$vol_no."-appendix-*") as $todelfile) {
+ foreach (glob($target_dir . $vol_no . "-appendix-*") as $todelfile) {
unlink($todelfile);
}
$upload_res_2 = move_uploaded_file($temp_file_name, $target_file2);
@@ -156,7 +157,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
*/
$item_no = 1;
- for ($i=0; $i", $option_relate_facil_arr[$i]);
foreach ($tmp_arr as $val) {
- $option_relate_spec .= substr($val, 0, strpos($val, ".")).",";
+ $option_relate_spec .= substr($val, 0, strpos($val, ".")) . ",";
}
$option_relate_spec = rtrim($option_relate_spec, ",");
/*
@@ -226,16 +227,16 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$mn_memo_arr = explode("@@,", rtrim($mn_memo_all, "@@"));
$mn_relate_facil_arr = explode(",", htmlspecialchars_decode($mn_relate_facil_all));
$item_no = 1;
- for ($i=0; $i", $mn_relate_facil_arr[$i]);
foreach ($tmp_arr as $val) {
- $option_relate_spec .= substr($val, 0, strpos($val, ".")).",";
+ $option_relate_spec .= substr($val, 0, strpos($val, ".")) . ",";
}
$option_relate_spec = rtrim($option_relate_spec, ",");
$db_query = "insert into pricereview_item (mid, price_id, item_no, item_group, item_spec, option_relate_spec, item_unit_price, item_qty, item_price_bp, note, memo) values (";
@@ -253,7 +254,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$except_qty_arr = explode(",", $except_qty_all);
$except_price_bp_arr = explode(",", $except_price_bp_all);
$item_no = 1;
- for ($i=0; $i $uemail) {
- $mail_list[] = [$uid, $uemail];
+ $mail_list[] = [$uid, $uemail];
}
- include dirname(__DIR__)."/class/Cmail.php";
+ include dirname(__DIR__) . "/class/Cmail.php";
$sendmail = new Cmail;
- $title = "【新梯價審通知】卷號:".$contractno;
+ $title = "【新梯價審通知】卷號:" . $contractno;
$content = "您有待簽核案件,請至客戶管理 > 價格審查_新梯,點擊「待簽核」進行作業,謝謝! ";
$sendmail->sendx($title, $content, $mail_list);
}
@@ -324,14 +325,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
mysqli_close($link);
if ($affected > 0) {
echo "";
} else {
echo "";
}
}
-?>
\ No newline at end of file
diff --git a/wms/mkt/pricereview_renovate-check.php b/wms/mkt/pricereview_renovate-check.php
index 0fde252d..299b3bd9 100644
--- a/wms/mkt/pricereview_renovate-check.php
+++ b/wms/mkt/pricereview_renovate-check.php
@@ -1,1101 +1,1122 @@
-";
- echo "alert('資料錯誤!!');";
- echo "window.history.go(-1);";
- echo "";
- exit;
- }
-}
-
-// 員工編號對應姓名表
-$accountname_arr = accountid2name();
-
-// 審核按鈕開關
-$sign_on = 0;
-
-$data = $item_arr = $option_arr = $mn_arr = $ex_arr = $demolition_arr = $pay_arr = array();
-$checker_1_result = $checker_2_result = $checker_3_result = $checker_4_result = "";
-$db_query = "select * from pricereview_main where id = '$id'";
-/*
-if ($res = mysqli_query($link, $db_query)) {
- while ($row = mysqli_fetch_row($res)) {
- list($id, $version, $company)
- }
-}
-*/
-$res = mysqli_query($link, $db_query);
-foreach ($res as $data) {
- // 上層主管
- $sql = "select manager from account where accountid = '".$data["person"]."'";
- $res_a = mysqli_query($link, $sql);
- $row_a = mysqli_fetch_row($res_a);
- $manager = $row_a[0];
- mysqli_free_result($res_a);
- // 瀏覽MI權限
- $depart_id = accountidToDepartId($user_id);
- if ($depart_id == "320" || $depart_id == "321" || $depart_id == "20" || $user_id == "M0008") $viewmi = 1;
- else $viewmi = 0;
-
- $sql = "select * from pricereview_sign where mid = '$id'";
- $res_s = mysqli_query($link, $sql);
- $row_s = mysqli_fetch_assoc($res_s);
- mysqli_free_result($res_s);
- if (!empty($row_s["sign1"])) list($person1, $status1, $dtte1) = explode(",", $row_s["sign1"]);
- else $person1 = $status1 = $dtte1 = "";
- if (!empty($row_s["sign2"])) {
- if ($st == 2 && (preg_match("/Y/", $row_s["sign2"]) || preg_match("/N/", $row_s["sign2"]))) {
- echo "";
- exit;
- }
- $sign2_arr = explode("<##>", $row_s["sign2"]); // M0024,,<##>M0175,,
- $person2_arr = [];
- foreach ($sign2_arr as $v) {
- list($person2, $status2, $dtte2) = explode(",", $v);
- if (strlen($v) == 7) { // 未審
- $person2_arr[] = $person2;
- } else {
- unset($person2_arr);
- break;
- }
- }
- } else $person2 = $status2 = $dtte2 = "";
- if (!empty($row_s["sign3"])) list($person3, $status3, $dtte3) = explode(",", $row_s["sign3"]);
- else $person3 = $status3 = $dtte3 = "";
- if (!empty($row_s["sign4"])) list($person4, $status4, $dtte4) = explode(",", $row_s["sign4"]);
- else $person4 = $status4 = $dtte4 = "";
- $sign1_note = (empty($row_s["sign1_note"])) ? "" : $row_s["sign1_note"];
- $sign2_note = (empty($row_s["sign2_note"])) ? "" : $row_s["sign2_note"];
- $sign3_note = (empty($row_s["sign3_note"])) ? "" : $row_s["sign3_note"];
- $sign4_note = (empty($row_s["sign4_note"])) ? "" : $row_s["sign4_note"];
- if ($status1 == "Y") {
- $checker_1_result = "同意";
- } elseif ($status1 == "N") {
- $checker_1_result = "不同意";
- }
- if ($status2 == "Y") {
- $checker_2_result = "同意";
- } elseif ($status2 == "N") {
- $checker_2_result = "不同意";
- }
- if ($status3 == "Y") {
- $checker_3_result = "同意";
- } elseif ($status3 == "N") {
- $checker_3_result = "不同意";
- }
- if ($status4 == "Y") {
- $checker_4_result = "同意";
- } elseif ($status4 == "N") {
- $checker_4_result = "不同意";
- }
- if ($st == 1 && ($person1 == $user_id) && ($status1 == "")) {
- $sign_on = 1;
- }
- if ($st == 2 && ($person2 == $user_id || (isset($person2_arr) && in_array($user_id, $person2_arr))) && ($status2 == "")) {
- $sign_on = 1;
- }
- if ($st == 3 && ($person3 == $user_id) && ($status3 == "")) {
- $sign_on = 1;
- }
- if ($st == 4 && ($person4 == $user_id) && ($status4 == "")) {
- $sign_on = 1;
- }
- // $sign_total=關卡數
- if ($person4 == "") {
- if ($person3 == "") {
- $sign_total = 1;
- } else {
- $sign_total = 2;
- }
- } else {
- $sign_total = 3;
- }
- /*
- if (!$data["checker_1"] && !$data["checker_2"] && !$data["checker_3"]) $allow_st = 1;
- else if (!$data["checker_2"] && !$data["checker_3"]) $allow_st = 2;
- else if (!$data["checker_3"]) $allow_st = 3;
- if ($data["checker_1_result"]) {
- if ($data["checker_1_result"] == "Y") $checker_1_result = "通過";
- else if ($data["checker_1_result"] == "N") {
- $stopchk = 1;
- $checker_1_result = "拒絕";
- }
- }
- if ($data["checker_2_result"]) {
- if ($data["checker_2_result"] == "Y") $checker_2_result = "通過";
- else if ($data["checker_2_result"] == "N") {
- $stopchk = 1;
- $checker_2_result = "拒絕";
- }
- }
- if ($data["checker_3_result"]) {
- if ($data["checker_3_result"] == "Y") $checker_3_result = "通過";
- else if ($data["checker_3_result"] == "N") {
- $stopchk = 1;
- $checker_3_result = "拒絕";
- }
- }
- */
-
- /*
- if ($st != $allow_st) {
- mysqli_free_result($res);
- mysqli_close($link);
- echo "";
- }
- */
- $mid = $data["id"];
- $data["qty_total"] = 0;
- $db_query = "select * from pricereview_item where mid = '$mid' order by item_group, item_no";
- $res_i = mysqli_query($link, $db_query);
- while ($row = mysqli_fetch_assoc($res_i)) {
- if ($row['item_group'] == "A") {
- $item_arr[$row['item_no']]['item_spec'] = $row['item_spec'];
- $item_arr[$row['item_no']]['item_unit_price'] = $row['item_unit_price'];
- $item_arr[$row['item_no']]['item_qty'] = $row['item_qty'];
- $item_arr[$row['item_no']]['item_price_bp'] = $row['item_price_bp'];
- $item_arr[$row['item_no']]['item_price_ct'] = $row['item_price_ct'];
- $item_arr[$row['item_no']]['item_price'] = $row['item_price'];
- $item_arr[$row['item_no']]['pv_rate'] = $row['pv_rate'];
- $item_arr[$row['item_no']]['allocate'] = $row['allocate'];
- $item_arr[$row['item_no']]['gross_profit'] = $row['gross_profit'];
- $item_arr[$row['item_no']]['gross_profit_rate'] = $row['gross_profit_rate'];
- $item_arr[$row['item_no']]['note'] = $row['note'];
- $item_arr[$row['item_no']]['mi_fix'] = $row['mi_fix'];
- $data["qty_total"] += $row["item_qty"];
- $sql_spec = "select sub_item_id from specsurvey_main where mid = '$mid' and pr_item_id = '".$row['item_no']."' order by sub_item_id";
- $res_spec = mysqli_query($link, $sql_spec);
- while ($row_spec = mysqli_fetch_row($res_spec)) {
- $item_arr[$row['item_no']]['sub_item_id'][] = $row_spec[0];
- }
- mysqli_free_result($res_spec);
- } elseif ($row['item_group'] == "B") {
- $option_arr[$row['item_no']]['item_spec'] = $row['item_spec'];
- $option_arr[$row['item_no']]['item_unit_price'] = $row['item_unit_price'];
- $option_arr[$row['item_no']]['item_qty'] = $row['item_qty'];
- $option_arr[$row['item_no']]['item_price_bp'] = $row['item_price_bp'];
- $option_arr[$row['item_no']]['memo'] = $row['memo'];
- $option_arr[$row['item_no']]['option_relate_spec'] = $row['option_relate_spec'];
- } elseif ($row['item_group'] == "D") {
- $mn_arr[$row['item_no']]['item_spec'] = $row['item_spec'];
- $mn_arr[$row['item_no']]['item_unit_price'] = $row['item_unit_price'];
- $mn_arr[$row['item_no']]['item_qty'] = $row['item_qty'];
- $mn_arr[$row['item_no']]['item_price_bp'] = $row['item_price_bp'];
- $mn_arr[$row['item_no']]['note'] = $row['note'];
- $mn_arr[$row['item_no']]['memo'] = $row['memo'];
- $mn_arr[$row['item_no']]['option_relate_spec'] = $row['option_relate_spec'];
- } elseif ($row['item_group'] == "E") {
- $ex_arr[$row['item_no']]['item_spec'] = $row['item_spec'];
- $ex_arr[$row['item_no']]['item_unit_price'] = $row['item_unit_price'];
- $ex_arr[$row['item_no']]['item_qty'] = $row['item_qty'];
- $ex_arr[$row['item_no']]['item_price_bp'] = $row['item_price_bp'];
- $ex_arr[$row['item_no']]['note'] = $row['note'];
- } elseif ($row['item_group'] == "C") {
- $demolition_arr[$row['item_no']]['item_spec'] = $row['item_spec'];
- $demolition_arr[$row['item_no']]['item_unit_price'] = $row['item_unit_price'];
- $demolition_arr[$row['item_no']]['item_qty'] = $row['item_qty'];
- $demolition_arr[$row['item_no']]['item_price_bp'] = $row['item_price_bp'];
- $demolition_arr[$row['item_no']]['note'] = $row['note'];
- }
- }
- mysqli_free_result($res_i);
- $data["price_total_broken"] = $data["price_total"] - $data["price_lowest"];
- $data["price_broken"] = ($data["qty_total"]) ? round($data["price_total_broken"]/$data["qty_total"], 1) : 0;
-
- // 付款辦法
- $pay_all_scale = $pay_all_amount = 0;
- $sql = "select * from pricereview_pay where mid = '$mid' order by pay_kind";
- $res_p = mysqli_query($link, $sql);
- while ($row_p = mysqli_fetch_assoc($res_p)) {
- $pay_arr[$row_p["pay_kind"]]["pay_scale"] = $row_p["pay_scale"];
- $pay_arr[$row_p["pay_kind"]]["pay_amount"] = $row_p["pay_amount"];
- $pay_arr[$row_p["pay_kind"]]["pay_period"] = $row_p["pay_period"];
- $pay_arr[$row_p["pay_kind"]]["pay_note"] = $row_p["pay_note"];
- $pay_all_scale += $row_p["pay_scale"];
- $pay_all_amount += $row_p["pay_amount"];
- }
- mysqli_free_result($res_p);
- ?>
-
-
-
-
-
-
-";
+ echo "alert('資料錯誤!!');";
+ echo "window.history.go(-1);";
+ echo "";
+ exit;
+ }
+}
+
+// 員工編號對應姓名表
+$accountname_arr = accountid2name();
+
+// 審核按鈕開關
+$sign_on = 0;
+
+$data = $item_arr = $option_arr = $mn_arr = $ex_arr = $demolition_arr = $pay_arr = array();
+$checker_1_result = $checker_2_result = $checker_3_result = $checker_4_result = "";
+$db_query = "select * from pricereview_main where id = '$id'";
+/*
+if ($res = mysqli_query($link, $db_query)) {
+ while ($row = mysqli_fetch_row($res)) {
+ list($id, $version, $company)
+ }
+}
+*/
+$res = mysqli_query($link, $db_query);
+foreach ($res as $data) {
+ // 上層主管
+ $sql = "select manager from account where accountid = '" . $data["person"] . "'";
+ $res_a = mysqli_query($link, $sql);
+ $row_a = mysqli_fetch_row($res_a);
+ $manager = $row_a[0];
+ mysqli_free_result($res_a);
+ // 瀏覽MI權限
+ $depart_id = accountidToDepartId($user_id);
+ if ($depart_id == "320" || $depart_id == "321" || $depart_id == "20" || $user_id == "M0008") $viewmi = 1;
+ else $viewmi = 0;
+
+ $sql = "select * from pricereview_sign where mid = '$id'";
+ $res_s = mysqli_query($link, $sql);
+ $row_s = mysqli_fetch_assoc($res_s);
+ mysqli_free_result($res_s);
+ if (!empty($row_s["sign1"])) list($person1, $status1, $dtte1) = explode(",", $row_s["sign1"]);
+ else $person1 = $status1 = $dtte1 = "";
+ if (!empty($row_s["sign2"])) {
+ if ($st == 2 && (preg_match("/Y/", $row_s["sign2"]) || preg_match("/N/", $row_s["sign2"]))) {
+ echo "";
+ exit;
+ }
+ $sign2_arr = explode("<##>", $row_s["sign2"]); // M0024,,<##>M0175,,
+ $person2_arr = [];
+ foreach ($sign2_arr as $v) {
+ list($person2, $status2, $dtte2) = explode(",", $v);
+ if (strlen($v) == 7) { // 未審
+ $person2_arr[] = $person2;
+ } else {
+ unset($person2_arr);
+ break;
+ }
+ }
+ } else $person2 = $status2 = $dtte2 = "";
+ if (!empty($row_s["sign3"])) list($person3, $status3, $dtte3) = explode(",", $row_s["sign3"]);
+ else $person3 = $status3 = $dtte3 = "";
+ if (!empty($row_s["sign4"])) list($person4, $status4, $dtte4) = explode(",", $row_s["sign4"]);
+ else $person4 = $status4 = $dtte4 = "";
+ $sign1_note = (empty($row_s["sign1_note"])) ? "" : $row_s["sign1_note"];
+ $sign2_note = (empty($row_s["sign2_note"])) ? "" : $row_s["sign2_note"];
+ $sign3_note = (empty($row_s["sign3_note"])) ? "" : $row_s["sign3_note"];
+ $sign4_note = (empty($row_s["sign4_note"])) ? "" : $row_s["sign4_note"];
+ if ($status1 == "Y") {
+ $checker_1_result = "同意";
+ } elseif ($status1 == "N") {
+ $checker_1_result = "不同意";
+ }
+ if ($status2 == "Y") {
+ $checker_2_result = "同意";
+ } elseif ($status2 == "N") {
+ $checker_2_result = "不同意";
+ }
+ if ($status3 == "Y") {
+ $checker_3_result = "同意";
+ } elseif ($status3 == "N") {
+ $checker_3_result = "不同意";
+ }
+ if ($status4 == "Y") {
+ $checker_4_result = "同意";
+ } elseif ($status4 == "N") {
+ $checker_4_result = "不同意";
+ }
+ if ($st == 1 && ($person1 == $user_id) && ($status1 == "")) {
+ $sign_on = 1;
+ }
+ if ($st == 2 && ($person2 == $user_id || (isset($person2_arr) && in_array($user_id, $person2_arr))) && ($status2 == "")) {
+ $sign_on = 1;
+ }
+ if ($st == 3 && ($person3 == $user_id) && ($status3 == "")) {
+ $sign_on = 1;
+ }
+ if ($st == 4 && ($person4 == $user_id) && ($status4 == "")) {
+ $sign_on = 1;
+ }
+ // $sign_total=關卡數
+ if ($person4 == "") {
+ if ($person3 == "") {
+ $sign_total = 1;
+ } else {
+ $sign_total = 2;
+ }
+ } else {
+ $sign_total = 3;
+ }
+ /*
+ if (!$data["checker_1"] && !$data["checker_2"] && !$data["checker_3"]) $allow_st = 1;
+ else if (!$data["checker_2"] && !$data["checker_3"]) $allow_st = 2;
+ else if (!$data["checker_3"]) $allow_st = 3;
+ if ($data["checker_1_result"]) {
+ if ($data["checker_1_result"] == "Y") $checker_1_result = "通過";
+ else if ($data["checker_1_result"] == "N") {
+ $stopchk = 1;
+ $checker_1_result = "拒絕";
+ }
+ }
+ if ($data["checker_2_result"]) {
+ if ($data["checker_2_result"] == "Y") $checker_2_result = "通過";
+ else if ($data["checker_2_result"] == "N") {
+ $stopchk = 1;
+ $checker_2_result = "拒絕";
+ }
+ }
+ if ($data["checker_3_result"]) {
+ if ($data["checker_3_result"] == "Y") $checker_3_result = "通過";
+ else if ($data["checker_3_result"] == "N") {
+ $stopchk = 1;
+ $checker_3_result = "拒絕";
+ }
+ }
+ */
+
+ /*
+ if ($st != $allow_st) {
+ mysqli_free_result($res);
+ mysqli_close($link);
+ echo "";
+ }
+ */
+ $mid = $data["id"];
+ $data["qty_total"] = 0;
+ $db_query = "select * from pricereview_item where mid = '$mid' order by item_group, item_no";
+ $res_i = mysqli_query($link, $db_query);
+ while ($row = mysqli_fetch_assoc($res_i)) {
+ if ($row['item_group'] == "A") {
+ $item_arr[$row['item_no']]['item_spec'] = $row['item_spec'];
+ $item_arr[$row['item_no']]['item_unit_price'] = $row['item_unit_price'];
+ $item_arr[$row['item_no']]['item_qty'] = $row['item_qty'];
+ $item_arr[$row['item_no']]['item_price_bp'] = $row['item_price_bp'];
+ $item_arr[$row['item_no']]['item_price_ct'] = $row['item_price_ct'];
+ $item_arr[$row['item_no']]['item_price'] = $row['item_price'];
+ $item_arr[$row['item_no']]['pv_rate'] = $row['pv_rate'];
+ $item_arr[$row['item_no']]['allocate'] = $row['allocate'];
+ $item_arr[$row['item_no']]['gross_profit'] = $row['gross_profit'];
+ $item_arr[$row['item_no']]['gross_profit_rate'] = $row['gross_profit_rate'];
+ $item_arr[$row['item_no']]['note'] = $row['note'];
+ $item_arr[$row['item_no']]['mi_fix'] = $row['mi_fix'];
+ $data["qty_total"] += $row["item_qty"];
+ $sql_spec = "select sub_item_id from specsurvey_main where mid = '$mid' and pr_item_id = '" . $row['item_no'] . "' order by sub_item_id";
+ $res_spec = mysqli_query($link, $sql_spec);
+ while ($row_spec = mysqli_fetch_row($res_spec)) {
+ $item_arr[$row['item_no']]['sub_item_id'][] = $row_spec[0];
+ }
+ mysqli_free_result($res_spec);
+ } elseif ($row['item_group'] == "B") {
+ $option_arr[$row['item_no']]['item_spec'] = $row['item_spec'];
+ $option_arr[$row['item_no']]['item_unit_price'] = $row['item_unit_price'];
+ $option_arr[$row['item_no']]['item_qty'] = $row['item_qty'];
+ $option_arr[$row['item_no']]['item_price_bp'] = $row['item_price_bp'];
+ $option_arr[$row['item_no']]['memo'] = $row['memo'];
+ $option_arr[$row['item_no']]['option_relate_spec'] = $row['option_relate_spec'];
+ } elseif ($row['item_group'] == "D") {
+ $mn_arr[$row['item_no']]['item_spec'] = $row['item_spec'];
+ $mn_arr[$row['item_no']]['item_unit_price'] = $row['item_unit_price'];
+ $mn_arr[$row['item_no']]['item_qty'] = $row['item_qty'];
+ $mn_arr[$row['item_no']]['item_price_bp'] = $row['item_price_bp'];
+ $mn_arr[$row['item_no']]['note'] = $row['note'];
+ $mn_arr[$row['item_no']]['memo'] = $row['memo'];
+ $mn_arr[$row['item_no']]['option_relate_spec'] = $row['option_relate_spec'];
+ } elseif ($row['item_group'] == "E") {
+ $ex_arr[$row['item_no']]['item_spec'] = $row['item_spec'];
+ $ex_arr[$row['item_no']]['item_unit_price'] = $row['item_unit_price'];
+ $ex_arr[$row['item_no']]['item_qty'] = $row['item_qty'];
+ $ex_arr[$row['item_no']]['item_price_bp'] = $row['item_price_bp'];
+ $ex_arr[$row['item_no']]['note'] = $row['note'];
+ } elseif ($row['item_group'] == "C") {
+ $demolition_arr[$row['item_no']]['item_spec'] = $row['item_spec'];
+ $demolition_arr[$row['item_no']]['item_unit_price'] = $row['item_unit_price'];
+ $demolition_arr[$row['item_no']]['item_qty'] = $row['item_qty'];
+ $demolition_arr[$row['item_no']]['item_price_bp'] = $row['item_price_bp'];
+ $demolition_arr[$row['item_no']]['note'] = $row['note'];
+ }
+ }
+ mysqli_free_result($res_i);
+ $data["price_total_broken"] = $data["price_total"] - $data["price_lowest"];
+ $data["price_broken"] = ($data["qty_total"]) ? round($data["price_total_broken"] / $data["qty_total"], 1) : 0;
+
+ // 付款辦法
+ $pay_all_scale = $pay_all_amount = 0;
+ $sql = "select * from pricereview_pay where mid = '$mid' order by pay_kind";
+ $res_p = mysqli_query($link, $sql);
+ while ($row_p = mysqli_fetch_assoc($res_p)) {
+ $pay_arr[$row_p["pay_kind"]]["pay_scale"] = $row_p["pay_scale"];
+ $pay_arr[$row_p["pay_kind"]]["pay_amount"] = $row_p["pay_amount"];
+ $pay_arr[$row_p["pay_kind"]]["pay_period"] = $row_p["pay_period"];
+ $pay_arr[$row_p["pay_kind"]]["pay_note"] = $row_p["pay_note"];
+ $pay_all_scale += $row_p["pay_scale"];
+ $pay_all_amount += $row_p["pay_amount"];
+ }
+ mysqli_free_result($res_p);
+?>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/wms/mkt/pricereview_renovate-create.php b/wms/mkt/pricereview_renovate-create.php
index a17d3e41..f03fd7cf 100644
--- a/wms/mkt/pricereview_renovate-create.php
+++ b/wms/mkt/pricereview_renovate-create.php
@@ -2,6 +2,15 @@
include "../header.php";
$vol_no = $_REQUEST["vol_no"]; // 從有望客戶過來:卷號
+$id = $_GET['id'];
+
+// $sql = "SELECT * FROM pricereview_main WHERE id = $id";
+// $result1 = mysqli_query($link, $sql);
+// if (!empty($result1)) {
+// $sql = "UPDATE pricereview_main SET status = 'D' WHERE id = $id";
+// $result = mysqli_query($link, $sql);
+// }
+
// 營業員只建自己客戶的價審單
$sql = "select pre_order_date, case_name from hope_elevator_customer where salesman = '$user_id' and vol_no = '$vol_no'";
@@ -1311,32 +1320,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
*/
?>
|