|
|
@ -186,7 +186,8 @@ if($main){ |
|
|
|
$price_id = $elevator['facility_id']; |
|
|
|
$item_no = $elevator['id']; |
|
|
|
$item_group = "A"; |
|
|
|
$item_spec = $elevator['specifications'] . "-" . $elevator['person'] . "*" . $elevator['stop'] . "-" . $elevator['open_converted'] . $elevator['speed']; |
|
|
|
// $item_spec = $elevator['specifications'] . "-" . $elevator['person'] . "*" . $elevator['stop'] . "-" . $elevator['open_converted'] . $elevator['speed']; |
|
|
|
$item_spec = getSpec($elevator['specifications'], $elevator['person'], $elevator['stop'], $elevator['open_converted'], $elevator['speed']); |
|
|
|
|
|
|
|
$item_weight = $elevator['weight']; |
|
|
|
$item_op = $elevator['open_converted']; |
|
|
@ -216,7 +217,8 @@ if($main){ |
|
|
|
$price_id = $elevator['facility_id']; |
|
|
|
$item_no = $elevator['id']; |
|
|
|
$item_group = "A"; |
|
|
|
$item_spec = $elevator['specifications'] . "-" . $elevator['person'] . "*" . $elevator['stop'] . "-" . $elevator['open_converted'] . $elevator['speed']; |
|
|
|
// $item_spec = $elevator['specifications'] . "-" . $elevator['person'] . "*" . $elevator['stop'] . "-" . $elevator['open_converted'] . $elevator['speed']; |
|
|
|
$item_spec = getSpec($elevator['specifications'], $elevator['person'], $elevator['stop'], $elevator['open_converted'], $elevator['speed']); |
|
|
|
$item_weight = $elevator['weight']; |
|
|
|
$item_op = $elevator['open_converted']; |
|
|
|
|
|
|
@ -563,10 +565,10 @@ if($main){ |
|
|
|
$price_id = $elevator['facility_id']; |
|
|
|
$item_no = $elevator['id']; |
|
|
|
$item_group = "A"; |
|
|
|
$item_spec = $elevator['specifications'] . "-" . $elevator['person'] . "*" . $elevator['stop'] . "-" . $elevator['open_converted'] . $elevator['speed']; |
|
|
|
// $item_spec = $elevator['specifications'] . "-" . $elevator['person'] . "*" . $elevator['stop'] . "-" . $elevator['open_converted'] . $elevator['speed']; |
|
|
|
$item_op = $elevator['open_converted']; |
|
|
|
$item_weight = $elevator['weight']; |
|
|
|
|
|
|
|
$item_spec = getSpec($elevator['specifications'], $elevator['person'], $elevator['stop'], $elevator['open_converted'], $elevator['speed']); |
|
|
|
$item_unit_price = $elevator['price']; |
|
|
|
$item_qty = (int)$elevator['spec_num']; |
|
|
|
$item_price_bp = (int)$elevator['price'] * (int)$elevator['spec_num']; |
|
|
@ -719,10 +721,12 @@ if($main){ |
|
|
|
$stmt->execute(); |
|
|
|
$account = $stmt->fetch(PDO::FETCH_ASSOC); |
|
|
|
$manager = $account['manager']; |
|
|
|
|
|
|
|
if($manager == "M0029" && $ekind == "新梯"){ |
|
|
|
$manager = "M0137"; |
|
|
|
} |
|
|
|
$sign1 = "$manager,,"; //區處長 |
|
|
|
$sign2 = NULL; // 業務承辦人 |
|
|
|
$sign3 = "M0060,,"; //業務部協理 |
|
|
|
$sign2 =$ekind == '汰改'? "M0012,," : NULL; // 業務承辦人 |
|
|
|
$sign3 = $ekind == '汰改' ? "M0008,," : "M0060,,"; //業務部協理 |
|
|
|
|
|
|
|
//是否呈核至總經理(M0006) |
|
|
|
if($price_rate < 80 || $special_fee > 0){ |
|
|
@ -732,6 +736,9 @@ if($main){ |
|
|
|
$sign4 = NULL; |
|
|
|
$sign_total = 3; |
|
|
|
} |
|
|
|
if($ekind == "N"){ |
|
|
|
$sign_total = $sign_total - 1; |
|
|
|
} |
|
|
|
$sql_str = "INSERT INTO pricereview_sign (mid, sign1, sign2, sign3, sign4, sign_total) |
|
|
|
VALUES (:mid, :sign1, :sign2, :sign3, :sign4, :sign_total)"; |
|
|
|
$stmt = $conn->prepare($sql_str); |
|
|
@ -756,6 +763,26 @@ if($main){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function calcWeight($kind, $person){ |
|
|
|
function getSpec($spec, $person, $stop, $open, $speed){ |
|
|
|
$weightArr = array( |
|
|
|
6 => 450, |
|
|
|
8 => 550, |
|
|
|
9 => 600, |
|
|
|
10 => 700, |
|
|
|
11 => 750, |
|
|
|
12 => 800, |
|
|
|
13 => 900, |
|
|
|
15 => 1000, |
|
|
|
17 => 1150, |
|
|
|
20 => 1350, |
|
|
|
24 => 1600, |
|
|
|
); |
|
|
|
if($spec == 'M1' || $spec=='M1+M4(1:1)' || $spec == 'M1+M4(2:1)'){ |
|
|
|
$model = "P" . $person . "-" . $weightArr[$person] . "-" . $open . "-" . $speed . "-" . $stop; |
|
|
|
|
|
|
|
}else{ |
|
|
|
$model = $spec . "-" . $person . "*" . $stop . "-" . $open . $speed; |
|
|
|
} |
|
|
|
|
|
|
|
return $model; |
|
|
|
} |