| } | } | ||||
| } | } | ||||
| foreach ($count_businessCyber as $key => $d) { | |||||
| if (count($dataDecemberB) >= 50) { | |||||
| $total = number_format(floatval(str_replace("RM ", "", $d['retail_price'])) * 2.5, 2); | |||||
| for ($i=0;$i<count($count_businessCyber);$i++){ | |||||
| for($j=0;$j<51;$j++){ | |||||
| $total = number_format(floatval(str_replace("RM ", "", $count_businessCyber[$j]['retail_price'])) * 2.0, 2); | |||||
| array_push($combineData, array( | array_push($combineData, array( | ||||
| 'index' => $d['index'], | |||||
| 'contract' => $d['contract'], | |||||
| 'wo' => $d['wo'], | |||||
| 'activation' => $d['activation'], | |||||
| 'name' => $d['name'], | |||||
| 'address' => $d['address'], | |||||
| 'package' => $d['package'], | |||||
| 'retail_price' => $d['retail_price'], | |||||
| 'incentives1' => '250%', | |||||
| 'incentives2' => $d['incentives2'], | |||||
| 'index' => $count_businessCyber[$j]['index'], | |||||
| 'contract' => $count_businessCyber[$j]['contract'], | |||||
| 'wo' => $count_businessCyber[$j]['wo'], | |||||
| 'activation' => $count_businessCyber[$j]['activation'], | |||||
| 'name' => $count_businessCyber[$j]['name'], | |||||
| 'address' => $count_businessCyber[$j]['address'], | |||||
| 'package' => $count_businessCyber[$j]['package'], | |||||
| 'retail_price' => $count_businessCyber[$j]['retail_price'], | |||||
| 'incentives1' => '200%', | |||||
| 'incentives2' => $count_businessCyber[$j]['incentives2'], | |||||
| 'total' => 'RM ' . $total, | 'total' => 'RM ' . $total, | ||||
| 'claim' => $d['claim'], | |||||
| 'claim' => $count_businessCyber[$j]['claim'], | |||||
| )); | )); | ||||
| } else if (count($dataDecemberB) < 50) { | |||||
| $total = number_format(floatval(str_replace("RM ", "", $d['retail_price'])) * 2.0, 2); | |||||
| } | |||||
| for($j=51;$j>=51;$j++){ | |||||
| $total = number_format(floatval(str_replace("RM ", "", $count_businessCyber[$j]['retail_price'])) * 2.5, 2); | |||||
| array_push($combineData, array( | array_push($combineData, array( | ||||
| 'index' => $d['index'], | |||||
| 'contract' => $d['contract'], | |||||
| 'wo' => $d['wo'], | |||||
| 'activation' => $d['activation'], | |||||
| 'name' => $d['name'], | |||||
| 'address' => $d['address'], | |||||
| 'package' => $d['package'], | |||||
| 'retail_price' => $d['retail_price'], | |||||
| 'incentives1' => '200%', | |||||
| 'incentives2' => $d['incentives2'], | |||||
| 'index' => $count_businessCyber[$j]['index'], | |||||
| 'contract' => $count_businessCyber[$j]['contract'], | |||||
| 'wo' => $count_businessCyber[$j]['wo'], | |||||
| 'activation' => $count_businessCyber[$j]['activation'], | |||||
| 'name' => $count_businessCyber[$j]['name'], | |||||
| 'address' => $count_businessCyber[$j]['address'], | |||||
| 'package' => $count_businessCyber[$j]['package'], | |||||
| 'retail_price' => $count_businessCyber[$j]['retail_price'], | |||||
| 'incentives1' => '250%', | |||||
| 'incentives2' => $count_businessCyber[$j]['incentives2'], | |||||
| 'total' => 'RM ' . $total, | 'total' => 'RM ' . $total, | ||||
| 'claim' => $d['claim'], | |||||
| 'claim' => $count_businessCyber[$j]['claim'], | |||||
| )); | )); | ||||
| } | } | ||||
| } | } | ||||
| } else { | } else { | ||||
| $dataR = $this->returnDataR($company, $year, $month); | $dataR = $this->returnDataR($company, $year, $month); | ||||
| foreach ($dataR as $r) { | foreach ($dataR as $r) { |