diff --git a/wms/api/bpm/draw_update.php b/wms/api/bpm/draw_update.php new file mode 100644 index 00000000..f22bbc31 --- /dev/null +++ b/wms/api/bpm/draw_update.php @@ -0,0 +1,8 @@ + true +], JSON_UNESCAPED_UNICODE); + + +?> diff --git a/wms/estimated_shipping_date_report.php b/wms/estimated_shipping_date_report.php index 606b06b7..920a7ecf 100644 --- a/wms/estimated_shipping_date_report.php +++ b/wms/estimated_shipping_date_report.php @@ -8,8 +8,8 @@ use PhpOffice\PhpSpreadsheet\Style\Fill; include "header.php"; -$start_y = empty($_POST['start_month']) ? '2023' : substr($_POST['start_month'], 0, 4); -$end_y = empty($_POST['end_month']) ? '2023' : substr($_POST['end_month'], 0, 4); +$start_y = empty($_POST['start_month']) ? date("Y") : substr($_POST['start_month'], 0, 4); +$end_y = empty($_POST['end_month']) ? date("Y") : substr($_POST['end_month'], 0, 4); $start_m = empty($_POST['start_month']) ? '01' : substr($_POST['start_month'], 5, 2); $end_m = empty($_POST['end_month']) ? '12' : substr($_POST['end_month'], 5, 2); @@ -29,8 +29,8 @@ $sql = " w.contract_type FROM wipwholestatus AS w WHERE status = '1' - AND real_contract_arrival_date >= '$start_y-$start_m-1' - AND real_contract_arrival_date <= '$end_y-$end_m-31' + AND DATE_FORMAT(real_contract_arrival_date, '%Y-%m-%d') >= '$start_y-$start_m-01' + AND DATE_FORMAT(real_contract_arrival_date, '%Y-%m-%d') <= '$end_y-$end_m-31' ) AS this_order WHERE 1 = 1 GROUP BY this_order.contract_type, @@ -38,6 +38,7 @@ $sql = " this_order.date_year, this_order.date_month "; + $result = mysqli_query($link, $sql); $data = []; while ($row = $result->fetch_assoc()) { @@ -286,7 +287,8 @@ function alpha2num($a) return $n - 1; } if ($_SERVER["REQUEST_METHOD"] == 'POST') { - if ($_POST['excel_output'] == 'excel_output') { + $excel_output = !empty($_POST['excel_output']) ? $_POST['excel_output'] : ''; + if ($excel_output == 'excel_output') { $spreadsheet = new Spreadsheet(); $sheet = $spreadsheet->getActiveSheet(); $sheet->setTitle('出貨總表'); diff --git a/wms/maintainance_contract_payment_status.php b/wms/maintainance_contract_payment_status.php new file mode 100644 index 00000000..4c4cda2a --- /dev/null +++ b/wms/maintainance_contract_payment_status.php @@ -0,0 +1,399 @@ +query($sql); + +function getContractnoDetails($link, $user_id, $contractno = null) +{ + $sql = " + SELECT + c.contractno + FROM contract AS c + LEFT JOIN con_maintance_examine_apply AS cmea + ON c.contractno = cmea.vol_no + WHERE 1 = 1 + AND cmea.salesman IN (" . getAccountids($link, $user_id) . ") + "; + if (!empty($contractno)) { + $sql .= " + AND c.contractno = '$contractno' + "; + } + $result = mysqli_query($link, $sql); + $data = []; + foreach ($result as $row) { + array_push($data, $row['contractno']); + } + return "'" . implode("','", $data) . "'"; +} + +function getSalesmanNo($link, $contractno) +{ + $sql = " + SELECT + cmea.salesman + FROM contract AS c + LEFT JOIN con_maintance_examine_apply AS cmea + ON c.contractno = cmea.vol_no + WHERE 1 = 1 + AND c.contractno IN ('$contractno') + "; + $result = mysqli_query($link, $sql); + $data = []; + foreach ($result as $row) + return $row['salesman']; + return ""; +} +function getSalesmanName($link, $contractno) +{ + $sql = " + SELECT + a.name + FROM contract AS c + LEFT JOIN con_maintance_examine_apply AS cmea + ON c.contractno = cmea.vol_no + LEFT JOIN account AS a + ON cmea.salesman = a.accountid + WHERE 1 = 1 + AND c.contractno IN ('$contractno') + "; + $result = mysqli_query($link, $sql); + $data = []; + foreach ($result as $row) + return $row['name']; + return ""; +} + +function getAccountids($link, $user_id) +{ + $sql = " + SELECT + accountid + FROM account + WHERE 1 = 1 + AND (accountid = '$user_id' + OR accountid IN ( + SELECT + accountid + FROM account + WHERE 1 = 1 + AND manager = '$user_id' + AND accounttype IN ('B','E','M','W') + ) + ) + "; + $result = mysqli_query($link, $sql); + $data = []; + foreach ($result as $row) { + array_push($data, $row['accountid']); + } + return "'" . implode("','", $data) . "'"; +} + +function checkArCheckBillStatus($row) +{ + $CU_EstPayDate = $row['CU_EstPayDate']; + $BillNo2 = $row['BillNo2']; + if (substr($CU_EstPayDate, 0, 6) <= date("Ym")) { + if (empty($BillNo2)) { + return "未轉應收確認單"; + } else { + return "已轉應收確認單"; + } + } else { + return "時間未到"; + } +} + +function arSellInvoiceMaterial($row) +{ + + $CU_EstPayDate = $row['CU_EstPayDate']; + $InvoiceName = $row['InvoiceName']; + + if (substr($CU_EstPayDate, 0, 6) <= date("Ym")) { + if (empty($InvoiceName)) { + return "未開發票"; + } else { + return "已開發票"; + } + } else { + return "時間未到"; + } +} + +function checkArWriteOffBill($conn, $row) +{ + $BillNo = $row['BillNo2']; + + $sql = " + SELECT + * + -- a.BillNo, + -- a.WriteOffBizPartnerId, + -- a.PayWriteOffOAmount, + -- b.FromBillDate AS ReceivedDate, + -- b.CurrWOFeeOAmt AS Fee, + -- c.OrderBillNo, + -- c.checkBillNo, + -- c.InvoiceNo, + -- c.BillDate AS CheckBillDate + FROM arWriteOffBill AS a + LEFT JOIN arWriteOffBillRec AS b ON a.BillNo=b.BillNo + LEFT JOIN + (SELECT temp1.*,arWriteOffBillDetail.* FROM arWriteOffBillDetail + LEFT JOIN + (SELECT + arCheckBill.BillNo AS checkBillNo, arCheckBill.BillDate,arCheckBillInvInfo.InvoiceNo + FROM arCheckBill + LEFT JOIN arCheckBillInvInfo + ON arCheckBill.InvoiceBillNo=arCheckBillInvInfo.InvoiceBillNo) AS temp1 + ON temp1.checkBillNo = arWriteOffBillDetail.FromBillNo) AS c + ON a.BillNo=c.BillNo + WHERE c.checkBillNo = '$BillNo' + "; + + $del = $conn->query($sql); + $i = 0; + foreach ($del as $row) + $i++; + if (empty($i)) { + return "未收款"; + } else { + return "已收款"; + } +} + +?> + + + + + + + + +
+
+ + + + + + + + + + + + + +
+

保養合約-應收款項明細

+
合約號 + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
營業人員/契約人員合約號標示號電梯編號預計請款日催收次數應收申請單狀態請款金額(未轉應收)請款金額(已轉應收)應收申請單號發票狀態發票單標示號發票單號發票明細發票金額發票號碼核銷
+ "; + echo getSalesmanName($link, $row['BillNo']); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +There is no record!"; +endif; + +#代表結束連線 +mysqli_close($link); + +include "footer.php"; +?> \ No newline at end of file diff --git a/wms/wipwhole-index-function.php b/wms/wipwhole-index-function.php index f1dba89d..af5a1964 100644 --- a/wms/wipwhole-index-function.php +++ b/wms/wipwhole-index-function.php @@ -1337,8 +1337,8 @@ function checkUseridIsManager($user_id) // 中區 李烘銘 if (in_array($user_id, ['M0086'])) return true; - // 桃竹 張莉凱 - if (in_array($user_id, ['M0026'])) + // 桃竹 張莉凱 改 陳家文 + if (in_array($user_id, ['M0029'])) return true; // 宜花東 陳志文 if (in_array($user_id, ['M0054'])) @@ -1348,3 +1348,20 @@ function checkUseridIsManager($user_id) return true; return false; } + +function manage_class_gary_ver($user_id) +{ + global $link; + + $sql = " + SELECT manager + FROM account + WHERE accountid = '$user_id'"; + $res = mysqli_query($link, $sql); + $row = mysqli_fetch_assoc($res); + $manager = $row["manager"]; + mysqli_free_result($res); + if ($manager == "M0001") + return ""; // 董事長略過 + return $manager; +} diff --git a/wms/wipwhole-rec-invoice-edit-submit.php b/wms/wipwhole-rec-invoice-edit-submit.php index a75b65b8..28512a7e 100644 --- a/wms/wipwhole-rec-invoice-edit-submit.php +++ b/wms/wipwhole-rec-invoice-edit-submit.php @@ -140,6 +140,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { $tryrun_start_date_owner = $_POST['tryrun_start_date_owner']; $tryrun_end_date = $_POST['tryrun_end_date']; $tryrun_end_date_owner = $_POST['tryrun_end_date_owner']; + $association_check_type = $_POST['association_check_type']; $salesname = accountid2name($salesid)[$salesid]; $salesmail = accountid2email([$salesid])[$salesid]; @@ -378,6 +379,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { delivery_date_owner = '$delivery_date_owner', marketing_remark = '', real_custom_name = '$real_custom_name', + association_check_type = '$association_check_type', "; if (!empty(trim($marketing_remark))) { $updatesql .= " @@ -1018,7 +1020,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { // 外示系統寄信 if ($_SERVER["REQUEST_METHOD"] == "POST") { if ($_POST['form_name'] == 'send_expression_mail_to_platform_form') { - + include "./class/Cmail.php"; $cmail = new Cmail(); @@ -1080,8 +1082,8 @@ function checkWwsAssianStatus($link, $user_id, $id = null) $data['salesname'] = accountid2name($data['salesid'])[$data['salesid']]; $data['salesmail'] = accountid2email([$data['salesid']])[$data['salesid']]; - $data['salesmanagername'] = accountid2name(manage_class($data['salesid'])[0])[manage_class($data['salesid'])[0]]; - $data['salesmanagermail'] = accountid2email([manage_class($data['salesid'])[0]])[manage_class($data['salesid'])[0]]; + $data['salesmanagername'] = accountid2name(manage_class_gary_ver($data['salesid']))[manage_class_gary_ver($data['salesid'])]; + $data['salesmanagermail'] = accountid2email([manage_class_gary_ver($data['salesid'])])[manage_class_gary_ver($data['salesid'])]; $data['designname'] = accountid2name("M0023")["M0023"]; $data['designmail'] = accountid2email(["M0023"])["M0023"]; $data['designleadername'] = accountid2name(getSheJiokLeaderNo($link))[getSheJiokLeaderNo($link)]; @@ -1123,7 +1125,12 @@ function checkWwsAssianStatus($link, $user_id, $id = null) ], "永佳捷科技" ); - do_wws_next_assign(manage_class($data['salesid'])[0], $form_YD_key, 'I'); + // 如果是桃竹區 主管是家文的新梯 簽到劉永德經理那 + if (manage_class_gary_ver($data['salesid']) == 'M0029') { + do_wws_next_assign("M0137", $form_YD_key, 'I'); + } else { + do_wws_next_assign(manage_class_gary_ver($data['salesid']), $form_YD_key, 'I'); + } return true; } } diff --git a/wms/wipwhole-rec-invoice-edit.php b/wms/wipwhole-rec-invoice-edit.php index e764404f..4cc4847c 100644 --- a/wms/wipwhole-rec-invoice-edit.php +++ b/wms/wipwhole-rec-invoice-edit.php @@ -300,18 +300,27 @@ include "wipwhole-rec-invoice-edit-submit.php"; 營業人員確認項 - +
+ + 官檢類型 + + /> + + /> + + + 營業/契約確認規格 @@ -384,7 +393,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; 附件 - 客戶姓名:" placeholder="輸入後即可上傳附件" /> + 客戶姓名:" placeholder="輸入後即可上傳附件" />
)" style="margin-left:3px;">寄送普來特富外示系統信件 @@ -1437,12 +1446,12 @@ include "wipwhole-rec-invoice-edit-submit.php"; QC及官檢類型 - /> - - /> - - /> - + /> + + /> + + /> + @@ -1467,9 +1476,9 @@ include "wipwhole-rec-invoice-edit-submit.php"; QC合格日
- > + > - +
@@ -1485,10 +1494,10 @@ include "wipwhole-rec-invoice-edit-submit.php"; 官檢日
- > - + > + > - +
@@ -1503,7 +1512,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; 官檢附件 - > + > 下載附件" : ""; ?> diff --git a/wms/wipwhole-renovate-index-function.php b/wms/wipwhole-renovate-index-function.php index 628649c9..e3b997d6 100644 --- a/wms/wipwhole-renovate-index-function.php +++ b/wms/wipwhole-renovate-index-function.php @@ -1279,8 +1279,8 @@ function checkUseridIsManager($user_id) // 中區 李烘銘 if (in_array($user_id, ['M0086'])) return true; - // 桃竹 張莉凱 - if (in_array($user_id, ['M0026'])) + // 桃竹 張莉凱 改 陳家文 + if (in_array($user_id, ['M0029'])) return true; // 宜花東 陳志文 if (in_array($user_id, ['M0054'])) @@ -1290,3 +1290,20 @@ function checkUseridIsManager($user_id) return true; return false; } + +function manage_class_gary_ver($user_id) +{ + global $link; + + $sql = " + SELECT manager + FROM account + WHERE accountid = '$user_id'"; + $res = mysqli_query($link, $sql); + $row = mysqli_fetch_assoc($res); + $manager = $row["manager"]; + mysqli_free_result($res); + if ($manager == "M0001") + return ""; // 董事長略過 + return $manager; +} diff --git a/wms/wipwhole-renovate-rec-invoice-edit-submit.php b/wms/wipwhole-renovate-rec-invoice-edit-submit.php index 30ea4047..f5f56830 100644 --- a/wms/wipwhole-renovate-rec-invoice-edit-submit.php +++ b/wms/wipwhole-renovate-rec-invoice-edit-submit.php @@ -128,9 +128,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { $delivery_date = $_POST['delivery_date'] ?: $row['delivery_date']; $old_delivery_date = $_POST['old_delivery_date'] ?: $row['old_delivery_date']; $delivery_date_owner = $_POST['delivery_date_owner'] ?: $row['delivery_date_owner']; - + $salesid = $_POST['salesid'] ?: $row['salesid']; $warehouseid = $_POST['warehouseid'] ?: $row['warehouseid']; $old_warehouseid = $_POST['old_warehouseid'] ?: $row['warehouseid']; + $association_check_type = $_POST['association_check_type'] ?: $row['association_check_type']; + + $salesname = accountid2name($salesid)[$salesid]; + $salesmail = accountid2email([$salesid])[$salesid]; $creater = $_POST['creater']; $create_at = date("Y-m-d H:i:s"); @@ -328,11 +332,12 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { . " 移交日:" . $old_delivery_date . " => " . $delivery_date; } + $cmail->sendx( $mail_title, $mail_content, [ - [$salesname, $salesmail] + [$salesname, $salesmail], // ['gary', 'gary_chen@masada.com.tw'] ], "永佳捷科技" @@ -382,6 +387,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { customer_planning_verify = '$customer_planning_verify', customer_planning_verify_at = '$customer_planning_verify_at', customer_planning_verify_owner = '$customer_planning_verify_owner', + association_check_type = '$association_check_type', marketing_remark = '', "; if (!empty(trim($marketing_remark))) { @@ -1149,8 +1155,8 @@ function checkWwsAssianStatus($link, $user_id) $data['salesname'] = accountid2name($data['salesid'])[$data['salesid']]; $data['salesmail'] = accountid2email([$data['salesid']])[$data['salesid']]; - $data['salesmanagername'] = accountid2name(manage_class($data['salesid'])[0])[manage_class($data['salesid'])[0]]; - $data['salesmanagermail'] = accountid2email([manage_class($data['salesid'])[0]])[manage_class($data['salesid'])[0]]; + $data['salesmanagername'] = accountid2name(manage_class_gary_ver($data['salesid']))[manage_class_gary_ver($data['salesid'])]; + $data['salesmanagermail'] = accountid2email([manage_class_gary_ver($data['salesid'])])[manage_class_gary_ver($data['salesid'])]; $data['designname'] = accountid2name("M0023")["M0023"]; $data['designmail'] = accountid2email(["M0023"])["M0023"]; $data['designleadername'] = accountid2name(getSheJiokLeaderNo($link))[getSheJiokLeaderNo($link)]; @@ -1197,7 +1203,7 @@ function checkWwsAssianStatus($link, $user_id) ], "永佳捷科技" ); - do_wws_next_assign(manage_class($data['salesid'])[0], $form_key, 'F'); + do_wws_next_assign(manage_class_gary_ver($data['salesid']), $form_key, 'F'); } } diff --git a/wms/wipwhole-renovate-rec-invoice-edit.php b/wms/wipwhole-renovate-rec-invoice-edit.php index 2af5e630..6e149369 100644 --- a/wms/wipwhole-renovate-rec-invoice-edit.php +++ b/wms/wipwhole-renovate-rec-invoice-edit.php @@ -613,11 +613,21 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
+ + + 官檢類型 + + /> + + /> + + + 營業確認規格 @@ -693,7 +703,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; 附件 - 客戶姓名:" placeholder="輸入後即可上傳附件" /> + 客戶姓名:" placeholder="輸入後即可上傳附件" />
QC及官檢類型 - /> - - /> - - /> - + /> + + /> + + /> + @@ -1478,10 +1488,10 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; 官檢日
- > - > + > + > - +
@@ -1496,7 +1506,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; 官檢附件 - > + > 下載附件" : ""; ?> @@ -2054,6 +2064,11 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; 'install_end_date2', 'tryrun_start_date2', 'tryrun_end_date2', + 'install_start_date', + 'install_end_date', + 'tryrun_start_date', + 'tryrun_end_date', + 'delivery_date' ] for (var i = 0; i < catchTime_input_arr.length; i++) { inputChangeCatchTime(catchTime_input_arr[i]); @@ -2369,7 +2384,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; } } - function sendExpressionMailToPlatform(id){ + function sendExpressionMailToPlatform(id) { if (confirm('確定要發送郵件嗎?') == true) { $("#wipwholestatusid").val(id); $('#send_expression_mail_to_platform_form').submit(); diff --git a/wms/wipwhole-wipinstallstatus-index-modal.php b/wms/wipwhole-wipinstallstatus-index-modal.php index 38f61862..42fa0027 100644 --- a/wms/wipwhole-wipinstallstatus-index-modal.php +++ b/wms/wipwhole-wipinstallstatus-index-modal.php @@ -19,7 +19,14 @@ if ($method == 'getInstallingDetails') if ($method == 'getInstalling2Details') echo getInstalling2Details($type, $mtype, $radsY, $radsM, $year, $month); - +if ($method == 'getShippingDetailsSql') + echo getShippingDetailsSql($type, $mtype, $radsY, $radsM, $year, $month); +if ($method == 'getEndingDetailsSql') + echo getEndingDetailsSql($type, $mtype, $radsY, $radsM, $year, $month); +if ($method == 'getInstallingDetailsSql') + echo getInstallingDetailsSql($type, $mtype, $radsY, $radsM, $year, $month); +if ($method == 'getInstalling2DetailsSql') + echo getInstalling2DetailsSql($type, $mtype, $radsY, $radsM, $year, $month); // 出貨台數 @@ -44,6 +51,25 @@ function getShippingDetails($type, $mtype, $radsY, $radsM, $year, $month) return json_encode($data, JSON_UNESCAPED_UNICODE); } +function getShippingDetailsSql($type, $mtype, $radsY, $radsM, $year, $month) +{ + global $link; + $sql = " + SELECT + * + FROM wipwholestatus + WHERE status = '1' + AND ( + real_arrival_date IS NOT NULL + AND real_arrival_date != '' + ) + AND real_arrival_date BETWEEN '$radsY-$radsM-01' AND '$year-$month-31' + "; + $sql .= !empty($type) ? " AND contract_type = '$type'" : ""; + $sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : ""; + return $sql; +} + // 工收台數 function getEndingDetails($type, $mtype, $radsY, $radsM, $year, $month) @@ -67,6 +93,24 @@ function getEndingDetails($type, $mtype, $radsY, $radsM, $year, $month) return json_encode($data, JSON_UNESCAPED_UNICODE); } +function getEndingDetailsSql($type, $mtype, $radsY, $radsM, $year, $month) +{ + global $link; + $sql = " + SELECT + * + FROM wipwholestatus + WHERE status = '1' + AND real_arrival_date BETWEEN '$radsY-$radsM-01' AND '$year-$month-31' + AND (delivery_date BETWEEN '$radsY-$radsM-01' AND '$year-$month-31' + OR + official_check_date BETWEEN '$radsY-$radsM-01' AND '$year-$month-31' + ) + "; + $sql .= !empty($type) ? " AND contract_type = '$type'" : ""; + $sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : ""; + return $sql; +} // 試車完台數 function getInstallingDetails($type, $mtype, $radsY, $radsM, $year, $month) @@ -93,6 +137,27 @@ function getInstallingDetails($type, $mtype, $radsY, $radsM, $year, $month) return json_encode($data, JSON_UNESCAPED_UNICODE); } +function getInstallingDetailsSql($type, $mtype, $radsY, $radsM, $year, $month) +{ + global $link; + $sql = " + SELECT + * + FROM wipwholestatus + WHERE status = '1' + AND ( + real_arrival_date IS NOT NULL + AND real_arrival_date != '' + ) + AND real_arrival_date BETWEEN '$radsY-$radsM-01' AND '$year-$month-31' + AND tryrun_end_date <= '$year-$month-31' + AND tryrun_end_date != '' + AND tryrun_end_date IS NOT NULL + "; + $sql .= !empty($type) ? " AND contract_type = '$type'" : ""; + $sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : ""; + return $sql; +} // 在裝中台數 function getInstalling2Details($type, $mtype, $radsY, $radsM, $year, $month) @@ -121,3 +186,28 @@ function getInstalling2Details($type, $mtype, $radsY, $radsM, $year, $month) $data = mysqli_fetch_all($result, MYSQLI_ASSOC); return json_encode($data, JSON_UNESCAPED_UNICODE); } + +function getInstalling2DetailsSql($type, $mtype, $radsY, $radsM, $year, $month) +{ + global $link; + $sql = " + SELECT + * + FROM wipwholestatus + WHERE status = '1' + AND real_arrival_date BETWEEN '$radsY-$radsM-01' AND '$year-$month-31' + AND ( + delivery_date IS NULL + OR delivery_date = '' + OR delivery_date >= '$year-$month-31' + ) + AND( + official_check_date IS NULL + OR official_check_date = '' + OR official_check_date >= '$year-$month-31' + ) + "; + $sql .= !empty($type) ? " AND contract_type = '$type'" : ""; + $sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : ""; + return $sql; +} diff --git a/wms/wipwhole-wipinstallstatus-index.php b/wms/wipwhole-wipinstallstatus-index.php index eb35d2c3..a8f0e15f 100644 --- a/wms/wipwhole-wipinstallstatus-index.php +++ b/wms/wipwhole-wipinstallstatus-index.php @@ -617,6 +617,29 @@ if ((int)$radsY . $radsM > (int)$radeY . $radeM) { function showDetails(method, contract_type, renovate_type, radsY, radsM, radsYi, start_month) { $("#myModal").show(); + + $.ajax({ + type: "POST", + dataType: "html", + url: "wipwhole-wipinstallstatus-index-modal.php", + data: { + method: method+'Sql', + contract_type: contract_type, + renovate_type: renovate_type, + radsY: radsY, + radsM: radsM, + radsYi: radsYi, + start_month: start_month + }, + success: function(data) { + console.log(data); + }, + error: function(data) { + console.log(data); + } + }) + + $.ajax({ type: "POST", dataType: "json", diff --git a/wms/wipwholeinstall-index-export-excel.php b/wms/wipwholeinstall-index-export-excel.php index f47ffa72..c3a0b4ea 100644 --- a/wms/wipwholeinstall-index-export-excel.php +++ b/wms/wipwholeinstall-index-export-excel.php @@ -175,7 +175,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { substr($row['tryrun_end_date'], 0, 10), substr($row['qc_date'], 0, 10), substr($row['end_qc_date'], 0, 10), - substr($row['official_check_date'], 0, 10), + $row['association_check_type'] == '1' ? "-" : substr($row['official_check_date'], 0, 10), substr($row['delivery_date'], 0, 10), accountidToName($row['salesid']) ]; diff --git a/wms/wipwholeinstall-index-table-html.php b/wms/wipwholeinstall-index-table-html.php index 2311eca7..b5c9bcda 100644 --- a/wms/wipwholeinstall-index-table-html.php +++ b/wms/wipwholeinstall-index-table-html.php @@ -172,8 +172,12 @@ diff --git a/wms/wipwholeinstall-renovate-index-export-excel.php b/wms/wipwholeinstall-renovate-index-export-excel.php index 41342d30..a5598afa 100644 --- a/wms/wipwholeinstall-renovate-index-export-excel.php +++ b/wms/wipwholeinstall-renovate-index-export-excel.php @@ -177,7 +177,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { substr($row['tryrun_end_date'], 0, 10), substr($row['qc_date'], 0, 10), substr($row['end_qc_date'], 0, 10), - substr($row['official_check_date'], 0, 10), + $row['association_check_type'] == '1' ? "-" : substr($row['official_check_date'], 0, 10), substr($row['delivery_date'], 0, 10), accountidToName($row['salesid']) ]; diff --git a/wms/wipwholeinstall-renovate-index-table-html.php b/wms/wipwholeinstall-renovate-index-table-html.php index 2f3dc8f4..7a9715ea 100644 --- a/wms/wipwholeinstall-renovate-index-table-html.php +++ b/wms/wipwholeinstall-renovate-index-table-html.php @@ -155,8 +155,12 @@