diff --git a/wms/T8_assemble_apply.php b/wms/T8_assemble_apply.php new file mode 100644 index 00000000..293d0fd3 --- /dev/null +++ b/wms/T8_assemble_apply.php @@ -0,0 +1,71 @@ + + \ No newline at end of file diff --git a/wms/T8_purBillOrder_search.php b/wms/T8_purBillOrder_search.php new file mode 100644 index 00000000..e3ff95f4 --- /dev/null +++ b/wms/T8_purBillOrder_search.php @@ -0,0 +1,23 @@ +query($sql_purBillOrder); +//每筆採購單資料 +foreach($purMaster as $master){ + //print_r($master); + $BillNo = $master['BillNo']; + + //每筆採購單明細資料 + $sql_purDetail = " + SELECT * FROM purBillOrderDetail WHERE BillNo = '$BillNo'"; + $purDetail = $conn->query($sql_purDetail); + foreach($purDetail as $detail){ + print_r($detail); + } + echo "
----------------------
"; + +} + diff --git a/wms/T8_purRequestOrder_create.php b/wms/T8_purRequestOrder_create.php new file mode 100644 index 00000000..b3d9bbc7 --- /dev/null +++ b/wms/T8_purRequestOrder_create.php @@ -0,0 +1 @@ +"; +$sql_contract = "SELECT a.BillNo, a.PayStage, a.PlanPayAmt,s.BizPartnerId,c.BizPartnerName +FROM salOrderStagePay AS a +LEFT JOIN salSalesOrder AS s on a.BillNo = s.BillNo +LEFT JOIN comBusinessPartner as c ON s.BizPartnerId=c.BizPartnerId +WHERE s.ModeId = 'M' AND (s.CurrentState=2 OR s.CurrentState=4)"; + +$contract = $conn->query($sql_contract); +foreach ($contract as $cont) { + if ($cont['BillNo'] == 'SO20230801002') { + $BillNo = 'M231067'; + }else{ + $BillNo = $cont['BillNo']; + }; + $PayStage = $cont['PayStage']; + $PayAmount = $cont['PlanPayAmt']; + $partnerName = $cont['BizPartnerName']; + if(isset($arrayData[$BillNo])){ + array_push($arrayData[$BillNo], $PayStage); + array_push($arrayData[$BillNo], $PayAmount); + + }else{ + $arrayData[$BillNo][0] = $BillNo; + $arrayData[$BillNo][1] = $partnerName; + array_push($arrayData[$BillNo], $PayStage); + array_push($arrayData[$BillNo], $PayAmount); + + } +}; +foreach($arrayData as $data){ + foreach($data as $value){ + echo $value.";"; + } + echo "
"; +} \ No newline at end of file diff --git a/wms/account-receivable-index.php b/wms/account-receivable-index.php index 7a24f180..549dea60 100644 --- a/wms/account-receivable-index.php +++ b/wms/account-receivable-index.php @@ -8,7 +8,9 @@ use PhpOffice\PhpSpreadsheet\Writer\Xlsx as xls; use PhpOffice\PhpSpreadsheet\Reader\Xlsx; $arrayData = []; -echo "合約號;部門;經理;營業員;客戶名稱;簽約款;二次款;貨抵工地款;安裝款;試車款;交車款;取得許可證約交款;取得許可函後6個月約交款;目前應收;總作番數;貨抵;安裝;試車;移交數;狀態
"; + //4 簽約 5 二次款 6 貨抵工地 7 安裝 8 試車 9官檢 10 交車 +//arrive_num 貨抵工地 tryrun_num 試車安裝完畢 official_num 官檢完畢 delivery_num 移交 +echo "合約號;部門;經理;營業員;客戶名稱;簽約款;二次款;貨抵工地款;安裝款;試車款;官檢款;交車款;目前應收;總作番數;貨抵;安裝試車;官檢;移交數;狀態
"; // $T8_array = mysqli_fetch_all($T8_array, MYSQLI_ASSOC); @@ -27,15 +29,15 @@ foreach ($contract as $cont) { // echo "
"; if ($cont['BillNo'] == 'SO20230801001') { $BillNo = 'M230947'; - }elseif ($cont['BillNo'] == 'SO20230801002'){ + } elseif ($cont['BillNo'] == 'SO20230801002') { $BillNo = 'M231067'; - }else{ + } else { $BillNo = $cont['BillNo']; }; $PayStage = $cont['PayStage']; $PayAmount = $cont['PlanPayAmt']; $partnerName = $cont['BizPartnerName']; - + //4 簽約 5 二次款 6 貨抵工地 7 安裝 8 試車 9官檢 10 交車 if (isset($arrayData[$BillNo])) { if (stristr($PayStage, '二次款') || stristr($PayStage, '出貨前') || stristr($PayStage, '簽約後') || stristr($PayStage, '簽訂後') || stristr($PayStage, '建照核發時') || stristr($PayStage, '簽約60')) { $arrayData[$BillNo][5] = $PayAmount; @@ -43,16 +45,14 @@ foreach ($contract as $cont) { $arrayData[$BillNo][4] = $PayAmount; } elseif (stristr($PayStage, '貨抵工地') || stristr($PayStage, '貨底工地')) { $arrayData[$BillNo][6] = $PayAmount; - } elseif (stristr($PayStage, '安裝')) { - $arrayData[$BillNo][7] = $PayAmount; - } elseif (stristr($PayStage, '試車')) { + } elseif ( stristr($PayStage, '試車') || stristr($PayStage, '驗收完成')) { $arrayData[$BillNo][8] = $PayAmount; - } elseif (stristr($PayStage, '交車') || stristr($PayStage, '完工') || stristr($PayStage, '驗收')) { - $arrayData[$BillNo][9] = $PayAmount; - } elseif (stristr($PayStage, '取得合格函') || stristr($PayStage, '取得許可函')) { + }elseif (stristr($PayStage, '安裝')) { + $arrayData[$BillNo][7] = $PayAmount; + } elseif (stristr($PayStage, '得合格函後6個月') || stristr($PayStage, '核可函取得後6個月') || stristr($PayStage, '交車')) { $arrayData[$BillNo][10] = $PayAmount; - } elseif (stristr($PayStage, '得合格函後6個月') || stristr($PayStage, '核可函取得後6個月')) { - $arrayData[$BillNo][11] = $PayAmount; + } elseif (stristr($PayStage, '合格') || stristr($PayStage, '驗收') || stristr($PayStage, '許可') || stristr($PayStage, '核可')) { + $arrayData[$BillNo][9] = $PayAmount; } else { $arrayData[$BillNo][12] = $PayAmount; } @@ -65,21 +65,20 @@ foreach ($contract as $cont) { $arrayData[$BillNo][4] = $PayAmount; } elseif (stristr($PayStage, '貨抵工地') || stristr($PayStage, '貨底工地')) { $arrayData[$BillNo][6] = $PayAmount; - } elseif (stristr($PayStage, '安裝')) { - $arrayData[$BillNo][7] = $PayAmount; - } elseif (stristr($PayStage, '試車')) { + } elseif ( stristr($PayStage, '試車') || stristr($PayStage, '驗收完成')) { $arrayData[$BillNo][8] = $PayAmount; - } elseif (stristr($PayStage, '交車') || stristr($PayStage, '完工') || stristr($PayStage, '驗收')) { - $arrayData[$BillNo][9] = $PayAmount; - } elseif (stristr($PayStage, '取得合格函') || stristr($PayStage, '取得許可函')) { + }elseif (stristr($PayStage, '安裝')) { + $arrayData[$BillNo][7] = $PayAmount; + } elseif (stristr($PayStage, '得合格函後6個月') || stristr($PayStage, '核可函取得後6個月') || stristr($PayStage, '交車')) { $arrayData[$BillNo][10] = $PayAmount; - } elseif (stristr($PayStage, '得合格函後6個月') || stristr($PayStage, '核可函取得後6個月')) { - $arrayData[$BillNo][11] = $PayAmount; + } elseif (stristr($PayStage, '合格') || stristr($PayStage, '驗收') || stristr($PayStage, '許可') || stristr($PayStage, '核可')) { + $arrayData[$BillNo][9] = $PayAmount; } else { $arrayData[$BillNo][12] = $PayAmount; } } } + foreach ($arrayData as $key => $value) { $sql = "SELECT tmp2.*, @@ -98,6 +97,7 @@ w.actual_tofactory_date, w.real_arrival_date, w.install_end_date, w.tryrun_end_date, + w.official_check_date, w.delivery_date from wipwholestatus AS w left join account AS a @@ -118,10 +118,9 @@ ON d.department_id = tmp2.department_id"; $facitities = ""; $total_facility_num = 0; $arrive_num = 0; - $install_num = 0; $tryrun_num = 0; $delivery_num = 0; - + $official_num = 0; $wipwhole_array = mysqli_query($link, $sql); foreach ($wipwhole_array as $wip) { @@ -130,42 +129,48 @@ ON d.department_id = tmp2.department_id"; $value[1] = $wip['manager_name']; $value[2] = $wip['name']; if ($wip['delivery_date'] != NULL) { - $facitities .= $wip['facilityno'] . "(" . $wip['delivery_date'] . "已移交),\n"; + $facitities .= $wip['facilityno'] . " (" . $wip['delivery_date'] . "已移交) , \n"; $total_facility_num += 1; $arrive_num += 1; - $install_num += 1; $tryrun_num += 1; + $official_num += 1; $delivery_num += 1; - } elseif ($wip['tryrun_end_date'] != NULL) { - $facitities .= $wip['facilityno'] . "(" . $wip['tryrun_end_date'] . "試車完畢),\n"; + } elseif($wip['official_check_date'] != NULL){ + $facitities .= $wip['facilityno'] . " (" . $wip['official_check_date'] . "官檢完畢) , \n"; + $total_facility_num += 1; + $arrive_num += 1; + $tryrun_num += 1; + $official_num += 1; + }elseif ($wip['tryrun_end_date'] != NULL) { + $facitities .= $wip['facilityno'] . " (" . $wip['tryrun_end_date'] . "試車完畢) , \n"; $total_facility_num += 1; $arrive_num += 1; - $install_num += 1; $tryrun_num += 1; } elseif ($wip['install_end_date'] != NULL) { - $facitities .= $wip['facilityno'] . "(" . $wip['install_end_date'] . "安裝完畢),\n"; + $facitities .= $wip['facilityno'] . " (" . $wip['install_end_date'] . "安裝完畢) , \n"; $total_facility_num += 1; $arrive_num += 1; - $install_num += 1; } elseif ($wip['real_arrival_date'] != NULL) { - $facitities .= $wip['facilityno'] . "(" . $wip['real_arrival_date'] . "貨抵工地),\n"; + $facitities .= $wip['facilityno'] . " (" . $wip['real_arrival_date'] . "貨抵工地) , \n"; $total_facility_num += 1; $arrive_num += 1; } elseif ($wip['actual_tofactory_date'] != NULL) { - $facitities .= $wip['facilityno'] . "(" . $wip['actual_tofactory_date'] . "實際到觀音日),\n"; + $facitities .= $wip['facilityno'] . " (" . $wip['actual_tofactory_date'] . "實際到觀音日) , \n"; $total_facility_num += 1; } elseif ($wip['estimated_shipping_date'] != NULL) { - $facitities .= $wip['facilityno'] . "(" . $wip['estimated_shipping_date'] . "預計到港),\n"; + $facitities .= $wip['facilityno'] . " (" . $wip['estimated_shipping_date'] . "預計到港) , \n"; $total_facility_num += 1; } else { - $facitities .= $wip['facilityno'] . "(預計到港日待確認),\n"; + $facitities .= $wip['facilityno'] . " (預計到港日待確認) , \n"; $total_facility_num += 1; } } + //這是錢 4 簽約 5 二次款 6 貨抵工地 7 安裝 8 試車 9官檢 10 交車 + //這是數量 arrive_num 貨抵工地 tryrun_num 試車安裝完畢 official_num 官檢完畢 delivery_num 移交 if ($total_facility_num > 0) { $receivable_budget = $value[4] + ($value[5] + $value[6]) * ($arrive_num / $total_facility_num) + - ($value[7]) * ($install_num / $total_facility_num) + ($value[8]) * ($tryrun_num / $total_facility_num) - + ($value[9] + $value[10] + $value[11]) * ($delivery_num / $total_facility_num); + ($value[7]+$value[8]) * ($tryrun_num / $total_facility_num) + ($value[9]) * ($official_num / $total_facility_num) + + ($value[10]) * ($delivery_num / $total_facility_num); } - echo $key . ";" . $value[0] . ";" . $value[1] . ";" . $value[2] . ";" . $value[3] . ";" . $value[4] . ";" . $value[5] . ";" . $value[6] . ";" . $value[7] . ";" . $value[8] . ";" . $value[9] . ";" . $value[10] . ";" . $value[11] . ";" . $receivable_budget . ";" . $total_facility_num . ";" . $arrive_num . ";" . $install_num . ";" . $tryrun_num . ";" . $delivery_num . ";" . $facitities . "
"; + echo $key . ";" . $value[0] . ";" . $value[1] . ";" . $value[2] . ";" . $value[3] . ";" . $value[4] . ";" . $value[5] . ";" . $value[6] . ";" . $value[7] . ";" . $value[8] . ";" . $value[9].";" . $value[10] . ";" . $receivable_budget . ";" . $total_facility_num . ";" . $arrive_num . ";". $tryrun_num . ";" .$official_num.";". $delivery_num . ";" . $facitities . "
"; } diff --git a/wms/contract/api/postContractNewApplyData.php b/wms/contract/api/postContractNewApplyData.php new file mode 100644 index 00000000..f0032a78 --- /dev/null +++ b/wms/contract/api/postContractNewApplyData.php @@ -0,0 +1,68 @@ +beginTransaction(); + try{ + if($isFirst == 1){ + $sql_str = "INSERT INTO contract_new_apply (mid, contractno, sales_man, apply_date, apply_type, case_name, customer, manager, vat, total_price, buy_fee, install_fee, contact_address, workdeadline_a, workdeadline_b, test_time, freedeadline, trade_address, tradedeadline, progress, status, created_at, created_by) VALUES (:mid, :contractno, :sales_man, :apply_date, :apply_type, :case_name, :customer, :manager, :vat, :total_price, :buy_fee, :install_fee, :contact_address, :workdeadline_a, :workdeadline_b, :test_time, :freedeadline, :trade_address, :tradedeadline, :progress, :status, :created_at, :created_by)"; + $stmt = $conn -> prepare($sql_str); + $stmt ->bindParam(':mid', $mid); + $stmt ->bindParam(':contractno', $vol_no); + $stmt ->bindParam(':sales_man', $salesman); + $stmt ->bindParam(':apply_date', $apply_date); + $stmt ->bindParam(':apply_type', $apply_type); + $stmt ->bindParam(':case_name', $case_name); + $stmt ->bindParam(':customer', $customer); + $stmt ->bindParam(':manager', $manager); + $stmt ->bindParam(':vat', $vat); + $stmt ->bindParam(':total_price', $total_price); + $stmt ->bindParam(':buy_fee', $buy_fee); + $stmt ->bindParam(':install_fee', $install_fee); + $stmt ->bindParam(':contact_address', $contact_address); + $stmt ->bindParam(':workdeadline_a', $workdeadline_a); + $stmt ->bindParam(':workdeadline_b', $workdeadline_b); + $stmt ->bindParam(':test_time', $test_time); + $stmt ->bindParam(':freedeadline', $freedeadline); + $stmt ->bindParam(':trade_address', $trade_address); + $stmt ->bindParam(':tradedeadline', $tradedeadline); + $stmt ->bindParam(':progress', $progress); + $stmt ->bindParam(':status', $status); + $stmt ->bindParam(':created_at', $created_at); + $stmt ->bindParam(':created_by', $created_by); + $stmt ->execute(); + header("HTTP/1.1 201 success!"); + $conn->commit(); + } + }catch(PDOException $e){ + $conn->rollback(); + echo $e->getMessage(); + die('Error!:'.$e->getMessage()); + } + + +} \ No newline at end of file diff --git a/wms/contract/api/postNewContractData.php b/wms/contract/api/postNewContractData.php index dc08c30c..001fe1f5 100644 --- a/wms/contract/api/postNewContractData.php +++ b/wms/contract/api/postNewContractData.php @@ -22,6 +22,7 @@ if(isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['co $lm_tel = $_POST["lm_tel"]; $address = $_POST["address"]; $salesman = $_POST["salesman"]; + $qc = $_POST["qc"]; $contracttype = $_POST["contracttype"]; $files = !empty($_FILES['files']) ? $_FILES['files'] : null; $files_id = null; @@ -36,6 +37,7 @@ if(isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['co 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); @@ -105,7 +107,7 @@ if(isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['co $files = null; } - $sql_str = "INSERT INTO contract_m_signed_back (contract_no, customer, manager, vat, case_name, linkman, lm_tel, address, salesman, salesman_name, files_id, created_at, created_by) VALUES (:contract_no, :customer, :manager, :vat, :case_name, :linkman, :lm_tel, :address, :salesman, :salesman_name, :files_id, :created_at, :created_by)"; + $sql_str = "INSERT INTO contract_m_signed_back (contract_no, customer, manager, vat, case_name, linkman, lm_tel, address, salesman, salesman_name, files_id, created_at, created_by, qc_official_type) VALUES (:contract_no, :customer, :manager, :vat, :case_name, :linkman, :lm_tel, :address, :salesman, :salesman_name, :files_id, :created_at, :created_by, :qc)"; $stmt = $conn -> prepare($sql_str); $stmt -> bindParam(":contract_no",$contractno); $stmt -> bindParam(":customer",$customer); @@ -120,6 +122,7 @@ if(isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['co $stmt -> bindParam(":files_id",$files_id); $stmt -> bindParam(":created_at",$created_at); $stmt -> bindParam(":created_by",$created_by); + $stmt -> bindParam(":qc",$qc); $stmt -> execute(); diff --git a/wms/contract/api/putContractData.php b/wms/contract/api/putContractData.php index 63694e83..f1e78164 100644 --- a/wms/contract/api/putContractData.php +++ b/wms/contract/api/putContractData.php @@ -17,6 +17,7 @@ if(isset($_POST['contractno']) && $_POST['contractno']!="" && isset($_POST["id"] $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; @@ -33,6 +34,7 @@ if(isset($_POST['contractno']) && $_POST['contractno']!="" && isset($_POST["id"] 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); @@ -41,7 +43,7 @@ if(isset($_POST['contractno']) && $_POST['contractno']!="" && isset($_POST["id"] $conn->beginTransaction(); - $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 WHERE id = :id"; + $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); @@ -52,6 +54,7 @@ if(isset($_POST['contractno']) && $_POST['contractno']!="" && isset($_POST["id"] $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)){ diff --git a/wms/contract/composer.json b/wms/contract/composer.json index da158f4b..09abf778 100644 --- a/wms/contract/composer.json +++ b/wms/contract/composer.json @@ -12,6 +12,7 @@ } ], "require": { - "tecnickcom/tcpdf": "^6.6" + "tecnickcom/tcpdf": "^6.6", + "phpoffice/phpspreadsheet": "^1.29" } } diff --git a/wms/contract/composer.lock b/wms/contract/composer.lock index 3f3992b1..bdc40884 100644 --- a/wms/contract/composer.lock +++ b/wms/contract/composer.lock @@ -4,8 +4,573 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c5a277735def820cc2b17b4a2b30976d", + "content-hash": "f9ceea0f00278e84ee8bc939092d4886", "packages": [ + { + "name": "ezyang/htmlpurifier", + "version": "v4.17.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/bbc513d79acf6691fa9cf10f192c90dd2957f18c", + "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c", + "shasum": "" + }, + "require": { + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + }, + "require-dev": { + "cerdic/css-tidy": "^1.7 || ^2.0", + "simpletest/simpletest": "dev-master" + }, + "suggest": { + "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", + "ext-bcmath": "Used for unit conversion and imagecrash protection", + "ext-iconv": "Converts text to and from non-UTF-8 encodings", + "ext-tidy": "Used for pretty-printing HTML" + }, + "type": "library", + "autoload": { + "files": [ + "library/HTMLPurifier.composer.php" + ], + "psr-0": { + "HTMLPurifier": "library/" + }, + "exclude-from-classmap": [ + "/library/HTMLPurifier/Language/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "support": { + "issues": "https://github.com/ezyang/htmlpurifier/issues", + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.17.0" + }, + "time": "2023-11-17T15:01:25+00:00" + }, + { + "name": "maennchen/zipstream-php", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/maennchen/ZipStream-PHP.git", + "reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/b8174494eda667f7d13876b4a7bfef0f62a7c0d1", + "reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-zlib": "*", + "php-64bit": "^8.1" + }, + "require-dev": { + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.16", + "guzzlehttp/guzzle": "^7.5", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.5", + "phpunit/phpunit": "^10.0", + "vimeo/psalm": "^5.0" + }, + "suggest": { + "guzzlehttp/psr7": "^2.4", + "psr/http-message": "^2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "ZipStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paul Duncan", + "email": "pabs@pablotron.org" + }, + { + "name": "Jonatan Männchen", + "email": "jonatan@maennchen.ch" + }, + { + "name": "Jesse Donat", + "email": "donatj@gmail.com" + }, + { + "name": "András Kolesár", + "email": "kolesar@kolesar.hu" + } + ], + "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", + "keywords": [ + "stream", + "zip" + ], + "support": { + "issues": "https://github.com/maennchen/ZipStream-PHP/issues", + "source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.0" + }, + "funding": [ + { + "url": "https://github.com/maennchen", + "type": "github" + }, + { + "url": "https://opencollective.com/zipstream", + "type": "open_collective" + } + ], + "time": "2023-06-21T14:59:35+00:00" + }, + { + "name": "markbaker/complex", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPComplex/issues", + "source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2" + }, + "time": "2022-12-06T16:21:08+00:00" + }, + { + "name": "markbaker/matrix", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "^4.0", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "sebastian/phpcpd": "^4.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@demon-angel.eu" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPMatrix/issues", + "source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1" + }, + "time": "2022-12-02T22:17:43+00:00" + }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.29.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fde2ccf55eaef7e86021ff1acce26479160a0fa0", + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "ezyang/htmlpurifier": "^4.15", + "maennchen/zipstream-php": "^2.1 || ^3.0", + "markbaker/complex": "^3.0", + "markbaker/matrix": "^3.0", + "php": "^7.4 || ^8.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-main", + "dompdf/dompdf": "^1.0 || ^2.0", + "friendsofphp/php-cs-fixer": "^3.2", + "mitoteam/jpgraph": "^10.3", + "mpdf/mpdf": "^8.1.1", + "phpcompatibility/php-compatibility": "^9.3", + "phpstan/phpstan": "^1.1", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0", + "squizlabs/php_codesniffer": "^3.7", + "tecnickcom/tcpdf": "^6.5" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "ext-intl": "PHP Internationalization Functions", + "mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "support": { + "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.0" + }, + "time": "2023-06-14T22:48:31+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "e616d01114759c4c489f93b099585439f795fe35" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + }, + "time": "2023-04-10T20:10:41+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "psr/simple-cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" + }, + "time": "2021-10-29T13:26:27+00:00" + }, { "name": "tecnickcom/tcpdf", "version": "6.6.5", diff --git a/wms/contract/contract-new-apply.php b/wms/contract/contract-new-apply.php new file mode 100644 index 00000000..856f0896 --- /dev/null +++ b/wms/contract/contract-new-apply.php @@ -0,0 +1,477 @@ +alert('非法訪問!!!');"; + echo ""; + exit; +} +$id = $_GET["id"]; + +$sql_str = "SELECT * FROM contract_new_apply WHERE mid = :mid"; +$stmt = $conn->prepare($sql_str); +$stmt->bindParam(':mid',$id); +$stmt->execute(); +$contract_new_apply = $stmt->fetch(PDO::FETCH_ASSOC); +if(empty($contract_new_apply)){ + + + $sql_str = "SELECT pricereview_main.*, pricereview_main.id as mainid, account.name as accountname + FROM pricereview_main + JOIN account ON pricereview_main.person = account.accountid + WHERE pricereview_main.id = :id"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':id',$id); + $stmt->execute(); + $contract = $stmt->fetch(PDO::FETCH_ASSOC); + print_r($contract); + $accounttype = "M"; + $sql_str = "SELECT * FROM account WHERE accounttype = :accounttype"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':accounttype',$accounttype); + $stmt->execute(); + $persons = $stmt->fetchAll(PDO::FETCH_ASSOC); + + $sql_str = "SELECT * FROM hope_elevator_customer WHERE vol_no = :vol_no ORDER BY created_at DESC"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':vol_no', $contract['contractno']); + $stmt->execute(); + $customer = $stmt->fetch(PDO::FETCH_ASSOC); + + $mid = $contract['mainid']; + $sql_str = "SELECT * FROM pricereview_pay WHERE mid = :mid ORDER BY pay_kind ASC"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':mid', $mid); + $stmt->execute(); + $pays = $stmt->fetchAll(PDO::FETCH_ASSOC); + print_r($pays); + $price_a = 0; + $price_b = 0; + foreach($pays as $pay){ + if($pay['pay_kind'] <= 4){ + $price_a = $price_a + $pay['pay_amount']; + }else{ + $price_b = $price_b + $pay['pay_amount']; + } + } + $sql_str = "SELECT * FROM pricereview_item WHERE mid = :mid AND item_group = 'A'"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':mid', $mid); + $stmt->execute(); + $items = $stmt->fetchAll(PDO::FETCH_ASSOC); +} +?> + + + + + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

合約書申請(新梯)

+
+

業務確認項

+
+ + +
卷號 +
+ + +
統一編號 + +

未填寫

+
合約書申請日期 + +

未填寫

+
申請類別 + +

未填寫

+
案件名稱 + +

未填寫

+
立約人 + +

未填寫

+
負責人 + +

未填寫

+
含稅給約總價 + +

未填寫

+
含稅貸款(A) + +

未填寫

+
含稅安裝款(A) + +

未填寫

+
聯絡地址 + +

未填寫

+
完工期限 +
+
+ 貨抵工地 +
+ +
+ 天內安裝完成,甲方應於貨底工地前 +
+ +
+ 天完成並整理完善。 +
+
+ +

未填寫

+
附則 +
+
+ 乙方應於 +
+ +
+ 天內試車完成 +
+
+

未填寫

+
免保期限 +
+ +
+ 個月 +
+
+

未填寫

+
交貨地點 + +

未填寫

+
交貨期限 +
+
+ 圖色確認第 +
+ +
+ 天出貨 +
+
+

未填寫

+
+ + + + + + + + + + + + +
+

項次

+
+

規格

+
+

數量

+
+

金額

+
+ + + + + + + + + + + + + + + "訂金", + 2=> "二次款", + 3=>"貨到款", + 4=>"", + 5=>"安裝款", + 6=>"尾款", + 7=>"", + ]; + $paydate = [ + 1=>"合約日", + 2=>"合約日", + 3=>"出貨日", + 4=>"", + 5=>"竣檢日", + 6=>"交車日", + 7=>"" + ]; + ?> + + + + + + + + + + + + + +
+

合約類別

+
+

款別

+
+

條件名稱

+
+

收款條件日期區分

+
+

條件日期

+
+

票期

+
+

付款比率

+
+

金額

+
+

+
+

+
+ + + + + + + +

貨抵工地付貨到款

+ + + + + + + +

-

+ +
+

+
+
+ +
+ 天 +
+
+
+
+ +
+ 天 +
+
+
+

%

+
+

+
+ + + + + + + + + + + + + + + + + + +
+

簽核流程

+
業務部協理 + + + + 業務部承辦人 + + + + 營業經理 + + + + 營業員
+ + +
+
+
+ + + + + diff --git a/wms/contract/contract-newelevator-edit.php b/wms/contract/contract-newelevator-edit.php index 3aef11fa..424a0d01 100644 --- a/wms/contract/contract-newelevator-edit.php +++ b/wms/contract/contract-newelevator-edit.php @@ -54,6 +54,7 @@ $persons = array_map(function($person){ files:, newfiles:[], deletefiles:[], + qc:"", files_id: "", }, fail_arr:[], @@ -74,11 +75,13 @@ $persons = array_map(function($person){ form.append("case_name", this.data.case_name); form.append("linkman", this.data.linkman); form.append("lm_tel", this.data.lm_tel); - form.append("address", this.data.address); + form.append("address", this.data.address);user_id form.append("salesman", this.data.salesman); + form.append("qc", this.data.qc); form.append("deletefiles", this.data.deletefiles); form.append("files_id", this.data.files_id); form.append("user_id", ""); + form.append("", ""); for (var i = 0; i < this.data.newfiles.length; i++) { form.append("files[]", this.data.newfiles[i]); @@ -87,19 +90,8 @@ $persons = array_map(function($person){ axios.post("./api/putContractData.php", form).then(res=>{ console.log(res.data) if(res.status === 200){ - alert("更新成功") - this.step = 1 - this.data.contractno="" - this.data.customer="" - this.data.manager="" - this.data.vat="" - this.data.case_name="" - this.data.linkman="" - this.data.lm_tel="" - this.data.address="" - this.data.salesman="" - this.data.files=[] - this.customize = false + alert("更新成功"); + window.location.reload(); } this.isLoading = false }).catch(error=>{ @@ -186,8 +178,18 @@ $persons = array_map(function($person){

未填寫

+ QC和官檢 + + +

未填寫

+ 案件名稱 - +

未填寫

@@ -239,6 +241,8 @@ $persons = array_map(function($person){ -
- -

OPTION價格查詢

-
- - - - - - - - - - - - - $v) { - foreach ($v as $k2 => $v2) { - foreach ($v2 as $k3 => $v3) { - if ($v3["optional"] == "1") $optional = "標"; - elseif ($v3["optional"] == "2") $optional = "選"; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } - } -} +prepare($sql_str); +$stmt->bindParam(':kind', $kind); +$stmt->execute(); +$options = $stmt->fetchAll(PDO::FETCH_ASSOC); +$optional_arr = [1=>'標', 2=>'選']; ?> - -
名稱規格備註配置單位定價
".$k2."".$v3["spec"]."".$v3["memo"]."".$optional."".$v3["unit"]."".number_format($v3["price"])."
+ + + + + + -
- \ No newline at end of file + + + \ No newline at end of file diff --git a/wms/mkt/price_option-index2.php b/wms/mkt/price_option-index2.php new file mode 100644 index 00000000..e4c81bb9 --- /dev/null +++ b/wms/mkt/price_option-index2.php @@ -0,0 +1,87 @@ + + + +
+ +

OPTION價格查詢

+
+ + + + + + + + + + + + + $v) { + foreach ($v as $k2 => $v2) { + foreach ($v2 as $k3 => $v3) { + if ($v3["optional"] == "1") $optional = "標"; + elseif ($v3["optional"] == "2") $optional = "選"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + } +} +?> + +
名稱規格備註配置單位定價
".$k2."".$v3["spec"]."".$v3["memo"]."".$optional."".$v3["unit"]."".number_format($v3["price"])."
+
+
+ \ No newline at end of file diff --git a/wms/mkt/price_option-select.php b/wms/mkt/price_option-select.php new file mode 100644 index 00000000..65a89a48 --- /dev/null +++ b/wms/mkt/price_option-select.php @@ -0,0 +1,106 @@ +prepare($sql_str); +$stmt->execute(); +$options = $stmt->fetchAll(PDO::FETCH_ASSOC); +$optional_arr = [1=>'標', 2=>'選']; +?> + + + + + +
+ + +
+ +

OPTION價格查詢

+
+
+ + + +
+ + + + + + + + + + + + + + +
名稱規格備註配置單位定價
+ +
+
+
+ + + \ No newline at end of file diff --git a/wms/mkt/pricereview-check.php b/wms/mkt/pricereview-check.php index 23dad8e4..b1cb75e3 100644 --- a/wms/mkt/pricereview-check.php +++ b/wms/mkt/pricereview-check.php @@ -310,6 +310,7 @@ $(function () { $("#checker").prop("disabled", false); $("#status_n").prop("disabled", false); $("#status_y").prop("disabled", false); + $("#status_yy").prop("disabled", false); $("#id").prop("disabled", false); $("#st").prop("disabled", false); $('#btn_close').prop("disabled", false); @@ -974,8 +975,11 @@ hr { - - + + + + + diff --git a/wms/mkt/pricereview-index.php b/wms/mkt/pricereview-index.php index 8dccb19c..6e9a631c 100644 --- a/wms/mkt/pricereview-index.php +++ b/wms/mkt/pricereview-index.php @@ -14,7 +14,7 @@ $sql_cmd = sql_myself($user_id); if ($user_id == "M0024" || $user_id == "M0107") { $sql_cmd = "where create_at >= '2023-01-01 00:00:00'"; } -if ($user_id == "M0060") { +if ($user_id == "M0060" ) { $sql_cmd = "where creater in (select accountid from account where (department_id like '3%' or department_id like '5%'))"; } if (empty($sql_cmd)) $sql = "select * from pricereview_main where status like 'Y%' and ekind = '新梯' order by id"; @@ -357,7 +357,7 @@ if ($user_id=="M0023") { $str = $uperson = $ustatus = $udtte = ""; if (!empty($sign3)) list($uperson, $ustatus, $udtte) = explode(",", $sign3); if ($ustatus) { - if ($ustatus == "Y") $str = ""; + if ($ustatus == "Y" || $ustatus == "YY") $str = ""; elseif ($ustatus == "N") $str = ""; $str .= "
".$accountname_arr[$uperson]."
".$udtte; } else { @@ -425,9 +425,13 @@ if ($user_id=="M0023") {

--> - - 合約書申請 - + + 合約書申請 + + + + 合約書下載 + diff --git a/wms/mkt/pricereview-record-check.php b/wms/mkt/pricereview-record-check.php index b8bf6b48..340f3b8d 100644 --- a/wms/mkt/pricereview-record-check.php +++ b/wms/mkt/pricereview-record-check.php @@ -59,7 +59,11 @@ if (isset($_POST['status'])) { $sql2 .= "status = 'YY'"; } $end_flow = 1; - } else { + }elseif($status == 'YY'){ + $sql2 .= "status = 'YY'"; + $end_flow = 1; + } + else { $do_assign = 1; } if ($item_no_all) { @@ -82,7 +86,7 @@ if (isset($_POST['status'])) { mysqli_query($link, $db_query); } } - + echo $status; if ($sql) { $db_query = "update pricereview_sign set $sql where mid = '$id'"; mysqli_query($link, $db_query); @@ -128,6 +132,6 @@ if (isset($_POST['status'])) { } mysqli_close($link); echo ""; } diff --git a/wms/mkt/pricereview_renovate-check.php b/wms/mkt/pricereview_renovate-check.php index 79e51e12..0fde252d 100644 --- a/wms/mkt/pricereview_renovate-check.php +++ b/wms/mkt/pricereview_renovate-check.php @@ -1018,7 +1018,22 @@ hr { - 業務部協理 + + prepare($sql_str); + $stmt->bindParam(':name',$accountname_arr[$person3]); + $stmt->execute(); + $user = $stmt->fetch(PDO::FETCH_ASSOC); + echo $user['role']; + }else{ + echo "業務部協理"; + } + + ?> + diff --git a/wms/mkt/specsurvey-edit.zip b/wms/mkt/specsurvey-edit.zip new file mode 100644 index 00000000..b6fb52d4 Binary files /dev/null and b/wms/mkt/specsurvey-edit.zip differ diff --git a/wms/mkt/specsurvey-index.php b/wms/mkt/specsurvey-index.php index 2a806f21..87e8b723 100644 --- a/wms/mkt/specsurvey-index.php +++ b/wms/mkt/specsurvey-index.php @@ -5,7 +5,7 @@ include "../header.php"; $data = array(); // sql語法存在變數中 $sql_cmd = sql_myself($user_id, "s.creater"); -if ($user_id == "M0060") $sql_cmd = ""; +if ($user_id == "M0060" || $user_id == "M0023") $sql_cmd = ""; $sql2 = (empty($sql_cmd)) ? "where" : "and"; $sql2 .= " s.mid = p.id and p.ekind = '新梯' "; $sql2 .= "and (s.mid, s.pr_item_id, s.sub_item_id, s.version) in (select s.mid, s.pr_item_id, s.sub_item_id, max(s.version) from specsurvey_main s, pricereview_main p where s.mid = p.id group by s.mid, s.pr_item_id, s.sub_item_id)"; diff --git a/wms/mkt/specsurvey_renovate-index.php b/wms/mkt/specsurvey_renovate-index.php index 1478118c..55b79cf3 100644 --- a/wms/mkt/specsurvey_renovate-index.php +++ b/wms/mkt/specsurvey_renovate-index.php @@ -5,7 +5,7 @@ include "../header.php"; $data = array(); // sql語法存在變數中 $sql_cmd = sql_myself($user_id, "s.creater"); -if ($user_id == "M0060") $sql_cmd = ""; +if ($user_id == "M0060" || $user_id == "M0023") $sql_cmd = ""; $sql2 = (empty($sql_cmd)) ? "where" : "and"; $sql2 .= " s.mid = p.id and p.ekind = '汰改' "; $sql2 .= "and (s.mid, s.pr_item_id, s.sub_item_id, s.version) in (select s.mid, s.pr_item_id, s.sub_item_id, max(s.version) from specsurvey_main s, pricereview_main p where s.mid = p.id group by s.mid, s.pr_item_id, s.sub_item_id)"; diff --git a/wms/rib-feeapply-test.php b/wms/rib-feeapply-test.php new file mode 100644 index 00000000..8d179213 --- /dev/null +++ b/wms/rib-feeapply-test.php @@ -0,0 +1,12 @@ +".$BillDate."
".$OrgId; \ No newline at end of file diff --git a/wms/rib-test.php b/wms/rib-test.php index d95168b8..ee591f50 100644 --- a/wms/rib-test.php +++ b/wms/rib-test.php @@ -1,86 +1,75 @@ ".$delivery_date; +$final_date = strtotime("2023-05-03 +6 months"); +echo "
".$final_date; +echo "
-------
".gettype($final_date); +exit(); include "T8_Authorization.php"; -echo "應付確認單"; +echo "發貨單"; ?>