|
|
|
@ -111,23 +111,26 @@ class MasterFunctionsHelper {
|
|
|
|
|
$dates = iterator_to_array($period); |
|
|
|
|
$count = count($dates); |
|
|
|
|
|
|
|
|
|
$avgProgress = $ttlProgress/$count; |
|
|
|
|
$avgPlanning = $ttlPlanning/$count; |
|
|
|
|
$avgProgress = $ttlProgress/$ttlPlanning/$count*100; |
|
|
|
|
$avgPlanning = $ttlPlanning/$ttlPlanning/$count*100; |
|
|
|
|
$progressData = []; |
|
|
|
|
$planningData = []; |
|
|
|
|
$dates = []; |
|
|
|
|
$tempProgress = 0; |
|
|
|
|
$tempPlanning = 0; |
|
|
|
|
|
|
|
|
|
foreach($period as $p){ |
|
|
|
|
array_push($progressData, $tempProgress); |
|
|
|
|
array_push($planningData, $tempPlanning); |
|
|
|
|
array_push($dates, $p->format("Y-m-d")); |
|
|
|
|
$tempProgress += $avgProgress; |
|
|
|
|
$tempPlanning += $avgPlanning; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$dataResponse = array( |
|
|
|
|
"percentagePlan" => $progressData, |
|
|
|
|
"percentageReal" => $planningData, |
|
|
|
|
"percentagePlan" => $planningData, |
|
|
|
|
"percentageReal" => $progressData, |
|
|
|
|
"date" => $dates, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$dataFinal[] = array( |
|
|
|
|