diff --git a/wms/contract_b-index-model.php b/wms/contract_b-index-model.php new file mode 100644 index 00000000..92f6d8a3 --- /dev/null +++ b/wms/contract_b-index-model.php @@ -0,0 +1,31 @@ +query($sql); + $data = $result->fetchAll(PDO::FETCH_ASSOC); + echo json_encode($data, JSON_UNESCAPED_UNICODE); + } +} diff --git a/wms/contract_b-index.php b/wms/contract_b-index.php new file mode 100644 index 00000000..521302b4 --- /dev/null +++ b/wms/contract_b-index.php @@ -0,0 +1,291 @@ +"; +// echo $sql; +// echo ""; +// exit; + +$data = $conn->query($sql); +if ($data) : +?> + + + + + +
+
+ + + + + + + + + + + + + +
+

保養合約管理

+
合約號 + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
營業人員/契約人員部門合約號單據號客戶名稱單據日期金額明細
+ "; + echo $row['PersonName']; + ?> + + + + + + + + + + + + + + +
+
+ +There is no record!"; +endif; + +#代表結束連線 +mysqli_close($link); + +include "footer.php"; +?> \ No newline at end of file diff --git a/wms/contract_m-index.php b/wms/contract_m-index.php new file mode 100644 index 00000000..066302ef --- /dev/null +++ b/wms/contract_m-index.php @@ -0,0 +1,311 @@ +0 + )AS awob_tmp + ON sso_tmp.BillNo = awob_tmp.OrderBillNo + LEFT JOIN comPerson AS cp -- 員工主檔 + ON sso_tmp.PersonId = cp.PersonId + LEFT JOIN comGroupPerson AS cgp + ON cp. PersonId = cgp.PersonId + LEFT JOIN comDepartment AS cd -- 部門主檔 + ON cp.DeptId = cd.DeptId + WHERE 1=1 +"; +$sql .= !empty($contractno) ? " AND sso_tmp.BillNo = '$contractno' " : ""; + +// echo "
";
+// echo $sql;
+// echo "
"; +// exit; + +// $sql .= !empty($contractno) ? " AND sso_tmp.BillNo IN ($contractno)" : ""; +$data = $conn->query($sql); + +function checkCollectMonth($row) +{ + $BillDate = $row['BillDate']; + if (collect_month(strtotime($BillDate)) >= 3) { + return "" . collect_month(strtotime($BillDate)) . ""; + } else { + return "" . collect_month(strtotime($BillDate)) . ""; + } +} + +function getFixDetails($conn, $row) +{ + $BillNo = $row['BillNo']; + $sql = " + SELECT + ssod.MaterialId, + cmg.MaterialName, + ssod.OAmountWithTax + FROM salSalesOrder AS sso + LEFT JOIN salSalesOrderDetail AS ssod + ON sso.BillNo = ssod.BillNo + LEFT JOIN comMaterialGroup AS cmg + ON ssod.MaterialId = cmg.MaterialId + WHERE sso.BillNo = '$BillNo' + "; + $data = $conn->query($sql); + $str = ""; + foreach ($data as $row) { + $str .= $row['MaterialId'] . "_"; + $str .= $row['MaterialName'] . ":"; + $str .= number_format(intval($row['OAmountWithTax'])) . "
"; + } + return $str; +} + +?> + + + + + + + + +
+
+ + + + + + + + + + + + + +
+

新梯合約管理

+
合約號 + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
營業人員/契約人員部門單據號客戶名稱單據日期金額發票狀態收款狀態修理明細
+ "; + echo $row['PersonName']; + ?> + + + + + + + + + + + + 已開發票' + : '未開發票'; ?> + + 已收款' + : '未收款'; ?> + + +
+
+ +There is no record!"; +endif; + +#代表結束連線 +mysqli_close($link); + +include "footer.php"; +?> \ No newline at end of file diff --git a/wms/css/view/wipwhole-index.php b/wms/css/view/wipwhole-index.php index e1f5e17e..5dc47495 100644 --- a/wms/css/view/wipwhole-index.php +++ b/wms/css/view/wipwhole-index.php @@ -148,7 +148,8 @@ } .modal .back { - position: absolute; + position: fixed; + z-index: 99998; top: 0; left: 0; width: 100%; @@ -159,7 +160,7 @@ /* Modal Content */ .modal-content { - z-index: 9; + z-index: 99999; background-color: #fefefe; margin: auto; padding: 20px; diff --git a/wms/database.php b/wms/database.php index bc99328c..a5a7046d 100644 --- a/wms/database.php +++ b/wms/database.php @@ -19,7 +19,7 @@ $host = getenv('DB_HOST'); $dbuser = getenv('DB_USERNAME'); $dbpassword = getenv('DB_PASSWORD'); $dbname = getenv('DB_DATABASE'); -// $link = mysqli_connect($host, $dbuser, $dbpassword, $dbname); +$link = mysqli_connect($host, $dbuser, $dbpassword, $dbname); $sqlsrv = getenv('sqlsrv'); $Database = getenv('Database'); diff --git a/wms/delivery_kpi.php b/wms/delivery_kpi.php index f7ee62ff..616fcb02 100644 --- a/wms/delivery_kpi.php +++ b/wms/delivery_kpi.php @@ -3,6 +3,175 @@ include("header.php"); $this_year = 2024; +$expected_a['2024'] = [ + 1 => 10, + 2 => 20, + 3 => 10, + 4 => 26, + 5 => 13, + 6 => 26, + 7 => 13, + 8 => 26, + 9 => 13, + 10 => 26, + 11 => 13, + 12 => 14 +]; +$real_a['2024'] = [ + 1 => 0, + 2 => 0, + 3 => 0, + 4 => 0, + 5 => 0, + 6 => 0, + 7 => 0, + 8 => 0, + 9 => 0, + 10 => 0, + 11 => 0, + 12 => 0 +]; +$expected_b['2024'] = [ + 1 => 15, + 2 => 30, + 3 => 15, + 4 => 40, + 5 => 20, + 6 => 40, + 7 => 20, + 8 => 40, + 9 => 20, + 10 => 40, + 11 => 20, + 12 => 30 +]; +$real_b['2024'] = [ + 1 => 0, + 2 => 0, + 3 => 0, + 4 => 0, + 5 => 0, + 6 => 0, + 7 => 0, + 8 => 0, + 9 => 0, + 10 => 0, + 11 => 0, + 12 => 0 +]; +$expected_c['2024'] = [ + 1 => 18, + 2 => 18, + 3 => 19, + 4 => 20, + 5 => 20, + 6 => 20, + 7 => 20, + 8 => 20, + 9 => 20, + 10 => 20, + 11 => 20, + 12 => 20 +]; +$real_c['2024'] = [ + 1 => 0, + 2 => 0, + 3 => 0, + 4 => 0, + 5 => 0, + 6 => 0, + 7 => 0, + 8 => 0, + 9 => 0, + 10 => 0, + 11 => 0, + 12 => 0 +]; +$expected_d['2024'] = [ + 1 => 12650, + 2 => 12650, + 3 => 12650, + 4 => 18150, + 5 => 18150, + 6 => 19800, + 7 => 23650, + 8 => 23650, + 9 => 23650, + 10 => 26400, + 11 => 26400, + 12 => 26400 +]; +$real_d['2024'] = [ + 1 => 0, + 2 => 0, + 3 => 0, + 4 => 0, + 5 => 0, + 6 => 0, + 7 => 0, + 8 => 0, + 9 => 0, + 10 => 0, + 11 => 0, + 12 => 0 +]; +$expected_e['2024'] = [ + 1 => 192, + 2 => 192, + 3 => 192, + 4 => 272, + 5 => 272, + 6 => 272, + 7 => 272, + 8 => 272, + 9 => 272, + 10 => 272, + 11 => 272, + 12 => 272 +]; +$real_e['2024'] = [ + 1 => 0, + 2 => 0, + 3 => 0, + 4 => 0, + 5 => 0, + 6 => 0, + 7 => 0, + 8 => 0, + 9 => 0, + 10 => 0, + 11 => 0, + 12 => 0 +]; +$expected_f['2024'] = [ + 1 => 822, + 2 => 957, + 3 => 1092, + 4 => 1227, + 5 => 1362, + 6 => 1497, + 7 => 2162, + 8 => 2297, + 9 => 2432, + 10 => 2567, + 11 => 2702, + 12 => 2838, +]; +$real_f['2024'] = [ + 1 => 0, + 2 => 0, + 3 => 0, + 4 => 0, + 5 => 0, + 6 => 0, + 7 => 0, + 8 => 0, + 9 => 0, + 10 => 0, + 11 => 0, + 12 => 0 +]; + function getMAdetails($conn, $this_year, $i) { $date = $this_year . str_pad($i, 2, '0', STR_PAD_LEFT); @@ -166,7 +335,7 @@ function getFixdetails($conn, $this_year, $i) 項目 - 年 + 年 月份 1 - 舊梯全汰改(台數) + 舊梯全汰改(合約台數) - X/X + X 預定 10, - 2 => 20, - 3 => 10, - 4 => 26, - 5 => 13, - 6 => 26, - 7 => 13, - 8 => 26, - 9 => 13, - 10 => 26, - 11 => 13, - 12 => 14 - ]; $expected_a_count = 0; for ($i = 1; $i <= 12; $i++) { $expected_a_count += $expected_a[$this_year][$i]; @@ -212,20 +367,6 @@ function getFixdetails($conn, $this_year, $i) 實際 0, - 2 => 0, - 3 => 0, - 4 => 0, - 5 => 0, - 6 => 0, - 7 => 0, - 8 => 0, - 9 => 0, - 10 => 0, - 11 => 0, - 12 => 0 - ]; $real_a_count = 0; for ($i = 1; $i <= 12; $i++) { $real_a[$this_year][$i] = getMAdetails($conn, $this_year, $i); @@ -249,26 +390,12 @@ function getFixdetails($conn, $this_year, $i) 2 - 舊梯M1改(台數) + 舊梯M1改(合約台數) - X/X + X 預定 15, - 2 => 30, - 3 => 15, - 4 => 40, - 5 => 20, - 6 => 40, - 7 => 20, - 8 => 40, - 9 => 20, - 10 => 40, - 11 => 20, - 12 => 30 - ]; $expected_b_count = 0; for ($i = 1; $i <= 12; $i++) { $expected_b_count += $expected_b[$this_year][$i]; @@ -280,20 +407,6 @@ function getFixdetails($conn, $this_year, $i) 實際 0, - 2 => 0, - 3 => 0, - 4 => 0, - 5 => 0, - 6 => 0, - 7 => 0, - 8 => 0, - 9 => 0, - 10 => 0, - 11 => 0, - 12 => 0 - ]; $real_b_count = 0; for ($i = 1; $i <= 12; $i++) { $real_b[$this_year][$i] = getM1details($conn, $this_year, $i); @@ -314,26 +427,12 @@ function getFixdetails($conn, $this_year, $i) - 保養簽長約,免費M1 + 保養簽長約,免費M1(合約台數) X 預定 18, - 2 => 18, - 3 => 19, - 4 => 20, - 5 => 20, - 6 => 20, - 7 => 20, - 8 => 20, - 9 => 20, - 10 => 20, - 11 => 20, - 12 => 20 - ]; $expected_c_count = 0; for ($i = 1; $i <= 12; $i++) { $expected_c_count += $expected_c[$this_year][$i]; @@ -345,20 +444,6 @@ function getFixdetails($conn, $this_year, $i) 實際 0, - 2 => 0, - 3 => 0, - 4 => 0, - 5 => 0, - 6 => 0, - 7 => 0, - 8 => 0, - 9 => 0, - 10 => 0, - 11 => 0, - 12 => 0 - ]; $real_c_count = 0; for ($i = 1; $i <= 12; $i++) { $real_c[$this_year][$i] = getM1Freedetails($conn, $this_year, $i); @@ -387,20 +472,6 @@ function getFixdetails($conn, $this_year, $i) 預定 12650, - 2 => 12650, - 3 => 12650, - 4 => 18150, - 5 => 18150, - 6 => 19800, - 7 => 23650, - 8 => 23650, - 9 => 23650, - 10 => 26400, - 11 => 26400, - 12 => 26400 - ]; $expected_d_count = 0; for ($i = 1; $i <= 12; $i++) { $expected_d_count += $expected_d[$this_year][$i]; @@ -412,23 +483,9 @@ function getFixdetails($conn, $this_year, $i) 實際 0, - 2 => 0, - 3 => 0, - 4 => 0, - 5 => 0, - 6 => 0, - 7 => 0, - 8 => 0, - 9 => 0, - 10 => 0, - 11 => 0, - 12 => 0 - ]; $real_d_count = 0; for ($i = 1; $i <= 12; $i++) { - $real_d[$this_year][$i] = round(getMContractAllAmount($conn, $this_year, $i)/1000,0); + $real_d[$this_year][$i] = round(getMContractAllAmount($conn, $this_year, $i) / 1000, 0); $real_d_count += $real_d[$this_year][$i]; echo "" . $real_d[$this_year][$i] . ""; } @@ -446,26 +503,12 @@ function getFixdetails($conn, $this_year, $i) 4 - 保養契約台數(台) + 保養契約台數(合約台數) X 預定 192, - 2 => 192, - 3 => 192, - 4 => 272, - 5 => 272, - 6 => 272, - 7 => 272, - 8 => 272, - 9 => 272, - 10 => 272, - 11 => 272, - 12 => 272 - ]; $expected_e_count = 0; for ($i = 1; $i <= 12; $i++) { $expected_e_count += $expected_e[$this_year][$i]; @@ -477,20 +520,6 @@ function getFixdetails($conn, $this_year, $i) 實際 0, - 2 => 0, - 3 => 0, - 4 => 0, - 5 => 0, - 6 => 0, - 7 => 0, - 8 => 0, - 9 => 0, - 10 => 0, - 11 => 0, - 12 => 0 - ]; $real_e_count = 0; for ($i = 1; $i <= 12; $i++) { $real_e[$this_year][$i] = getMataincedetails($conn, $this_year, $i, $real_e[$this_year]); @@ -517,20 +546,6 @@ function getFixdetails($conn, $this_year, $i) 預定 822, - 2 => 957, - 3 => 1092, - 4 => 1227, - 5 => 1362, - 6 => 1497, - 7 => 2162, - 8 => 2297, - 9 => 2432, - 10 => 2567, - 11 => 2702, - 12 => 2838, - ]; $expected_f_count = 0; for ($i = 1; $i <= 12; $i++) { $expected_f_count += $expected_f[$this_year][$i]; @@ -542,23 +557,9 @@ function getFixdetails($conn, $this_year, $i) 實際 0, - 2 => 0, - 3 => 0, - 4 => 0, - 5 => 0, - 6 => 0, - 7 => 0, - 8 => 0, - 9 => 0, - 10 => 0, - 11 => 0, - 12 => 0 - ]; $real_f_count = 0; for ($i = 1; $i <= 12; $i++) { - $real_f[$this_year][$i] = round(getFixdetails($conn, $this_year, $i)/1000,0); + $real_f[$this_year][$i] = round(getFixdetails($conn, $this_year, $i) / 1000, 0); $real_f_count += $real_f[$this_year][$i]; echo "" . $real_f[$this_year][$i] . ""; } @@ -575,81 +576,6 @@ function getFixdetails($conn, $this_year, $i) - - - - - diff --git a/wms/fix_contract_payment_status.php b/wms/fix_contract_payment_status.php index 11026f7c..bb4d1a7b 100644 --- a/wms/fix_contract_payment_status.php +++ b/wms/fix_contract_payment_status.php @@ -227,6 +227,9 @@ if ($data) :
+ + + diff --git a/wms/fnh/faultreview-index.php b/wms/fnh/faultreview-index.php index fa5f05b3..3de02187 100644 --- a/wms/fnh/faultreview-index.php +++ b/wms/fnh/faultreview-index.php @@ -2,162 +2,202 @@ include "../header.php"; $data = array(); -// sql語法存在變數中 -$sql_cmd = sql_myself($user_id, "handlestaff"); -// 張珈瑄、莊雅涵、賴定國、何維光可瀏覽近兩個月資料 -if ($user_id == "M0061" || $user_id == "M0112" || $user_id == "C0004" || $user_id == "M0154") { - $last2mon = date("Y/m/d 00:00:00", strtotime("-2 month")); - $sql_cmd = "where calltime >= '$last2mon'"; + +function getAllFacilitynos($link, $user_id) +{ + $sql_cmd = sql_myself($user_id, "repairerid"); + $sql = " + SELECT facilityno + FROM facility + $sql_cmd + "; + $result = mysqli_query($link, $sql); + $data = mysqli_fetch_all($result, MYSQLI_ASSOC); + return "'" . implode("','", array_column($data, 'facilityno')) . "'"; +} + +if (getAccounttype($link, $user_id) == "B") { + $facilitynos = getAllFacilitynos($link, $user_id); +} else if (in_array(accountidToDepartId($user_id), ['912', '220'])) { + $facilitynos = ''; +} else if (in_array($user_id, ['M0061', 'M0112', 'C0004', 'M0154'])) { + $facilitynos = ''; +} else { + $facilitynos = "'NA'"; } -$sql = "select * from fault_notification_job_handling $sql_cmd order by id desc"; -$data = mysqli_query($link,$sql); -/* -$permissionsql = "select * from account_permission where permissiontype='B' and accountid='$user_id'"; -$permissiondata = mysqli_query($link,$permissionsql); -$row = mysqli_fetch_array($permissiondata, MYSQLI_ASSOC); -$permission = $row['permission']; -*/ -if ($user_auth&2) { + +$last2mon = date("Y/m/d 00:00:00", strtotime("-2 month")); +$sql = " + SELECT + * + FROM fault_notification_job_handling + WHERE 1 = 1 + AND calltime >= '$last2mon' +"; +$sql .= !empty($facilitynos) ? " AND facilityno IN ($facilitynos)" : ""; +$sql .= " + ORDER BY id DESC +"; + +$data = mysqli_query($link, $sql); + +if ($user_auth & 2) { ?> -

+

- -
-
- - - - - - - - - - - - - - - - - - - - - - - $data) : - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
編號電梯編號名稱故障狀態來電者地址來電時間處理人員備註欄修改
-

- - - -

-
-
+ #table_index_paginate { + float: right; + } + + label { + display: inline-flex; + margin-bottom: .5rem; + margin-top: .5rem; + + } + + @media screen and (max-width: 600px) { + + table { + border: 0; + } + + table thead { + display: none; + } + + table tr { + margin-bottom: 10px; + display: block; + border-bottom: 2px solid #ddd; + } + + table td { + display: block; + text-align: right; + font-size: 14px; + border-bottom: 1px dotted #ccc; + } + + table td:last-child { + border-bottom: 0; + } + + table td:before { + content: attr(data-label); + float: left; + text-transform: uppercase; + font-weight: bold; + } + } + +
+ + + + + + + + + + + + + + + + + + + + + + + + $data) : + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
編號電梯編號名稱故障狀態來電者地址來電時間處理人員備註欄修改
+ +

+ + + +

+ +
+
There is no record!"; endif; diff --git a/wms/fun_global.php b/wms/fun_global.php index 627fd90b..d4917d8d 100644 --- a/wms/fun_global.php +++ b/wms/fun_global.php @@ -196,6 +196,9 @@ function check_user_permission($user_id, $token) '/wms/wipwhole-change-contractdate.php', '/wms/wipwhole-change-planning-customer-name.php', '/wms/test.php', + '/wms/delivery_kpi.php', + '/wms/contract_m-index.php', + '/wms/contract_b-index.php' ]; if (in_array($_SERVER["SCRIPT_NAME"], $ignore_url_arr)) return; diff --git a/wms/schedule_star-index.php b/wms/schedule_star-index.php index 0b6aec55..fb419c36 100644 --- a/wms/schedule_star-index.php +++ b/wms/schedule_star-index.php @@ -1,4 +1,5 @@ "; $result = mysqli_query($link, $sql); $data = mysqli_fetch_array($result, MYSQLI_ASSOC); return $data['all_count']; @@ -125,6 +124,36 @@ foreach ($contract_type as $c_val => $c_key) { ?> + + @@ -186,39 +215,54 @@ foreach ($contract_type as $c_val => $c_key) { if ($val == 'A') { $a = getShipping($c_val, null, (date("Y") - 1), str_pad($i, 2, '0', STR_PAD_LEFT)); $a_count += $a; - echo ''; + $onclick = "showDetail('getShipping', '$c_val', '', '" . (date("Y") - 1) . "', '" . str_pad($i, 2, '0', STR_PAD_LEFT) . "')"; + echo ''; } if ($val == 'B') { $b = getInstalling($c_val, null, (date("Y") - 1), str_pad($i, 2, '0', STR_PAD_LEFT)); $b_count += $b; - echo ''; + $onclick = "showDetail('getInstalling', '$c_val', '', '" . (date("Y") - 1) . "', '" . str_pad($i, 2, '0', STR_PAD_LEFT) . "')"; + echo ''; } if ($val == 'C') { $c = getInstalling2($c_val, null, (date("Y") - 1), str_pad($i, 2, '0', STR_PAD_LEFT)); $c_count += $c; - echo ''; + $onclick = "showDetail('getInstalling2', '$c_val', '', '" . (date("Y") - 1) . "', '" . str_pad($i, 2, '0', STR_PAD_LEFT) . "')"; + echo ''; } if ($val == 'D') { $d = getQCing($c_val, null, (date("Y") - 1), str_pad($i, 2, '0', STR_PAD_LEFT)); $d_count += $d; - echo ''; + $onclick = "showDetail('getQCing', '$c_val', '', '" . (date("Y") - 1) . "', '" . str_pad($i, 2, '0', STR_PAD_LEFT) . "')"; + echo ''; } if ($val == 'E') { $e = getDeliverying($c_val, null, (date("Y") - 1), str_pad($i, 2, '0', STR_PAD_LEFT)); $e_count += $e; - echo ''; + $onclick = "showDetail('getDeliverying', '$c_val', '', '" . (date("Y") - 1) . "', '" . str_pad($i, 2, '0', STR_PAD_LEFT) . "')"; + echo ''; } } - if ($val == 'A') - echo ''; - if ($val == 'B') - echo ''; - if ($val == 'C') - echo ''; - if ($val == 'D') - echo ''; - if ($val == 'E') - echo ''; + if ($val == 'A') { + $onclick = "showDetail('getShipping', '$c_val', '', '" . (date("Y")-1) . "', '')"; + echo ''; + } + if ($val == 'B') { + $onclick = "showDetail('getInstalling', '$c_val', '', '" . (date("Y")-1) . "', '')"; + echo ''; + } + if ($val == 'C') { + $onclick = "showDetail('getInstalling2', '$c_val', '', '" . (date("Y")-1) . "', '')"; + echo ''; + } + if ($val == 'D') { + $onclick = "showDetail('getQCing', '$c_val', '', '" . (date("Y")-1) . "', '')"; + echo ''; + } + if ($val == 'E') { + $onclick = "showDetail('getDeliverying', '$c_val', '', '" . (date("Y")-1) . "', '')"; + echo ''; + } ?> @@ -233,39 +277,54 @@ foreach ($contract_type as $c_val => $c_key) { if ($val == 'A') { $a = getShipping($c_val, null, (date("Y")), str_pad($i, 2, '0', STR_PAD_LEFT)); $a_count += $a; - echo ''; + $onclick = "showDetail('getShipping', '$c_val', '', '" . (date("Y")) . "', '" . str_pad($i, 2, '0', STR_PAD_LEFT) . "')"; + echo ''; } if ($val == 'B') { $b = getInstalling($c_val, null, (date("Y")), str_pad($i, 2, '0', STR_PAD_LEFT)); $b_count += $b; - echo ''; + $onclick = "showDetail('getInstalling', '$c_val', '', '" . (date("Y")) . "', '" . str_pad($i, 2, '0', STR_PAD_LEFT) . "')"; + echo ''; } if ($val == 'C') { $c = getInstalling2($c_val, null, (date("Y")), str_pad($i, 2, '0', STR_PAD_LEFT)); $c_count += $c; - echo ''; + $onclick = "showDetail('getInstalling2', '$c_val', '', '" . (date("Y")) . "', '" . str_pad($i, 2, '0', STR_PAD_LEFT) . "')"; + echo ''; } if ($val == 'D') { $d = getQCing($c_val, null, (date("Y")), str_pad($i, 2, '0', STR_PAD_LEFT)); $d_count += $d; - echo ''; + $onclick = "showDetail('getQCing', '$c_val', '', '" . (date("Y")) . "', '" . str_pad($i, 2, '0', STR_PAD_LEFT) . "')"; + echo ''; } if ($val == 'E') { $e = getDeliverying($c_val, null, (date("Y")), str_pad($i, 2, '0', STR_PAD_LEFT)); $e_count += $e; - echo ''; + $onclick = "showDetail('getDeliverying', '$c_val', '', '" . (date("Y")) . "', '" . str_pad($i, 2, '0', STR_PAD_LEFT) . "')"; + echo ''; } } - if ($val == 'A') - echo ''; - if ($val == 'B') - echo ''; - if ($val == 'C') - echo ''; - if ($val == 'D') - echo ''; - if ($val == 'E') - echo ''; + if ($val == 'A') { + $onclick = "showDetail('getShipping', '$c_val', '', '" . (date("Y")) . "', '')"; + echo ''; + } + if ($val == 'B') { + $onclick = "showDetail('getInstalling', '$c_val', '', '" . (date("Y")) . "', '')"; + echo ''; + } + if ($val == 'C') { + $onclick = "showDetail('getInstalling2', '$c_val', '', '" . (date("Y")) . "', '')"; + echo ''; + } + if ($val == 'D') { + $onclick = "showDetail('getQCing', '$c_val', '', '" . (date("Y")) . "', '')"; + echo ''; + } + if ($val == 'E') { + $onclick = "showDetail('getDeliverying', '$c_val', '', '" . (date("Y")) . "', '')"; + echo ''; + } ?> $c_key) { ?>
' . $a . '' . $a . '' . $b . '' . $b . '' . $c . '' . $c . '' . $d . '' . $d . '' . $e . '' . $e . '' . $a_count . '' . $b_count . '' . $c_count . '' . $d_count . '' . $e_count . '' . $a_count . '' . $b_count . '' . $c_count . '' . $d_count . '' . $e_count . '
' . $a . '' . $a . '' . $b . '' . $b . '' . $c . '' . $c . '' . $d . '' . $d . '' . $e . '' . $e . '' . $a_count . '' . $b_count . '' . $c_count . '' . $d_count . '' . $e_count . ' ' . $a_count . ' ' . $b_count . ' ' . $c_count . ' ' . $d_count . ' ' . $e_count . '
+ + +?> \ No newline at end of file diff --git a/wms/wipwhole-rec-invoice-edit-submit.php b/wms/wipwhole-rec-invoice-edit-submit.php index 6a45c67e..87c325c8 100644 --- a/wms/wipwhole-rec-invoice-edit-submit.php +++ b/wms/wipwhole-rec-invoice-edit-submit.php @@ -850,7 +850,10 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { if ($_SERVER["REQUEST_METHOD"] == "POST") { if ($_POST['form_name'] == 'update_date_form') { - + include "class/Cnotice.php"; + include "./class/Cmail.php"; + $cmail = new Cmail(); + $cn = new Cnotice(); $creater = $user_id; foreach ($_POST as $k => $v) diff --git a/wms/wipwhole-renovate-rec-invoice.php b/wms/wipwhole-renovate-rec-invoice.php index af560c7a..86a99848 100644 --- a/wms/wipwhole-renovate-rec-invoice.php +++ b/wms/wipwhole-renovate-rec-invoice.php @@ -442,7 +442,14 @@ if ($department_id == "321" || $department_id == "220") { name AS label FROM account WHERE department_id IN ('311','312','313','314','315','511','512','513','514') - ORDER BY label ASC + UNION + SELECT + accountid AS val , + name AS label + FROM account + WHERE 1=1 + AND accountid IN ('M0050') + ORDER BY val ASC "; $sales_options = mysqli_query($link, $sql);