diff --git a/wms/mkt/pricereview-check.php b/wms/mkt/pricereview-check.php
index 8c7f4d6a..4656278d 100644
--- a/wms/mkt/pricereview-check.php
+++ b/wms/mkt/pricereview-check.php
@@ -270,12 +270,6 @@ function getMI(id) {
}
$("#tb1").find("input[name=mi_fix]").eq(k).keyup();
var mihtml = "";
- //mihtml += "基准採購成本:"+commafy(data.content[k][1])+"
";
- //mihtml += "±1停材料費:"+commafy(data.content[k][2])+"
";
- //mihtml += "設計費:"+commafy(data.content[k][3])+"
";
- //mihtml += "出口費用:"+commafy(data.content[k][4])+"
";
- //mihtml += "利潤:"+commafy(data.content[k][5])+"
";
- //mihtml += "報價:"+commafy(data.content[k][6])+"
";
mihtml += "
電梯設備
";
mihtml += "設備"+data.content[k][8]+":"+commafy(data.content[k][1])+"";
mihtml += "報關+運輸費:"+commafy(data.content[k][2])+"";
@@ -284,7 +278,7 @@ function getMI(id) {
mihtml += "安裝成本:"+commafy(data.content[k][5])+"";
mihtml += "一年免保:"+commafy(data.content[k][6])+"";
mihtml += "起吊+木箱+耗材:"+commafy(data.content[k][7])+"";
- mihtml += "加價:"+commafy(data.content[k][9])+"";
+ //mihtml += "加價:"+commafy(data.content[k][9])+"";
mihtml += "以上合計:"+commafy(data.content[k][12])+"/台";
mihtml += "
";
mihtml += "OPTION
";
@@ -297,6 +291,7 @@ function getMI(id) {
Object.keys(data.content[k][18]).forEach(function(m){
mihtml += ""+data.content[k][18][m][0]+":"+commafy(data.content[k][18][m][1])+"";
});
+ mihtml += ""+data.content[k][19][0]+":"+commafy(data.content[k][19][1])+"";
mihtml += "以上合計:"+commafy(data.content[k][13])+"
";
$("#tb1").find("tr[name=facil_templ2]").eq(k).find('td').eq(1).html(mihtml);
//$("#tb1").find("input[name=mi_fix]").eq(k).closest('td').append(mihtml);
diff --git a/wms/mkt/pricereview_mi-api.php b/wms/mkt/pricereview_mi-api.php
index 931f22e4..32253e3e 100644
--- a/wms/mkt/pricereview_mi-api.php
+++ b/wms/mkt/pricereview_mi-api.php
@@ -76,6 +76,16 @@ try {
}
mysqli_free_result($res);
+ // 特殊費用平均分到每台電梯
+ $specarr = [];
+ $sql = "select special_fee from pricereview_main where id = '$id'";
+ $res = mysqli_query($link, $sql);
+ $row = mysqli_fetch_row($res);
+ $special_fee = $row[0];
+ mysqli_free_result($res);
+ $specarr[0] = "特殊費用";
+ $specarr[1] = round($special_fee/$elev_qty_all, 0);
+
// 電梯所屬OPTION
$opt_sel_id_arr = [];
$sql = "select id, price_id, item_spec, item_qty, option_relate_spec from pricereview_item where mid = '$id' and item_group = 'B'";
@@ -178,6 +188,8 @@ try {
}
$res_e = mysqli_query($link, $sql2);
if ($row_e = mysqli_fetch_assoc($res_e)) {
+ // 加價:先不納入
+ $row_e["option_price"] = 0;
// 基准采购成本+±1停材料费+设计费+出口费用
$part1 = $row_e["purchase_cost"]+($v["floors"]-$row_e["base_floor"])*$row_e["material_plus"]+$row_e["design"]*$row_e["design_hour"]+$row_e["export_fee"];
// 利潤
@@ -348,12 +360,13 @@ try {
$mi_arr[$i][10] = 0+$dismantle_fee;
$mi_arr[$i][11] = 0+$polishing_fee;
$mi_arr[$i][12] = $mi_arr[$i][1]+$mi_arr[$i][2]+$mi_arr[$i][3]+$mi_arr[$i][4]+$mi_arr[$i][5]+$mi_arr[$i][6]+$mi_arr[$i][7]+$mi_arr[$i][9]+$mi_arr[$i][10]+$mi_arr[$i][11];
- $mi_arr[$i][13] = $option_fee+$ex_fee+$mn_fee;
+ $mi_arr[$i][13] = $option_fee+$ex_fee+$mn_fee+$special_fee;
$mi_arr[$i][14] = $oparr;
$mi_arr[$i][15] = 0+$ex_fee;
$mi_arr[$i][16] = $exarr;
$mi_arr[$i][17] = 0+$mn_fee;
$mi_arr[$i][18] = $mnarr;
+ $mi_arr[$i][19] = $specarr;
$i++;
}
}
diff --git a/wms/mkt/pricereview_renovate-check.php b/wms/mkt/pricereview_renovate-check.php
index c28dac8b..79e51e12 100644
--- a/wms/mkt/pricereview_renovate-check.php
+++ b/wms/mkt/pricereview_renovate-check.php
@@ -284,7 +284,7 @@ function getMI(id) {
mihtml += "安裝成本:"+commafy(data.content[k][5])+"";
mihtml += "一年免保:"+commafy(data.content[k][6])+"";
mihtml += "起吊+木箱+耗材:"+commafy(data.content[k][7])+"";
- mihtml += "加價:"+commafy(data.content[k][9])+"";
+ //mihtml += "加價:"+commafy(data.content[k][9])+"";
mihtml += "拆除電梯:"+commafy(data.content[k][10])+"";
mihtml += "美容抛光:"+commafy(data.content[k][11])+"";
mihtml += "以上合計:"+commafy(data.content[k][12])+"/台";
@@ -299,6 +299,7 @@ function getMI(id) {
Object.keys(data.content[k][18]).forEach(function(m){
mihtml += ""+data.content[k][18][m][0]+":"+commafy(data.content[k][18][m][1])+"";
});
+ mihtml += ""+data.content[k][19][0]+":"+commafy(data.content[k][19][1])+"";
mihtml += "以上合計:"+commafy(data.content[k][13])+"
";
$("#tb1").find("tr[name=facil_templ2]").eq(k).find('td').eq(1).html(mihtml);
//$("#tb1").find("input[name=mi_fix]").eq(k).closest('td').append(mihtml);