diff --git a/wms/rib02-purReceive-submit.php b/wms/T8-purReceive-submit.php similarity index 96% rename from wms/rib02-purReceive-submit.php rename to wms/T8-purReceive-submit.php index ba87bc27..aa917201 100644 --- a/wms/rib02-purReceive-submit.php +++ b/wms/T8-purReceive-submit.php @@ -1,89 +1,89 @@ - - \ No newline at end of file diff --git a/wms/rib02-purchase-submit.php b/wms/T8-purchase-submit.php similarity index 97% rename from wms/rib02-purchase-submit.php rename to wms/T8-purchase-submit.php index 13f042fa..216b4906 100644 --- a/wms/rib02-purchase-submit.php +++ b/wms/T8-purchase-submit.php @@ -1,89 +1,89 @@ - - \ No newline at end of file diff --git a/wms/T8_Authorization.php b/wms/T8_Authorization.php index a1a756ce..dce65c91 100644 --- a/wms/T8_Authorization.php +++ b/wms/T8_Authorization.php @@ -14,12 +14,13 @@ $sign = hash_hmac('SHA256', $data, 'B2D6395D2883E26C', false); var validation = ""; // var corsurl = 'http://cors-anywhere.herokuapp.com/'; // var apiurl = 'http://60.244.87.101:880//twWebAPI/GetAuth'; - var apiurl = 'https://erp.masada.com.tw:780/twWebAPI/GetAuth' + // var apiurl = 'https://erp.masada.com.tw:780/twWebAPI/GetAuth' headerParam = { UserId: 'M0000', Pwd: 'M012290493119', TimestampUTC: , - Sign: '' + Sign: '', + GroupId: 'TEST', }; obj = { type: 'get', @@ -30,7 +31,7 @@ $sign = hash_hmac('SHA256', $data, 'B2D6395D2883E26C', false); success: function(res) { validation = res.Data['CHI_Authorization']; console.log(validation); - // console.log(res); + console.log(res); // console.log() // window.parent.postMessage(validation,'http://localhost:3000'); // window.parent.postMessage(validation,'https://masada.com.tw'); @@ -40,4 +41,5 @@ $sign = hash_hmac('SHA256', $data, 'B2D6395D2883E26C', false); jQuery.ajax(obj); // return jQuery.ajax(obj); } + get_Auth(); \ No newline at end of file diff --git a/wms/T8_Authorization_from_bpm.php b/wms/T8_Authorization_from_bpm.php index 3e8708b2..7c206023 100644 --- a/wms/T8_Authorization_from_bpm.php +++ b/wms/T8_Authorization_from_bpm.php @@ -24,11 +24,13 @@ function get_Auth($user_id = "M0000", $user_password = "M012290493119") // $apiurl = 'http://10.10.145.2:880//twWebAPI/GetAuth'; // $apiurl = 'https://erp.masada.com.tw:780/twWebAPI/GetAuth'; + //GroupId : TEST測試區 ; MASADA正式區 $headerParam = [ "UserId: $user_id", "Pwd: $user_password", "TimestampUTC: $now", - "Sign: $sign" + "Sign: $sign", + "GroupId: TEST" ]; $ch = curl_init(); @@ -51,4 +53,4 @@ function get_Auth($user_id = "M0000", $user_password = "M012290493119") curl_close($ch); } // $data = []; -// get_Auth(); +get_Auth(); diff --git a/wms/WriteOff.xlsx b/wms/WriteOff.xlsx index 61407291..6bb1cd82 100644 Binary files a/wms/WriteOff.xlsx and b/wms/WriteOff.xlsx differ diff --git a/wms/account-receivable-index-ing.php b/wms/account-receivable-index-ing.php index ced50411..722cc971 100644 --- a/wms/account-receivable-index-ing.php +++ b/wms/account-receivable-index-ing.php @@ -2158,9 +2158,14 @@ include "./footer.php"; //[合約號]['facility'] [作番號][款別]0 款項名稱 1 合約金額 2 應收日期 3 應收金額 4 已收金額 5 催收金額 6 催收次數 ?> - +
+
+ + +
+
- +
@@ -2180,7 +2185,7 @@ include "./footer.php"; $value) { ?> - + @@ -2246,6 +2251,21 @@ include "./footer.php";
合約號
\ No newline at end of file diff --git a/wms/account-receivable-renovate-index.php b/wms/account-receivable-renovate-index.php index 63c1f588..502eeaea 100644 --- a/wms/account-receivable-renovate-index.php +++ b/wms/account-receivable-renovate-index.php @@ -53,16 +53,16 @@ ON a.BillNo=c.BillNo WHERE DATALENGTH(c.OrderBillNo) >0"; - -//ORDER BY contractno - // 期初收款資訊 $sql_opening = " SELECT * FROM account_received "; // 設定權限:看到自己的/下屬的,資訊處跟財會處可以看全部的 if ((in_array($user_id, array('M0060', 'M0175'))) || (in_array(accountidToDepartId($user_id), array('220', '210')))) { } else { +<<<<<<< HEAD // $sql_received .= " AND (PersonId = '$user_id'"; +======= +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb $sql_opening .= " OR person_id = '$user_id'"; $sql_contractNumber .= " AND (PersonId = '$user_id'"; if (count($follower) > 0) { @@ -70,15 +70,14 @@ if ((in_array($user_id, array('M0060', 'M0175'))) || (in_array(accountidToDepart $column_str .= implode("','", $follower); $column_str .= "')"; $sql_contractNumber .= " OR PersonId IN $column_str)"; - // $sql_contract .= " OR s.PersonId IN $column_str)"; - // $sql_received .= " OR PersonId IN $column_str)"; $sql_opening .= " OR person_id IN $column_str)"; - // $sql_contract_budget .= " OR PersonId IN $column_str )ORDER BY BillNo, CU_MaterialId"; } else { +<<<<<<< HEAD // $sql_received .= ")"; +======= +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb $sql_opening .= ")"; $sql_contractNumber .= ")"; - // $sql_contract_budget .= ")"; }; } @@ -387,46 +386,77 @@ foreach ($arrayData as &$value) { switch ($facility['PayStage'][$stage]['name']) { case (stristr($facility['PayStage'][$stage]['name'], '試車')): if (isset($wipwhole_status[$fakey]['tryrun_end_date']) && $wipwhole_status[$fakey]['tryrun_end_date'] !== NULL && !empty($wipwhole_status[$fakey]['tryrun_end_date'])) { +<<<<<<< HEAD $haveNumber = (int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT); +======= + $haveNumber = ((int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT)) - 1; +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb $facility['PayStage'][$stage]['PlanPayDate'] = date("Ymd", strtotime("+ $haveNumber months", strtotime($wipwhole_status[$fakey]['tryrun_end_date']))); } break; case (stristr($facility['PayStage'][$stage]['name'], '完工')): if (isset($wipwhole_status[$fakey]['delivery_date']) && $wipwhole_status[$fakey]['delivery_date'] !== NULL && !empty($wipwhole_status[$fakey]['delivery_date'])) { +<<<<<<< HEAD $haveNumber = (int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT); +======= + $haveNumber = ((int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT)) - 1; +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb $facility['PayStage'][$stage]['PlanPayDate'] = date("Ymd", strtotime("+ $haveNumber months", strtotime($wipwhole_status[$fakey]['delivery_date']))); } break; case (stristr($facility['PayStage'][$stage]['name'], '尾款')): if (isset($wipwhole_status[$fakey]['delivery_date']) && $wipwhole_status[$fakey]['delivery_date'] !== NULL && !empty($wipwhole_status[$fakey]['delivery_date'])) { +<<<<<<< HEAD $haveNumber = (int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT); +======= + $haveNumber = ((int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT)) - 1; +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb $facility['PayStage'][$stage]['PlanPayDate'] = date("Ymd", strtotime("+ $haveNumber months", strtotime($wipwhole_status[$fakey]['delivery_date']))); } break; case (stristr($facility['PayStage'][$stage]['name'], '交車')): if (isset($wipwhole_status[$fakey]['delivery_date']) && $wipwhole_status[$fakey]['delivery_date'] !== NULL && !empty($wipwhole_status[$fakey]['delivery_date'])) { +<<<<<<< HEAD $haveNumber = (int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT); +======= + $haveNumber = ((int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT)) - 1; +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb $facility['PayStage'][$stage]['PlanPayDate'] = date("Ymd", strtotime("+ $haveNumber months", strtotime($wipwhole_status[$fakey]['delivery_date']))); } break; case (stristr($facility['PayStage'][$stage]['name'], '驗收')): if (isset($wipwhole_status[$fakey]['delivery_date']) && $wipwhole_status[$fakey]['delivery_date'] !== NULL && !empty($wipwhole_status[$fakey]['delivery_date'])) { +<<<<<<< HEAD $haveNumber = (int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT); +======= + $haveNumber = ((int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT)) - 1; +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb $facility['PayStage'][$stage]['PlanPayDate'] = date("Ymd", strtotime("+ $haveNumber months", strtotime($wipwhole_status[$fakey]['delivery_date']))); } break; case (stristr($facility['PayStage'][$stage]['name'], '安裝')): if (isset($wipwhole_status[$fakey]['install_end_date']) && $wipwhole_status[$fakey]['install_end_date'] !== NULL && !empty($wipwhole_status[$fakey]['install_end_date'])) { +<<<<<<< HEAD $haveNumber = (int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT); +======= + $haveNumber = ((int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT)) - 1; +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb $facility['PayStage'][$stage]['PlanPayDate'] = date("Ymd", strtotime("+ $haveNumber months", strtotime($wipwhole_status[$fakey]['install_end_date']))); } break; case (stristr($facility['PayStage'][$stage]['name'], '貨抵工地')): if (isset($wipwhole_status[$fakey]['real_arrival_date']) && $wipwhole_status[$fakey]['real_arrival_date'] !== NULL && !empty($wipwhole_status[$fakey]['real_arrival_date'])) { +<<<<<<< HEAD $haveNumber = (int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT); $facility['PayStage'][$stage]['PlanPayDate'] = date("Ymd", strtotime("+ $haveNumber months", strtotime($wipwhole_status[$fakey]['real_arrival_date']))); } elseif (isset($wipwhole_status[$fakey]['real_contract_arrival_date']) && $wipwhole_status[$fakey]['real_contract_arrival_date'] !== NULL && !empty($wipwhole_status[$fakey]['real_contract_arrival_date'])) { $haveNumber = (int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT); +======= + $haveNumber = ((int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT)) - 1; + $facility['PayStage'][$stage]['PlanPayDate'] = date("Ymd", strtotime("+ $haveNumber months", strtotime($wipwhole_status[$fakey]['real_arrival_date']))); + } elseif (isset($wipwhole_status[$fakey]['real_contract_arrival_date']) && $wipwhole_status[$fakey]['real_contract_arrival_date'] !== NULL && !empty($wipwhole_status[$fakey]['real_contract_arrival_date'])) { + $haveNumber = ((int) filter_var(str_replace('-', '', $facility['PayStage'][$stage]['name']), FILTER_SANITIZE_NUMBER_INT)) - 1; +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb $facility['PayStage'][$stage]['PlanPayDate'] = date("Ymd", strtotime("+ $haveNumber months", strtotime($wipwhole_status[$fakey]['real_contract_arrival_date']))); } break; @@ -519,15 +549,8 @@ foreach ($final_paystage as $key => &$payStage) { } } } -// foreach($final_paystage as $key => $payStage){ -// echo $key."
"; -// for($sequence = 1; $sequence <= count($payStage); $sequence++){ -// print_r($payStage[$sequence]); -// echo "
"; -// } -// echo "---------------------
"; -// } +<<<<<<< HEAD // foreach ($arrayData as &$value) { // if (is_iterable($value['facility'])) { // foreach ($value['facility'] as $fakey => &$facility) { @@ -554,6 +577,8 @@ foreach ($final_paystage as $key => &$payStage) { // echo "---------------------
"; // } // exit(); +======= +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb // 0 部門id 1 部門名稱 2 經理名稱 3 營業員id 4 營業員名稱 5 客戶名稱 6 抬頭 7 統編 8 通訊地址 9 T8單據日期 10 合約號 // 0 合約號 1 作番號 2 部門id 3 部門名稱 4 經理名稱 5 營業員id 6 營業員名稱 7 客戶名稱 8 抬頭 9 統編 10 通訊地址 // 11 收款階段名稱 12 應收日期 13 收款金額 14 已開金額 15 已收金額 16 催收次數 @@ -562,7 +587,10 @@ $today = strtotime(date('Ymt')); foreach ($arrayData as $key => $value) { if (isset($final_paystage[$key])) { for ($sequence = 1; $sequence <= count($final_paystage[$key]); $sequence++) { +<<<<<<< HEAD $keyname = $key . $final_paystage[$key][$sequence]['sequenceNumber']; +======= +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb $value[4] = (isset($value[4]) && !empty($value[4])) ? $value[4] : '--'; $value[5] = (isset($value[5]) && !empty($value[5])) ? $value[5] : '--'; $value[6] = (isset($value[6]) && !empty($value[6])) ? $value[6] : '--'; @@ -571,13 +599,23 @@ foreach ($arrayData as $key => $value) { $value[11] = (isset($value[11]) && !empty($value[11])) ? $value[11] : '--'; $value[12] = (isset($value[12]) && !empty($value[12])) ? date('Y/m/d', strtotime($value[12])) : '--'; $thisPayStage = $final_paystage[$key][$sequence]; +<<<<<<< HEAD $havetopay = ($today >= $thisPayStage['PlanPayDate']) ? "V" : "--"; +======= + $keyname = $key . "/" . $final_paystage[$key][$sequence]['facilityno'] . "/" . $value[5]; + $havetopay = ($today >= strtotime($thisPayStage['PlanPayDate'])) ? "V" : "--"; +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb switch ($havetopay) { case "V": $unInvoiceAmount = $thisPayStage['PayAmount'] - $thisPayStage['InvoiceAmount']; $unReceivedAmount = $thisPayStage['PayAmount'] - $thisPayStage['receivedAmount']; break; default: +<<<<<<< HEAD +======= + $unInvoiceAmount = 0; + $unReceivedAmount = 0; +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb break; } $excel_aray[$keyname] = [ @@ -635,6 +673,10 @@ $total_data = json_encode($excel_aray); .hiddenTable { display: none; } + + .hidden { + display: none; + }
@@ -647,9 +689,21 @@ $total_data = json_encode($excel_aray);

合約 (汰改)統整資訊

+<<<<<<< HEAD
+======= + +
+ + +
+
+
+>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb @@ -670,8 +724,13 @@ $total_data = json_encode($excel_aray); +<<<<<<< HEAD +======= + $row) { ?> + +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb @@ -694,6 +753,24 @@ $total_data = json_encode($excel_aray); \ No newline at end of file diff --git a/wms/contract-repair/prviewPdf.php b/wms/contract-repair/prviewPdf.php index 91adc475..82d476b0 100644 --- a/wms/contract-repair/prviewPdf.php +++ b/wms/contract-repair/prviewPdf.php @@ -509,7 +509,7 @@ if ($_POST['list']) {
合約號
" . $row[3]; ?>
-  臺北市中山區敬業一路128巷39號3樓之1 +  桃園市觀音區崙坪村8鄰140號

 

diff --git a/wms/contract/js/alpine.js b/wms/contract/js/alpine.js index 35f81f58..0f8b39d2 100644 --- a/wms/contract/js/alpine.js +++ b/wms/contract/js/alpine.js @@ -948,7 +948,7 @@ const contractInput = () => { }, cities: [], data: { - contractno: 'B23100060', + contractno: 'B24010030', total_price: '', //合約總價 vat: '', //統一編號 mtype: 'A', //維修型態 diff --git a/wms/contract/mi/mi7.xlsx b/wms/contract/mi/mi7.xlsx new file mode 100644 index 00000000..efb0213a Binary files /dev/null and b/wms/contract/mi/mi7.xlsx differ diff --git a/wms/contract/prviewPdf.php b/wms/contract/prviewPdf.php index 1d311b0a..3ee604cb 100644 --- a/wms/contract/prviewPdf.php +++ b/wms/contract/prviewPdf.php @@ -495,7 +495,7 @@ if($_POST['list']){ -  臺北市中山區敬業一路128巷39號3樓之1 +  桃園市觀音區崙坪村8鄰140號

 

diff --git a/wms/fun_global.php b/wms/fun_global.php index 627fd90b..98f71bfc 100644 --- a/wms/fun_global.php +++ b/wms/fun_global.php @@ -99,6 +99,7 @@ function pricereview_class($rate, $user_id, &$ret = [], $special_fee, $i = 0) return $ret; exit; } else { +<<<<<<< HEAD // // 若為第一層且使用者ID為區經理,直接訂好接下來的簽核人員並跳出。 // if ($i == 0 && ($user_id == 'M0033' || $user_id == "M0137" || $user_id == 'M0029' || $user_id == 'M0054' || $user_id == "M0086")) { // $ret[1] = $user_id . ",,"; @@ -128,6 +129,37 @@ function pricereview_class($rate, $user_id, &$ret = [], $special_fee, $i = 0) $ret[3] = "M0060,,"; // 業務協理 if ($rate < 80 || $special_fee > 0) { $ret[4] = "M0006,,"; // 總經理 +======= + // 若為第一層且使用者ID為區經理,直接訂好接下來的簽核人員並跳出。 + if ($i == 0 && ($user_id == 'M0033' || $user_id == "M0137" || $user_id == 'M0029' || $user_id == 'M0054' || $user_id == "M0086")) { + $ret[1] = $user_id . ",,"; + // $ret[2] = "M0107,,<##>M0175,,"; // 業務部專員:M0175陳君敏、M0107許紓晴(第2關有多位審核人) + $ret[3] = "M0060,,"; // 業務協理 + if ($rate < 80 || $special_fee > 0) { + $ret[4] = "M0006,,"; // 總經理 + } + return $ret; + exit; + } + if ($row["manager"] != "M0060" && $row["manager"] != "M0006" && $row["manager"] != "M0008") { + // 新梯的部分 桃竹本該給陳家文,改為劉永德 + if ($row["manager"] == 'M0029') { + $ret[1] = "M0137,,"; + $i++; + pricereview_class($rate, $row["manager"], $ret, $special_fee, $i); + } else { + $ret[1] = $row["manager"] . ",,"; + $i++; + pricereview_class($rate, $row["manager"], $ret, $special_fee, $i); + } + } else { + + // $ret[2] = "M0107,,<##>M0175,,"; // 業務部專員:M0175陳君敏、M0107許紓晴(第2關有多位審核人) + $ret[3] = "M0060,,"; // 業務協理 + if ($rate < 80 || $special_fee > 0) { + $ret[4] = "M0006,,"; // 總經理 + } +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb } // } diff --git a/wms/mkt/assets/js/alpine.js b/wms/mkt/assets/js/alpine.js index 85f3c5a4..05a190ee 100644 --- a/wms/mkt/assets/js/alpine.js +++ b/wms/mkt/assets/js/alpine.js @@ -84,7 +84,7 @@ const priceOptionIndex = () => { if (item.spec == null) item.spec = '' if (item.memo == null) item.memo = '' if (item.price == null) item.price = 0 - return (item.group_name.toLowerCase().includes(text.toLowerCase()) || item.spec.toLowerCase().includes(text.toLowerCase()) || item.memo.toLowerCase().includes(text.toLowerCase()) || String(item.price).includes(text.toLowerCase())); + return (item.id.includes(text.toLowerCase()) ||item.group_name.toLowerCase().includes(text.toLowerCase()) || item.spec.toLowerCase().includes(text.toLowerCase()) || item.memo.toLowerCase().includes(text.toLowerCase()) || String(item.price).includes(text.toLowerCase())); } }).slice((Number(this.currentpage) - 1) * Number(this.pageLength), (Number(this.currentpage) - 1) * Number(this.pageLength) + Number(this.pageLength)) this.dataLangth = this.options.length @@ -165,7 +165,7 @@ const priceOptionSelect = () => { if (item.spec == null) item.spec = '' if (item.memo == null) item.memo = '' if (item.price == null) item.price = 0 - return (item.group_name.toLowerCase().includes(text.toLowerCase()) || item.spec.toLowerCase().includes(text.toLowerCase()) || item.memo.toLowerCase().includes(text.toLowerCase()) || String(item.price).includes(text.toLowerCase())); + return (item.id.includes(text.toLowerCase()) || item.group_name.toLowerCase().includes(text.toLowerCase()) || item.spec.toLowerCase().includes(text.toLowerCase()) || item.memo.toLowerCase().includes(text.toLowerCase()) || String(item.price).includes(text.toLowerCase())); }).slice((Number(this.currentpage) - 1) * Number(this.pageLength), (Number(this.currentpage) - 1) * Number(this.pageLength) + Number(this.pageLength)) this.dataLangth = this.options.length } else { @@ -304,7 +304,7 @@ const pricereviewOptionSelect = () => { if(option.memo == null) option.memo = '' if(option.price == null) option.price = 0 if(option.unit == null) option.unit = '' - if(option.group_name.includes(val) || option.memo.toLowerCase().includes(val) || option.spec.toLowerCase().includes(val) || option.unit.includes(val) || String(option.price).includes(val)){ + if(option.id.includes(val) || option.group_name.includes(val) || option.memo.toLowerCase().includes(val) || option.spec.toLowerCase().includes(val) || option.unit.includes(val) || String(option.price).includes(val)){ option.status = "Y" }else{ option.status = "N" diff --git a/wms/mkt/assets/js/alpinejs/cdn.min.js b/wms/mkt/assets/js/alpinejs/cdn.min.js new file mode 100644 index 00000000..922cc02e --- /dev/null +++ b/wms/mkt/assets/js/alpinejs/cdn.min.js @@ -0,0 +1,5 @@ +(()=>{var Ze=!1,Qe=!1,H=[],et=-1;function zt(e){En(e)}function En(e){H.includes(e)||H.push(e),vn()}function we(e){let t=H.indexOf(e);t!==-1&&t>et&&H.splice(t,1)}function vn(){!Qe&&!Ze&&(Ze=!0,queueMicrotask(Sn))}function Sn(){Ze=!1,Qe=!0;for(let e=0;ee.effect(t,{scheduler:r=>{tt?zt(r):r()}}),rt=e.raw}function nt(e){I=e}function qt(e){let t=()=>{};return[n=>{let i=I(n);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(i),t=()=>{i!==void 0&&(e._x_effects.delete(i),L(i))},i},()=>{t()}]}function q(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}function O(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>O(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;for(;n;)O(n,t,!1),n=n.nextElementSibling}function v(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var Ut=!1;function Wt(){Ut&&v("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),Ut=!0,document.body||v("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's ` + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
有望客戶基本資料
卷號客戶名稱負責人客戶來源
地址案件名稱統編/身份證業主方聯係人
市話/手機營業員台數預定成交日
有望客戶狀態汰改
+ + + + + + + + + + + + +
洽商進度
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
電梯規格訊息
序號規格人乘/載重停數開門方式速度(m/min)數量單價
+
+
+
+
整機單價
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
電梯人乘/載重停數速度(m/min)開門方式規格單價數量複價售價
+ + + + + + + + + + + + + + +
小計
+
+
+
+
Option加價
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
選配規格單價數量複價備註所屬電梯功能
MAE100-6*7-CO45 +
+ + +
+
小計
+
+
+
+
除外項目
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
詢價單號名稱單價數量複價所屬電梯功能
MAE100-6*7-CO45 +
+ + +
+
小計
+
+
+
+
保固延長
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
電梯人乘/載重停數速度單價數量(月)複價備註所屬電梯功能
+ + + + + + + + MAE100-6*7-CO45 +
+ + +
+
小計
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
付款辦法款別比例(%)金額票期
材料1.訂金 + +
2.二次款 + +
3.貨到工地款 + +
4.其他 + +
安裝5.安裝完畢款 + +
6.驗收款 + +
7.其他 + +
合計
備註 + +
+
+
+
+
\ No newline at end of file diff --git a/wms/mkt/pricereview_mi-api.php b/wms/mkt/pricereview_mi-api.php index ddc64d31..495eab2a 100644 --- a/wms/mkt/pricereview_mi-api.php +++ b/wms/mkt/pricereview_mi-api.php @@ -105,6 +105,7 @@ try { $opt_elev_arr[$row[0]]["item_qty"] = $row[3]; $tmp_arr = explode(",", $row[4]); $opt_elev_arr[$row[0]]["elev_no"] = $tmp_arr; + if (!empty($opt_elev_arr[$row[0]]["elev_no"][0])) { foreach ($tmp_arr as $v) { $elev_arr[$v]["option"][] = $row[0]; @@ -124,6 +125,7 @@ try { } */ } + mysqli_free_result($res); $opt_nosel_id_arr = array_diff(array_keys($opt_elev_arr), $opt_sel_id_arr); @@ -334,6 +336,7 @@ try { AND option_mi.open_kind = '" . $v["item_op"] . "'"; $res_om = mysqli_query($link, $sql4); + if ($row_om = mysqli_fetch_assoc($res_om)) { $row_om['price'] = (int)ceil($row_om['price']); $plus = ($v["floors"] > $row_om["base_floor"]) ? ($v["floors"] - $row_om["base_floor"]) * $row_om["base_floor_plus"] : 0; @@ -485,7 +488,13 @@ try { } } // $rarr["content"][] = $exceptArr; +<<<<<<< HEAD foreach ($rarr["content"] as $idx => &$item) { +======= + print_r($rarr["content"]); + exit; + foreach($rarr["content"] as $idx=>&$item){ +>>>>>>> ea503fbee65cc2bb5ce9442e618db9c6878a09cb $newTotal = 0; $item[16] = []; $item[14] = []; diff --git a/wms/rib01-check.php b/wms/rib01-check.php index 6ef49006..9332ec24 100644 --- a/wms/rib01-check.php +++ b/wms/rib01-check.php @@ -358,7 +358,8 @@ $feetype = mysqli_fetch_all($feetype_query, MYSQLI_ASSOC); - + diff --git a/wms/rib01-edit.php b/wms/rib01-edit.php index e916daaf..cb02acf0 100644 --- a/wms/rib01-edit.php +++ b/wms/rib01-edit.php @@ -159,11 +159,13 @@ if ($pay_data) {
@@ -187,12 +189,14 @@ if ($pay_data) { echo "disabled"; } ?>> $value) { + if (is_iterable($member)) { + foreach ($member as $key => $value) { ?> - - + + diff --git a/wms/rib01-index.php b/wms/rib01-index.php index c4dd0f49..517ec992 100644 --- a/wms/rib01-index.php +++ b/wms/rib01-index.php @@ -105,81 +105,87 @@ if ($data) : - - - - - - - - - - - - - - - -

- - - - - - - - + + + + + + + + + + + + + + + +

+ + + - - - - - - - - - - - - - - - - - - - - -

- - - + + + + + + + + + + + + + + +

+ + + diff --git a/wms/rib02-create.php b/wms/rib02-create.php index 5b06c718..93d74484 100644 --- a/wms/rib02-create.php +++ b/wms/rib02-create.php @@ -157,7 +157,7 @@ $materials = $conn->query($sql_Material);
- +
diff --git a/wms/rib02-edit.php b/wms/rib02-edit.php index 7892870a..43ba5fdd 100644 --- a/wms/rib02-edit.php +++ b/wms/rib02-edit.php @@ -17,10 +17,12 @@ $member = array(); $sql_mydept = "SELECT UserId, Username FROM capMembership"; $deptmem = $conn->query($sql_mydept); -foreach ($deptmem as $mem) { - $userid = $mem['UserId']; - $username = $mem['Username']; - $member["$userid"] = [$username]; +if (is_iterable($deptmem)) { + foreach ($deptmem as $mem) { + $userid = $mem['UserId']; + $username = $mem['Username']; + $member["$userid"] = [$username]; + } }; $sql_dept = "SELECT DeptId, PersonId FROM comPerson WHERE DeptId!='0001'"; $allpeople = $conn->query($sql_dept); @@ -61,10 +63,11 @@ $rib_id = $ribsub['rib_id']; $sql_invoiceNo = "SELECT DISTINCT InvoiceNo FROM rib_sub WHERE rib_id !== $rib_id"; $invoiceNo = mysqli_query($link, $sql_invoiceNo); $invoiceNo_array = array(); -foreach ($invoiceNo as $invoice) { - array_push($invoiceNo_array, $invoice['InvoiceNo']); +if (is_iterable($invoiceNo)) { + foreach ($invoiceNo as $invoice) { + array_push($invoiceNo_array, $invoice['InvoiceNo']); + } } - $BizJSON = json_encode($BusinessPartner); $InvoiceJSON = json_encode($invoiceNo_array); $sql_Project = "SELECT * FROM comProject"; @@ -96,7 +99,7 @@ $materials = $conn->query($sql_Material);
- +
@@ -105,11 +108,13 @@ $materials = $conn->query($sql_Material); @@ -171,11 +176,13 @@ $materials = $conn->query($sql_Material); @@ -188,12 +195,14 @@ $materials = $conn->query($sql_Material); @@ -207,11 +216,13 @@ $materials = $conn->query($sql_Material); @@ -224,12 +235,14 @@ $materials = $conn->query($sql_Material); @@ -240,12 +253,14 @@ $materials = $conn->query($sql_Material); @@ -285,11 +300,13 @@ $materials = $conn->query($sql_Material); @@ -694,11 +711,13 @@ $materials = $conn->query($sql_Material); window.open('rib02-invoice.php', '新視窗的名稱', config = 'height=600, width=600'); } - function checkInvoice(){ + + function checkInvoice() { var invoiceArray = ; - if($.inArray($("#InvoiceNo").val().replace("-", ""),invoiceArray) !== -1) { + if ($.inArray($("#InvoiceNo").val().replace("-", ""), invoiceArray) !== -1) { alert("此發票已報銷過"); - $("#InvoiceNo").val('');} + $("#InvoiceNo").val(''); + } } function changeWriteOffId(SelectedDept) { diff --git a/wms/rib02-submit.php b/wms/rib02-submit.php index c561cd61..ba23422b 100644 --- a/wms/rib02-submit.php +++ b/wms/rib02-submit.php @@ -50,7 +50,7 @@ $OAmount = $CurrId == "TWD" ? round($_POST['OAmount']) : round($_POST['OAmount'] $TaxId = $_POST['TaxId']; $IsCounteract = $_POST['IsCounteract']; $InvoiceId = $_POST['InvoiceId']; -$VoucherCount = empty($_POST['VoucherCount']) ? 1 : $_POST['VoucherCount']; +$VoucherCount = isset($_POST['VoucherCount']) ? $_POST['VoucherCount']:0; $VoucherType = isset($_POST['VoucherType']) ? $_POST['VoucherType'] : 0; $InvoiceNo = empty($_POST['InvoiceNo']) ? " " : (in_array(str_replace("-", "", $_POST['InvoiceNo']), $invoiceNo_array) ? " " : str_replace("-", "", $_POST['InvoiceNo'])); @@ -106,12 +106,11 @@ if ($submit == "add") { $SQL1 = "INSERT INTO rib_sub (`RowCode`,`rib_id`,`RowNo`,`FeeDate`,`FeeTypeId`,`WriteOffType`, `BizOrgId`,`WriteOffId`,`FeeOrgId`,`FeeDeptId`,`FeeCompanyId`,`UnitId`,`Quantity`, `Price`,`OAmount`,`FeeNoteShow`,`CurrId`,`SupplyOrgId`,`CurrOAmount`,`FromSourceTag`,`TaxId`,`IsCounteract`,`InvoiceId`,`TaxRate`,`CreatorId`,`TaxNo`,`OTax`,`LTax`, - `OAmountUnWithTax`,`LAmountUnWithTax`,`LAmount`"; + `OAmountUnWithTax`,`LAmountUnWithTax`,`LAmount`,`VoucherCount`"; $SQL1 .= isset($CurrLAmount) ? ",`CurrentLAmount`" : ""; $SQL1 .= empty($ProjectId) ? "" : ",`ProjectId`"; $SQL1 .= isset($FeeTypeGen) ? ",`FeeTypeGen`" : ""; $SQL1 .= empty($CU_MaterialId) ? "" : ",`CU_MaterialId`"; - $SQL1 .= empty($VoucherCount) ? "" : ",`VoucherCount`"; $SQL1 .= isset($VoucherType) ? ",`VoucherType`" : ""; $SQL1 .= empty($InvoiceNo) ? "" : ",`InvoiceNo`"; $SQL1 .= empty($comSupplierName) ? "" : ",`comSupplierName`"; @@ -120,12 +119,11 @@ if ($submit == "add") { $SQL2 = ") VALUES ($RowCode, $rib_id, $RowCode,$FeeDate,'$FeeTypeId',2, '1000','$WriteOffId','1000','$FeeDeptId','1000','$UnitId',$Quantity, $Price,$OAmount,'$FeeNoteShow','$CurrId','1000',1,0,'$TaxId',$IsCounteract,'$InvoiceId',$TaxRate,'$user_id','$TaxNo',$OTax,$LTax, - $OAmountUnWithTax,$LAmountUnWithTax,$LAmount"; + $OAmountUnWithTax,$LAmountUnWithTax,$LAmount,$VoucherCount"; $SQL2 .= isset($CurrLAmount) ? "," . $CurrLAmount : ""; $SQL2 .= empty($ProjectId) ? "" : ",'" . $ProjectId . "'"; $SQL2 .= isset($FeeTypeGen) ? "," . $FeeTypeGen : ""; $SQL2 .= empty($CU_MaterialId) ? "" : ",'" . $CU_MaterialId . "'"; - $SQL2 .= empty($VoucherCount) ? "" : "," . $VoucherCount; $SQL2 .= isset($VoucherType) ? "," . $VoucherType : ""; $SQL2 .= empty($InvoiceNo) ? "" : ",'" . $InvoiceNo . "'"; $SQL2 .= empty($comSupplierName) ? "" : ",'" . $comSupplierName . "'"; @@ -134,11 +132,10 @@ if ($submit == "add") { } else { $SQL1 = "INSERT INTO rib_sub (`RowCode`,`rib_id`,`RowNo`,`FeeDate`,`FeeTypeId`,`WriteOffType`, `BizOrgId`,`WriteOffId`,`FeeOrgId`,`FeeDeptId`,`FeeCompanyId`,`UnitId`,`Quantity`, - `Price`,`OAmount`,`FeeNoteShow`,`CurrId`,`SupplyOrgId`,`CurrOAmount`,`FromSourceTag`,`TaxId`,`IsCounteract`,`InvoiceId`,`TaxRate`,`CreatorId`,`TaxNo`"; + `Price`,`OAmount`,`FeeNoteShow`,`CurrId`,`SupplyOrgId`,`CurrOAmount`,`FromSourceTag`,`TaxId`,`IsCounteract`,`InvoiceId`,`TaxRate`,`CreatorId`,`TaxNo`,`VoucherCount`"; $SQL1 .= empty($ProjectId) ? "" : ",`ProjectId`"; $SQL1 .= isset($FeeTypeGen) ? ",`FeeTypeGen`" : ""; $SQL1 .= empty($CU_MaterialId) ? "" : ",`CU_MaterialId`"; - $SQL1 .= empty($VoucherCount) ? "" : ",`VoucherCount`"; $SQL1 .= isset($VoucherType) ? ",`VoucherType`" : ""; $SQL1 .= empty($InvoiceNo) ? "" : ",`InvoiceNo`"; $SQL1 .= empty($comSupplierName) ? "" : ",`comSupplierName`"; @@ -146,11 +143,10 @@ if ($submit == "add") { $SQL2 = ") VALUES ($RowCode, $rib_id, $RowCode,$FeeDate,'$FeeTypeId',2, '1000','$WriteOffId','1000','$FeeDeptId','1000','$UnitId',$Quantity, - $Price,$OAmount,'$FeeNoteShow','$CurrId','1000',1,0,'$TaxId',$IsCounteract,'$InvoiceId',$TaxRate,'$user_id','$TaxNo'"; + $Price,$OAmount,'$FeeNoteShow','$CurrId','1000',1,0,'$TaxId',$IsCounteract,'$InvoiceId',$TaxRate,'$user_id','$TaxNo',$VoucherCount"; $SQL2 .= empty($ProjectId) ? "" : ",'" . $ProjectId . "'"; $SQL2 .= isset($FeeTypeGen) ? "," . $FeeTypeGen : ""; $SQL2 .= empty($CU_MaterialId) ? "" : ",'" . $CU_MaterialId . "'"; - $SQL2 .= empty($VoucherCount) ? "" : "," . $VoucherCount; $SQL2 .= isset($VoucherType) ? "," . $VoucherType : ""; $SQL2 .= empty($InvoiceNo) ? "" : ",'" . $InvoiceNo . "'"; $SQL2 .= empty($comSupplierName) ? "" : ",'" . $comSupplierName . "'"; @@ -177,11 +173,11 @@ if ($submit == "add") { 保養人員姓名 應保養日期 實際保養日期 - 保養項目編號 - 保養項目內容 + 保養結果 - 上傳照片 + 保養照片/保養品質 說明 - 客戶評價登入帳號 + 客戶姓名 - 評價/保養品質 - 評價/服務態度 - 內容 - 簽名檔 + + 建檔人 建檔時間 @@ -208,16 +208,22 @@ if ($data) : - - - - 瀏覽"; + + + + 查看明細 + + + 瀏覽 + 瀏覽"; } ?> - + - + +