From 75854227fc3a2e87bcb50f1b55d86f042c812e72 Mon Sep 17 00:00:00 2001 From: Ellin Date: Tue, 2 Jan 2024 18:01:44 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9F=A5=E8=A9=A2=E9=87=8D=E8=A4=87?= =?UTF-8?q?=E5=A0=B1=E9=8A=B7=E7=99=BC=E7=A5=A8;=20rib02=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E4=BB=A5=E9=87=8D=E8=A4=87=E5=A0=B1=E9=8A=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wms/account-receivable-index.php | 75 ++++++++++++++++++++++++++------ wms/rib-invoice-check.php | 60 +++++++++++++++++++++++++ wms/rib02-create.php | 20 ++++++++- wms/rib02-edit.php | 19 +++++++- wms/rib02-submit.php | 9 +++- 5 files changed, 166 insertions(+), 17 deletions(-) create mode 100644 wms/rib-invoice-check.php diff --git a/wms/account-receivable-index.php b/wms/account-receivable-index.php index 45f5d9f4..817c049b 100644 --- a/wms/account-receivable-index.php +++ b/wms/account-receivable-index.php @@ -515,7 +515,7 @@ foreach ($wipwhole_array as $wip) { } if (!empty($wip['tryrun_end_date']) && $wip['tryrun_end_date'] != NULL) { - if ( isset($arrayData[$wip['contractno']]['tryrun'][0]) && $arrayData[$wip['contractno']]['tryrun'][0] == "安裝試車後90天") { + if (isset($arrayData[$wip['contractno']]['tryrun'][0]) && $arrayData[$wip['contractno']]['tryrun'][0] == "安裝試車後90天") { $estimate_delivery_time = strtotime($wip['tryrun_end_date']); $tryruntime = $estimate_delivery_time + (90 * 86400); $month = collect_month($tryruntime); @@ -846,6 +846,8 @@ $excel_aray = array(); $boga_array = array(); $exclude_boga_array = array(); $facility_array = array(); +$facility_boga_array = array(); +$facility_exclude_boga_array = array(); foreach ($arrayData as $key => $value) { $value['sign'][3] = (isset($value['sign'][3])) ? $value['sign'][3] : 0; $value['second'][3] = (isset($value['second'][3])) ? $value['second'][3] : 0; @@ -916,7 +918,7 @@ foreach ($arrayData as $key => $value) { $val[$stage][6] = (!(isset($val[$stage][6])) || is_null($val[$stage][6])) ? 0 : $val[$stage][6]; } $facility_array[$valkey] = [ - $valkey, $key, $value[1], $value[2], $value[4], $value[5], $value[7], $value[8], $value[6], + $valkey, $key, $value[1], $value[2], $value[4], $value[5], $value[7], $value[8], $value[6], $val['sign'][0], $val['sign'][1], $val['sign'][2], $val['sign'][3], $val['sign'][4], $val['sign'][5], $val['sign'][6], $val['second'][0], $val['second'][1], $val['second'][2], $val['second'][3], $val['second'][4], $val['second'][5], $val['second'][6], $val['arrive'][0], $val['arrive'][1], $val['arrive'][2], $val['arrive'][3], $val['arrive'][4], $val['arrive'][5], $val['arrive'][6], @@ -927,19 +929,43 @@ foreach ($arrayData as $key => $value) { $val['final'][0], $val['final'][1], $val['final'][2], $val['final'][3], $val['final'][4], $val['final'][5], $val['final'][6], str_replace('
', '; ', $val['status']), $val['total_budget'], $val['receivable_budget'] ]; + if ($value['sign'][0] == "寶佳出貨前30天") { + $facility_boga_array[$valkey] = [ + $valkey, $key, $value[1], $value[2], $value[4], $value[5], $value[7], $value[8], $value[6], + $val['sign'][0], $val['sign'][1], $val['sign'][2], $val['sign'][3], $val['sign'][4], $val['sign'][5], $val['sign'][6], + $val['second'][0], $val['second'][1], $val['second'][2], $val['second'][3], $val['second'][4], $val['second'][5], $val['second'][6], + $val['arrive'][0], $val['arrive'][1], $val['arrive'][2], $val['arrive'][3], $val['arrive'][4], $val['arrive'][5], $val['arrive'][6], + $val['install'][0], $val['install'][1], $val['install'][2], $val['install'][3], $val['install'][4], $val['install'][5], $val['install'][6], + $val['tryrun'][0], $val['tryrun'][1], $val['tryrun'][2], $val['tryrun'][3], $val['tryrun'][4], $val['tryrun'][5], $val['tryrun'][6], + $val['check'][0], $val['check'][1], $val['check'][2], $val['check'][3], $val['check'][4], $val['check'][5], $val['check'][6], + $val['delivery'][0], $val['delivery'][1], $val['delivery'][2], $val['delivery'][3], $val['delivery'][4], $val['delivery'][5], $val['delivery'][6], + $val['final'][0], $val['final'][1], $val['final'][2], $val['final'][3], $val['final'][4], $val['final'][5], $val['final'][6], + str_replace('
', '; ', $val['status']), $val['total_budget'], $val['receivable_budget'] + ]; + } else { + $facility_exclude_boga_array[$valkey] = [ + $valkey, $key, $value[1], $value[2], $value[4], $value[5], $value[7], $value[8], $value[6], + $val['sign'][0], $val['sign'][1], $val['sign'][2], $val['sign'][3], $val['sign'][4], $val['sign'][5], $val['sign'][6], + $val['second'][0], $val['second'][1], $val['second'][2], $val['second'][3], $val['second'][4], $val['second'][5], $val['second'][6], + $val['arrive'][0], $val['arrive'][1], $val['arrive'][2], $val['arrive'][3], $val['arrive'][4], $val['arrive'][5], $val['arrive'][6], + $val['install'][0], $val['install'][1], $val['install'][2], $val['install'][3], $val['install'][4], $val['install'][5], $val['install'][6], + $val['tryrun'][0], $val['tryrun'][1], $val['tryrun'][2], $val['tryrun'][3], $val['tryrun'][4], $val['tryrun'][5], $val['tryrun'][6], + $val['check'][0], $val['check'][1], $val['check'][2], $val['check'][3], $val['check'][4], $val['check'][5], $val['check'][6], + $val['delivery'][0], $val['delivery'][1], $val['delivery'][2], $val['delivery'][3], $val['delivery'][4], $val['delivery'][5], $val['delivery'][6], + $val['final'][0], $val['final'][1], $val['final'][2], $val['final'][3], $val['final'][4], $val['final'][5], $val['final'][6], + str_replace('
', '; ', $val['status']), $val['total_budget'], $val['receivable_budget'] + ]; + } } } -// foreach($facility_array as $key=>$value){ -// echo $key; -// echo '
'; -// print_r($value); -// echo '

'; -// } + $data = json_encode($excel_aray); $boga_data = json_encode($boga_array); $exclude_boga_data = json_encode($exclude_boga_array); $facility_data = json_encode($facility_array); +$facility_boga_data = json_encode($facility_boga_array); +$facility_exclude_boga_data = json_encode($facility_exclude_boga_array); ?> -
- - - + + +
+
+ + +
"; diff --git a/wms/rib-invoice-check.php b/wms/rib-invoice-check.php new file mode 100644 index 00000000..e693864c --- /dev/null +++ b/wms/rib-invoice-check.php @@ -0,0 +1,60 @@ +"; + if (isset($array[$InvoiceNo])) { + if (in_array($value['BillNo'], $array[$InvoiceNo]['BillNo'])) { + } else { + array_push($array[$InvoiceNo]['BillNo'], $value['BillNo']); + array_push($array[$InvoiceNo]['InvoiceNo'], $value['InvoiceNo']); + $repeat_array[$InvoiceNo]['BillNo']= $array[$InvoiceNo]['BillNo']; + $repeat_array[$InvoiceNo]['InvoiceNo']= $array[$InvoiceNo]['InvoiceNo']; + } + } else { + // $array[$InvoiceNo] = array($value['BillNo']); + $array[$InvoiceNo]['BillNo']= array($value['BillNo']); + $array[$InvoiceNo]['InvoiceNo']=array($value['InvoiceNo']); + } +} +$duplicate = "("; +foreach($repeat_array as $repeat){ + $tmp = "'"; + $tmp .= implode("','",$repeat['InvoiceNo']); + $tmp .="'"; + $duplicate .= $tmp.","; +} + +$duplicate = substr($duplicate,0,-1); +$duplicate.=")"; +// // echo $repeat."
"; +$sql_repeat = "SELECT +A.rib_id,A.BillNo, A.CurrentState, A.CreatorId,C.name,B.InvoiceNo, A.GatheringPersonId,A.WriteOffAmount,A.CreateTime +FROM `rib_sub` AS B +LEFT JOIN `rib` AS A ON A.rib_id=B.rib_id +LEFT JOIN `account` AS C ON A.CreatorId=C.accountid +WHERE A.CurrentState IN (1,2,4) +AND B.InvoiceNo IN $duplicate ORDER BY B.InvoiceNo"; + + +$repeat_query = mysqli_query($link, $sql_repeat); +foreach($repeat_query as $value){ + echo $value['rib_id'].";".$value['BillNo'].";".$value['CurrentState'].";".$value['CreatorId'].";".$value['name'].";".$value['InvoiceNo'].";".$value['GatheringPersonId'].";".$value['WriteOffAmount'].";".$value['CreateTime']; + echo "
"; +} + +?> \ No newline at end of file diff --git a/wms/rib02-create.php b/wms/rib02-create.php index 109b266d..1b932eab 100644 --- a/wms/rib02-create.php +++ b/wms/rib02-create.php @@ -7,8 +7,10 @@ $CurrId = isset($_GET['CurrId']) ? $_GET['CurrId'] : null; $sql_rib = ""; if (empty($rib_id)) { $sql_rib = "SELECT * FROM rib WHERE BillNo = '$BillNo' && CurrentState=0"; + $sql_invoiceNo = "SELECT DISTINCT InvoiceNo FROM rib_sub WHERE BillNo!==$BillNo"; } else { $sql_rib = "SELECT * FROM rib WHERE rib_id = $rib_id"; + $sql_invoiceNo = "SELECT DISTINCT InvoiceNo FROM rib_sub WHERE rib_id!==$rib_id"; } $rib_query = mysqli_query($link, $sql_rib); if (mysqli_num_rows($rib_query) > 0) { @@ -114,7 +116,17 @@ foreach ($BizPartner as $biz) { array_push($BusinessPartner, $bizKey); $bizcount += 1; } +// 取得所有報銷過的發票號碼 + +$invoiceNo = mysqli_query($link, $sql_invoiceNo); +$invoiceNo_array = array(); +foreach ($invoiceNo as $invoice) { + array_push($invoiceNo_array, $invoice['InvoiceNo']); +} + + $BizJSON = json_encode($BusinessPartner); +$InvoiceJSON = json_encode($invoiceNo_array); $sql_Project = "SELECT * FROM comProject"; $projects = $conn->query($sql_Project); $sql_Material = "SELECT * FROM comMaterialGroup"; @@ -389,7 +401,7 @@ $materials = $conn->query($sql_Material);
- +
@@ -665,6 +677,12 @@ $materials = $conn->query($sql_Material); window.open('rib02-invoice.php', '發票範例', config = 'height=600, width=600'); } + function checkInvoice(){ + var invoiceArray = ; + if($.inArray($("#InvoiceNo").val(),invoiceArray) !== -1) { + alert("此發票已報銷過"); + $("#InvoiceNo").val('');} + } function changeWriteOffId(SelectedDept) { var SelectDeptId = 'WriteOff' + SelectedDept + '-'; diff --git a/wms/rib02-edit.php b/wms/rib02-edit.php index 647ca65a..7892870a 100644 --- a/wms/rib02-edit.php +++ b/wms/rib02-edit.php @@ -55,7 +55,18 @@ foreach ($BizPartner as $biz) { array_push($BusinessPartner, $bizKey); $bizcount += 1; } + +// 取得所有報銷過的發票號碼 +$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']); +} + $BizJSON = json_encode($BusinessPartner); +$InvoiceJSON = json_encode($invoiceNo_array); $sql_Project = "SELECT * FROM comProject"; $projects = $conn->query($sql_Project); $sql_Material = "SELECT * FROM comMaterialGroup"; @@ -410,7 +421,7 @@ $materials = $conn->query($sql_Material);
- +
@@ -683,6 +694,12 @@ $materials = $conn->query($sql_Material); window.open('rib02-invoice.php', '新視窗的名稱', config = 'height=600, width=600'); } + function checkInvoice(){ + var invoiceArray = ; + if($.inArray($("#InvoiceNo").val().replace("-", ""),invoiceArray) !== -1) { + alert("此發票已報銷過"); + $("#InvoiceNo").val('');} + } function changeWriteOffId(SelectedDept) { var SelectDeptId = 'WriteOff' + SelectedDept + '-'; diff --git a/wms/rib02-submit.php b/wms/rib02-submit.php index 16f837d9..592c69ff 100644 --- a/wms/rib02-submit.php +++ b/wms/rib02-submit.php @@ -15,6 +15,13 @@ foreach ($BizPartner as $biz) { $bizValue = $biz['BizPartnerName']; $BusinessPartner[$bizKey] = $bizValue; } +// 取得所有報銷過的發票號碼 +$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']); +} $RowCode = $_POST['RowCode']; $FeeDate = $_POST['FeeDate']; @@ -35,7 +42,7 @@ $IsCounteract = $_POST['IsCounteract']; $InvoiceId = $_POST['InvoiceId']; $VoucherCount = empty($_POST['VoucherCount']) ? 1 : $_POST['VoucherCount']; $VoucherType = isset($_POST['VoucherType']) ? $_POST['VoucherType'] : 0; -$InvoiceNo = empty($_POST['InvoiceNo']) ? " ": $_POST['InvoiceNo']; +$InvoiceNo = empty($_POST['InvoiceNo']) ? " ": (in_array(str_replace("-", "",$_POST['InvoiceNo']), $invoiceNo_array) ? " ": str_replace("-", "",$_POST['InvoiceNo'])); $CurrLAmount = empty($_POST['CurrLAmount']) ? null : $_POST['CurrLAmount']; // $comSupplierName = empty($_POST['comSupplierName']) ? null : $_POST['comSupplierName']; From 56218c35d20b91336319971a796f1b0db80c7502 Mon Sep 17 00:00:00 2001 From: 10994015 Date: Wed, 3 Jan 2024 11:11:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=83=B9=E5=AF=A9=E6=96=B0=E6=A2=AF?= =?UTF-8?q?=E3=80=81api=E4=BF=AE=E6=AD=A30103?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wms/contract/api/postContractNewApplyData.php | 4 +- wms/contract/contract-new-apply.php | 61 +++++++++---------- wms/contract/insertData.php | 7 ++- wms/contract/js/alpine.js | 14 +++-- wms/mkt/pricereview-check.php | 22 ++++++- wms/mkt/pricereview-create.php | 40 ++++++++++-- wms/mkt/pricereview-edit.php | 7 +-- wms/mkt/pricereview_mi-api.php | 2 +- 8 files changed, 105 insertions(+), 52 deletions(-) diff --git a/wms/contract/api/postContractNewApplyData.php b/wms/contract/api/postContractNewApplyData.php index 3d47b856..e3ec18e5 100644 --- a/wms/contract/api/postContractNewApplyData.php +++ b/wms/contract/api/postContractNewApplyData.php @@ -31,6 +31,7 @@ if (isset($_POST['vol_no']) && !empty($_POST['vol_no']) && ($_POST['status'] == $contact_address = $_POST['address']; $workdeadline_a = $_POST['workdeadline_a']; $workdeadline_b = $_POST['workdeadline_b']; + $workdeadline_note = $_POST['workdeadline_note']; $test_time = $_POST['regulations']; $freedeadline = $_POST['freedeadline']; $trade_address = $_POST['tradeaddress']; @@ -162,7 +163,7 @@ if (isset($_POST['vol_no']) && !empty($_POST['vol_no']) && ($_POST['status'] == header("HTTP/1.1 201 success!"); $conn->commit(); } else { - $sql_str = "UPDATE contract_new_apply SET status = :status, apply_date=:apply_date, apply_type=:apply_type, case_name=:case_name, customer=:customer, manager=:manager, vat=:vat, total_price=:total_price, total_items=:total_items, buy_fee=:buy_fee, install_fee=:install_fee, contact_address=:contact_address, trade_address=:trade_address, workdeadline_a=:workdeadline_a, workdeadline_b=:workdeadline_b, test_time=:test_time, freedeadline=:freedeadline, trade_address=:trade_address, trade_address=:trade_address, tradedeadline=:tradedeadline, secondPayDeadline=:secondPayDeadline, progress=:progress, person=:person, personname=:personname, submit_date=:submit_date, updated_at=:updated_at, updated_by=:updated_by, description=:description WHERE mid = :mid"; + $sql_str = "UPDATE contract_new_apply SET status = :status, apply_date=:apply_date, apply_type=:apply_type, case_name=:case_name, customer=:customer, manager=:manager, vat=:vat, total_price=:total_price, total_items=:total_items, buy_fee=:buy_fee, install_fee=:install_fee, contact_address=:contact_address, trade_address=:trade_address, workdeadline_a=:workdeadline_a, workdeadline_b=:workdeadline_b, workdeadline_note=:workdeadline_note, test_time=:test_time, freedeadline=:freedeadline, trade_address=:trade_address, trade_address=:trade_address, tradedeadline=:tradedeadline, secondPayDeadline=:secondPayDeadline, progress=:progress, person=:person, personname=:personname, submit_date=:submit_date, updated_at=:updated_at, updated_by=:updated_by, description=:description WHERE mid = :mid"; $stmt = $conn->prepare($sql_str); $stmt->bindParam(':mid', $mid); $stmt->bindParam(':status', $status); @@ -179,6 +180,7 @@ if (isset($_POST['vol_no']) && !empty($_POST['vol_no']) && ($_POST['status'] == $stmt->bindParam(':contact_address', $contact_address); $stmt->bindParam(':workdeadline_a', $workdeadline_a); $stmt->bindParam(':workdeadline_b', $workdeadline_b); + $stmt->bindParam(':workdeadline_note', $workdeadline_note); $stmt->bindParam(':test_time', $test_time); $stmt->bindParam(':freedeadline', $freedeadline); $stmt->bindParam(':trade_address', $trade_address); diff --git a/wms/contract/contract-new-apply.php b/wms/contract/contract-new-apply.php index 1bdeef66..a9b53fbf 100644 --- a/wms/contract/contract-new-apply.php +++ b/wms/contract/contract-new-apply.php @@ -140,7 +140,7 @@ $person = $contract['person']; - 統一編號 + 統一編號/身分證字號

未填寫

@@ -198,27 +198,20 @@ $person = $contract['person'];

未填寫

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

未填寫

+

未填寫

+ - 附則 + + 完工期限 + +
+
+ 乙方應於貨抵工地後每台
-

未填寫

+ +
+ 日內安裝完成 +
+
+
+ +

未填寫

@@ -255,7 +253,7 @@ $person = $contract['person'];
圖色確認第
- +
天出貨
@@ -288,15 +286,14 @@ $person = $contract['person'];

-

未填寫

+

未填寫

-

未填寫

-

未填寫

+

未填寫

@@ -633,11 +630,12 @@ $person = $contract['person']; const pays = [...]; const secondPayDeadline = ''; const tradeaddress = ''; - const tradedeadline = 90 + const tradedeadline = 180 const freedeadline = 18; const regulations = 10; const workdeadline_a = 60; const workdeadline_b = 7; + const workdeadline_note = ''; const total_items = ; const isFirst = ; const originfiles = []; @@ -670,6 +668,7 @@ $person = $contract['person']; const regulations = ''; const workdeadline_a = ''; const workdeadline_b = ''; + const workdeadline_note = ''; const secondPayDeadline = ; const total_items = ; const contract_new_apply_id = ; diff --git a/wms/contract/insertData.php b/wms/contract/insertData.php index 6e1ac68c..aa7e4bf6 100644 --- a/wms/contract/insertData.php +++ b/wms/contract/insertData.php @@ -46,10 +46,13 @@ foreach ($sheet->getRowIterator() as $key => $row) { $memo = $cell->getValue(); echo $memo; } elseif ($idx == 'E') { + $optional = ''; if ($cell->getValue() == "標配") { $optional = 1; - } else { + } else if($cell->getValue() == "選配") { $optional = 2; + }else if($cell->getValue() == "加價") { + $optional = 3; } echo $optional; } elseif ($idx == 'F') { @@ -137,7 +140,7 @@ foreach ($sheet->getRowIterator() as $key => $row) { $option_price_id = $last_id; $option_price = $cost; - $quotation_no = 'Q2311001'; + $quotation_no = 'Q2401001'; foreach ($open_kind_arr as $kind) { $min_weight = 1; $max_weight = 1600; diff --git a/wms/contract/js/alpine.js b/wms/contract/js/alpine.js index 8b4ff44d..5204d504 100644 --- a/wms/contract/js/alpine.js +++ b/wms/contract/js/alpine.js @@ -1202,6 +1202,7 @@ const contractNewApply = () => { address: address, workdeadline_a: workdeadline_a, //完工期限: 幾天內安裝完成,預設30 workdeadline_b: workdeadline_b, //完工期限: 幾天內整理完善,預設7 + workdeadline_note: workdeadline_note, regulations: regulations, //附則 freedeadline: freedeadline, //免保期限(月) tradeaddress: tradeaddress, //交貨地點 @@ -1270,10 +1271,7 @@ const contractNewApply = () => { alert('試車時間不能低於10天') return; } - if (this.data.workdeadline_a < 30) { - alert('安裝時間不能低於30天') - return; - } + this.isLoading = true const form = new FormData(); form.append('mid', this.data.mid); @@ -1293,6 +1291,7 @@ const contractNewApply = () => { form.append('address', this.data.address); form.append('workdeadline_a', this.data.workdeadline_a); form.append('workdeadline_b', this.data.workdeadline_b); + form.append('workdeadline_note', this.data.workdeadline_note); form.append('regulations', this.data.regulations); form.append('freedeadline', this.data.freedeadline); form.append('tradeaddress', this.data.tradeaddress); @@ -1333,8 +1332,10 @@ const contractNewApply = () => { return; } if (this.data.workdeadline_a < 30) { - alert('安裝時間不能低於30天') - return; + while(this.data.workdeadline_note=='') { + this.data.workdeadline_note = prompt('安裝時間需低於30天,請說明原因') + } + } this.isLoading = true const form = new FormData(); @@ -1355,6 +1356,7 @@ const contractNewApply = () => { form.append('address', this.data.address); form.append('workdeadline_a', this.data.workdeadline_a); form.append('workdeadline_b', this.data.workdeadline_b); + form.append('workdeadline_note', this.data.workdeadline_note); form.append('regulations', this.data.regulations); form.append('freedeadline', this.data.freedeadline); form.append('tradeaddress', this.data.tradeaddress); diff --git a/wms/mkt/pricereview-check.php b/wms/mkt/pricereview-check.php index a8ff9a1d..37d899bb 100644 --- a/wms/mkt/pricereview-check.php +++ b/wms/mkt/pricereview-check.php @@ -263,6 +263,7 @@ foreach ($res as $data) { //alert(data.err); return false; } + console.log(data.content); Object.keys(data.content).forEach(function(k) { //console.log(data.content[k][0]); // 有值表示先前已寫入MI @@ -283,11 +284,16 @@ foreach ($res as $data) { mihtml += "以上合計:" + commafy(data.content[k][12]) + "/台"; mihtml += "
"; mihtml += "
OPTION
"; + console.log(data.content[k]); Object.keys(data.content[k][14]).forEach(function(m) { - mihtml += "
  • " + data.content[k][14][m][0] + ":" + commafy(data.content[k][14][m][1]) + "
  • "; + if(data.content[k][14][m][0] != '') { + mihtml += "
  • " + data.content[k][14][m][0] + ":" + commafy(data.content[k][14][m][1]) + "
  • "; + } }); Object.keys(data.content[k][16]).forEach(function(m) { - mihtml += "
  • " + data.content[k][16][m][0] + ":" + commafy(data.content[k][16][m][1]) + "
  • "; + if(data.content[k][16][m][0] != ''){ + mihtml += "
  • " + data.content[k][16][m][0] + ":" + commafy(data.content[k][16][m][1]) + "
  • "; + } }); Object.keys(data.content[k][18]).forEach(function(m) { mihtml += "
  • " + data.content[k][18][m][0] + ":" + commafy(data.content[k][18][m][1]) + "
  • "; @@ -548,7 +554,12 @@ foreach ($res as $data) { $val) { + if($val['item_qty'] <= 0){ + continue; + } + $total_qty = $total_qty + $val['item_qty']; $item_amt_B_all += $val["item_price_bp"]; ?> @@ -564,10 +575,12 @@ foreach ($res as $data) { $idx++; } ?> + 0): ?> 小計 +
    @@ -923,8 +936,11 @@ foreach ($res as $data) { +
      +
    • 營業權限85%以上;85-80%呈至區處長審核;80%以下呈至總經理審核。
    • +
    - +
    diff --git a/wms/mkt/pricereview-create.php b/wms/mkt/pricereview-create.php index 6680345a..383aa7db 100644 --- a/wms/mkt/pricereview-create.php +++ b/wms/mkt/pricereview-create.php @@ -1,6 +1,6 @@ '; +$option_str .= '
    '; $option_str .= ' @@ -1018,6 +1019,12 @@ $(function(){ +prepare($sql_str); +$stmt->execute(); +$options = $stmt->fetchAll(PDO::FETCH_ASSOC); +?>
    名稱
    + + + + + + + + + + + + + + + + + + + + + + +
    名稱規格備註配置單位定價
    123456
    @@ -2162,8 +2192,10 @@ if (count($last_pritem_arr) > 0 && isset($last_pritem_arr["B"])) { + +
    diff --git a/wms/mkt/pricereview-edit.php b/wms/mkt/pricereview-edit.php index dd8cba7d..d4361dbe 100644 --- a/wms/mkt/pricereview-edit.php +++ b/wms/mkt/pricereview-edit.php @@ -1732,11 +1732,10 @@ $(function(){ + - -
    $row_om["base_floor"]) ? ($v["floors"] - $row_om["base_floor"])*$row_om["base_floor_plus"] : 0; // 特例 if ($opt_elev_arr[$val]["price_id"] == "256" && ($v["floors"] < $row_om["base_floor"])) $row_om["price"] = 9815; @@ -287,7 +288,6 @@ try { $j++; } } - // 保固延長 $mnarr = []; $mn_fee = $j = 0;