Browse Source

edit calculation Sept claim

ifah
Siti Hajar Ibrahim 5 years ago
parent
commit
1c38ebf29d
1 changed files with 3 additions and 26 deletions
  1. 3
    26
      app/Http/Controllers/DS/DealerController.php

+ 3
- 26
app/Http/Controllers/DS/DealerController.php View File

$d['retail_price'] = 129; $d['retail_price'] = 129;
} }
} }

if(date('d/m/Y', strtotime($d['activation'])) >= '11/8/2020'){
$countSeptemberR[] = $d;
}
}else {
if(date('d/m/Y', strtotime($d['activation'])) >= '11/8/2020'){
$countSeptemberR[] = $d;
}else {
$combineData[] = $d;
}
} }
}
// Store to combineData New Incentive September
foreach ($countSeptemberR as $key => $d) {
if(count($dataSeptemberR) >= 50){ if(count($dataSeptemberR) >= 50){
if(date('m/Y', strtotime($d['activation'])) == $month.'/'.$year){ if(date('m/Y', strtotime($d['activation'])) == $month.'/'.$year){
if($d['contract'] == '12'){ if($d['contract'] == '12'){
$d['retail_price'] = 249; $d['retail_price'] = 249;
} }
} }

if(date('d/m/Y', strtotime($d['activation'])) >= '11/8/2020'){
$countSeptemberB[] = $d;
}
}else {
if(date('d/m/Y', strtotime($d['activation'])) >= '11/8/2020'){
$countSeptemberB[] = $d;
}else {
$combineData[] = $d;
}
$countSeptemberB[] = $d;
} }
}
// Store to combineData New Incentive September
foreach ($countSeptemberB as $key => $d) {

if(count($dataSeptemberB) >= 50){ if(count($dataSeptemberB) >= 50){
if(date('m/Y', strtotime($d['activation'])) == $month.'/'.$year){ if(date('m/Y', strtotime($d['activation'])) == $month.'/'.$year){
if($d['contract'] == '12'){ if($d['contract'] == '12'){

Loading…
Cancel
Save