| if($year!='null' && $month!='null' && $app=='null'){ | if($year!='null' && $month!='null' && $app=='null'){ | ||||
| $count_cyberjaya = array(); $count_jasin = array(); $count_ayerKeroh = array(); $count_alorGajah = array(); $count_menglembu = array(); $count_ipoh = array(); | $count_cyberjaya = array(); $count_jasin = array(); $count_ayerKeroh = array(); $count_alorGajah = array(); $count_menglembu = array(); $count_ipoh = array(); | ||||
| $extra = 0; $basic_total = 0; $countAugust = array(); | |||||
| $extra = 0; $basic_total = 0; $countAugust = array(); $finalprice = 0; | |||||
| // if(($year == '2019' || $year == '2020') && ($month == '12' || $month == '01')){ | // if(($year == '2019' || $year == '2020') && ($month == '12' || $month == '01')){ | ||||
| // $dataDis = $this->returnDataR($company,'2019','12'); | // $dataDis = $this->returnDataR($company,'2019','12'); | ||||
| )); | )); | ||||
| }else { | }else { | ||||
| $total = number_format(floatval(str_replace("RM ", "" , $d['retail_price'])) * 2.5 + 50, 2); | |||||
| if ($d['package']!= 1){ | |||||
| $total = number_format(floatval((str_replace("RM ", "" , $d['retail_price']))- 10) * 2.5 + 50, 2); | |||||
| $finalprice = number_format(floatval((str_replace("RM ", "" , $d['retail_price']))- 10), 2); | |||||
| } | |||||
| else{ | |||||
| $total = number_format(floatval(str_replace("RM ", "" , $d['retail_price'])) * 2.5 + 50, 2); | |||||
| $finalprice = number_format(floatval((str_replace("RM ", "" , $d['retail_price']))), 2); | |||||
| } | |||||
| array_push($combineData, array( | array_push($combineData, array( | ||||
| 'index' => $d['index'], | 'index' => $d['index'], | ||||
| 'contract' => $d['contract'], | 'contract' => $d['contract'], | ||||
| 'name' => $d['name'], | 'name' => $d['name'], | ||||
| 'address' => $d['address'], | 'address' => $d['address'], | ||||
| 'package' => $d['package'], | 'package' => $d['package'], | ||||
| 'retail_price' => $d['retail_price'], | |||||
| 'retail_price' => 'RM '. $finalprice, | |||||
| 'incentives1' => '250% + RM50', | 'incentives1' => '250% + RM50', | ||||
| 'incentives2' => $d['incentives2'], | 'incentives2' => $d['incentives2'], | ||||
| 'total' => 'RM '.$total, | 'total' => 'RM '.$total, | ||||
| 'claim' => $d['claim'], | 'claim' => $d['claim'], | ||||
| )); | )); | ||||
| }else { | }else { | ||||
| $total = number_format(floatval(str_replace("RM ", "" , $d['retail_price'])) * 2.5, 2); | |||||
| if ($d['package']!= 1){ | |||||
| $total = number_format(floatval((str_replace("RM ", "" , $d['retail_price']))- 10) * 2.5, 2); | |||||
| $finalprice = number_format(floatval((str_replace("RM ", "" , $d['retail_price']))- 10), 2); | |||||
| } | |||||
| else{ | |||||
| $total = number_format(floatval(str_replace("RM ", "" , $d['retail_price'])) * 2.5, 2); | |||||
| $finalprice = number_format(floatval((str_replace("RM ", "" , $d['retail_price']))), 2); | |||||
| } | |||||
| array_push($combineData, array( | array_push($combineData, array( | ||||
| 'index' => $d['index'], | 'index' => $d['index'], | ||||
| 'contract' => $d['contract'], | 'contract' => $d['contract'], | ||||
| 'name' => $d['name'], | 'name' => $d['name'], | ||||
| 'address' => $d['address'], | 'address' => $d['address'], | ||||
| 'package' => $d['package'], | 'package' => $d['package'], | ||||
| 'retail_price' => $d['retail_price'], | |||||
| 'retail_price' => 'RM '.$finalprice, | |||||
| 'incentives1' => '250%', | 'incentives1' => '250%', | ||||
| 'incentives2' => $d['incentives2'], | 'incentives2' => $d['incentives2'], | ||||
| 'total' => 'RM '.$total, | 'total' => 'RM '.$total, |