stock module latest today vadivel J 10-02-2025
This commit is contained in:
parent
a2a919cd76
commit
2eb5ddcc3f
@ -550,15 +550,17 @@ foreach ($period as $day) {
|
|||||||
$summary["machineId_$machineId"]['consumption'] += is_numeric($dieselStock['consumption']) ? $dieselStock['consumption'] : 0 ;
|
$summary["machineId_$machineId"]['consumption'] += is_numeric($dieselStock['consumption']) ? $dieselStock['consumption'] : 0 ;
|
||||||
$summary["machineId_$machineId"]['running_hours'] += is_numeric($dieselStock['running_hours']) ? $dieselStock['running_hours'] : 0 ;
|
$summary["machineId_$machineId"]['running_hours'] += is_numeric($dieselStock['running_hours']) ? $dieselStock['running_hours'] : 0 ;
|
||||||
|
|
||||||
if($summary["machineId_$machineId"]['running_hours'] > 0){
|
if($summary["machineId_$machineId"]['running_hours'] > 0){
|
||||||
$dieselMileage = round(
|
$dieselMileage = round(
|
||||||
$summary["machineId_$machineId"]['consumption'] / $summary["machineId_$machineId"]['running_hours'],
|
$summary["machineId_$machineId"]['consumption'] / $summary["machineId_$machineId"]['running_hours'],
|
||||||
2
|
2
|
||||||
);
|
);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$dieselMileage = 0 ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}else{
|
|
||||||
$dieselMileage = 0 ;
|
|
||||||
}
|
|
||||||
$summary["machineId_$machineId"]['mileage'] = is_numeric( $dieselMileage) ? $dieselMileage : 0 ;
|
$summary["machineId_$machineId"]['mileage'] = is_numeric( $dieselMileage) ? $dieselMileage : 0 ;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user