|
@@ -159,7 +159,7 @@ class WaterQueryController
|
|
|
$floor = $calculation['floor_number'];
|
|
|
foreach ($science as $item) {
|
|
|
$m2 = $item['long'] * $item['wide'];
|
|
|
- $floor1 = ceil($floor / $m2);
|
|
|
+ $floor1 = $floor / $m2;
|
|
|
$table[] = ['title' => '底板', 'name' => $item['name'], 'specifications' => $item['long'].'m*'.$item['wide'].'m', 'number' => $floor1, 'unit_price' => $item['unit_price'], 'company' => $item['company'], 'ot_price' => $item['unit_price'] * $floor1, 'weight' => $item['weight'] * $v, 'type' => 4];
|
|
|
}
|
|
|
}else {
|
|
@@ -168,12 +168,14 @@ class WaterQueryController
|
|
|
if ($floor > 0) {
|
|
|
$m2 = $item['long'] * $item['wide'];
|
|
|
if ($floor >= $m2) {
|
|
|
- $floor1 = intval($floor / $m2);
|
|
|
- $floor = $floor - ($m2 * $floor1);
|
|
|
- if ($floor < 0.5 and $floor > 0) {
|
|
|
- $floor1 += 1;
|
|
|
- $floor = 0;
|
|
|
- }
|
|
|
+// $floor1 = intval($floor / $m2);
|
|
|
+ $floor1 = $floor / $m2;
|
|
|
+ $floor = 0;
|
|
|
+// $floor = $floor - ($m2 * $floor1);
|
|
|
+// if ($floor < 0.5 and $floor > 0) {
|
|
|
+// $floor1 += 0.5;
|
|
|
+// $floor = 0;
|
|
|
+// }
|
|
|
$zj += $item['unit_price'] * $floor1;
|
|
|
$zzl += $item['weight'] * $v;
|
|
|
$table[] = ['title' => '底板', 'name' => $item['name'], 'specifications' => $item['long'].'m*'.$item['wide'].'m', 'number' => $floor1, 'unit_price' => $item['unit_price'], 'company' => $item['company'], 'ot_price' => $item['unit_price'] * $floor1, 'weight' => $item['weight'] * $v, 'type' => 4];
|
|
@@ -281,6 +283,11 @@ class WaterQueryController
|
|
|
$i['ot_price'] = round($i['ot_price'], 2);
|
|
|
$i['weight'] = round($i['weight'], 2);
|
|
|
}
|
|
|
+ if ($data['is_warm']){
|
|
|
+ $zj += 169;
|
|
|
+ }else{
|
|
|
+ $zj += 105;
|
|
|
+ }
|
|
|
if ($discount > 0){
|
|
|
foreach ($table as &$item)
|
|
|
{
|