|
@ -91,7 +91,6 @@ try { |
|
|
if ($elev_qty_all == 0) { |
|
|
if ($elev_qty_all == 0) { |
|
|
$specarr[1] = 0; |
|
|
$specarr[1] = 0; |
|
|
$specarr[1] = round($special_fee / 1, 0); |
|
|
$specarr[1] = round($special_fee / 1, 0); |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
$specarr[1] = round($special_fee / $elev_qty_all, 0); |
|
|
$specarr[1] = round($special_fee / $elev_qty_all, 0); |
|
|
} |
|
|
} |
|
@ -208,7 +207,7 @@ try { |
|
|
// echo json_encode($elev_arr); |
|
|
// echo json_encode($elev_arr); |
|
|
require_once("./conn.php"); |
|
|
require_once("./conn.php"); |
|
|
// echo json_encode($elev_arr); |
|
|
// echo json_encode($elev_arr); |
|
|
foreach ((Array)$elev_arr as $item_no => $v) { |
|
|
foreach ((array)$elev_arr as $item_no => $v) { |
|
|
if ($item_no == "") { |
|
|
if ($item_no == "") { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
@ -230,7 +229,6 @@ try { |
|
|
$stmt->bindParam(':quotation_no', $quotation_no); |
|
|
$stmt->bindParam(':quotation_no', $quotation_no); |
|
|
$stmt->execute(); |
|
|
$stmt->execute(); |
|
|
$row_e = $stmt->fetch(PDO::FETCH_ASSOC); |
|
|
$row_e = $stmt->fetch(PDO::FETCH_ASSOC); |
|
|
|
|
|
|
|
|
// $sql2 = "select o.*, r.* from elevator_mi_option o, elevator_quotation_rule r "; |
|
|
// $sql2 = "select o.*, r.* from elevator_mi_option o, elevator_quotation_rule r "; |
|
|
// $sql2 .= "where o.quotation_no = r.quotation_no and o.elevator_type = '" . $v['etype'] . "' "; |
|
|
// $sql2 .= "where o.quotation_no = r.quotation_no and o.elevator_type = '" . $v['etype'] . "' "; |
|
|
// $sql2 .= "and ($v[item_weight] between o.min_weight and o.max_weight) "; |
|
|
// $sql2 .= "and ($v[item_weight] between o.min_weight and o.max_weight) "; |
|
@ -246,7 +244,6 @@ try { |
|
|
// 加價:先不納入 |
|
|
// 加價:先不納入 |
|
|
$row_e["option_price"] = 0; |
|
|
$row_e["option_price"] = 0; |
|
|
if (!isset($row_e["purchase_cost"])) { |
|
|
if (!isset($row_e["purchase_cost"])) { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
// 基准采购成本+±1停材料费+设计费+出口费用 |
|
|
// 基准采购成本+±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"]; |
|
|
$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"]; |
|
@ -508,7 +505,6 @@ try { |
|
|
round($itemoption['option_mi'] * $itemoption['item_qty'], 0), |
|
|
round($itemoption['option_mi'] * $itemoption['item_qty'], 0), |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
foreach ($item[14] as $option) { |
|
|
foreach ($item[14] as $option) { |
|
@ -522,7 +518,6 @@ try { |
|
|
|
|
|
|
|
|
$item[13] = $newTotal; |
|
|
$item[13] = $newTotal; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} catch (\Exception $e) { |
|
|
} catch (\Exception $e) { |
|
|
$rarr['st'] = 'err'; |
|
|
$rarr['st'] = 'err'; |
|
|
$rarr['err'] = $e->getMessage(); |
|
|
$rarr['err'] = $e->getMessage(); |
|
|