|
|
@ -739,6 +739,8 @@ class MasterFunctionsHelper |
|
|
|
'plan' => $dataTempPlan, |
|
|
|
'plan' => $dataTempPlan, |
|
|
|
'actual' => $dataTempReport, |
|
|
|
'actual' => $dataTempReport, |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
$today = new DateTime(); |
|
|
|
|
|
|
|
$date = new DateTime($dt->format("Y-m-d")); |
|
|
|
if (isset($dataPayload['period']) && $dataPayload['period'] == 'week') { |
|
|
|
if (isset($dataPayload['period']) && $dataPayload['period'] == 'week') { |
|
|
|
$tempTtlPercentPlan += $sumPercentagePlan; |
|
|
|
$tempTtlPercentPlan += $sumPercentagePlan; |
|
|
|
$tempTtlPercentActual += $sumPercentageActual; |
|
|
|
$tempTtlPercentActual += $sumPercentageActual; |
|
|
@ -749,14 +751,18 @@ class MasterFunctionsHelper |
|
|
|
$tempPercentage[] = array(round($tempTtlPercentPlan, 2), round($tempTtlPercentActual, 2)); |
|
|
|
$tempPercentage[] = array(round($tempTtlPercentPlan, 2), round($tempTtlPercentActual, 2)); |
|
|
|
$tempPercentagePlan[] = round($tempTtlPercentPlan, 2); |
|
|
|
$tempPercentagePlan[] = round($tempTtlPercentPlan, 2); |
|
|
|
$tempPercentagePlanWhr[] = ["weekly period", $tempPercentagePlan]; |
|
|
|
$tempPercentagePlanWhr[] = ["weekly period", $tempPercentagePlan]; |
|
|
|
|
|
|
|
if ($date < $today) { |
|
|
|
$tempPercentageReal[] = round($tempTtlPercentActual, 2); |
|
|
|
$tempPercentageReal[] = round($tempTtlPercentActual, 2); |
|
|
|
|
|
|
|
} |
|
|
|
if ($tempTtlPercentPlan >= 100 && $tempTtlPercentActual >= 100) { |
|
|
|
if ($tempTtlPercentPlan >= 100 && $tempTtlPercentActual >= 100) { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$tempPercentage[] = array(round($sumPercentagePlan, 2), round($sumPercentageActual, 2)); |
|
|
|
$tempPercentage[] = array(round($sumPercentagePlan, 2), round($sumPercentageActual, 2)); |
|
|
|
$tempPercentagePlan[] = round($sumPercentagePlan, 2); |
|
|
|
$tempPercentagePlan[] = round($sumPercentagePlan, 2); |
|
|
|
|
|
|
|
if ($date < $today) { |
|
|
|
$tempPercentageReal[] = round($sumPercentageActual, 2); |
|
|
|
$tempPercentageReal[] = round($sumPercentageActual, 2); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -783,8 +789,6 @@ class MasterFunctionsHelper |
|
|
|
} |
|
|
|
} |
|
|
|
$lastReal = $tempPercentageReal[count($tempPercentageReal) - 1]; |
|
|
|
$lastReal = $tempPercentageReal[count($tempPercentageReal) - 1]; |
|
|
|
$totalBCWP = $lastReal * $dataProject->rencana_biaya / 100; |
|
|
|
$totalBCWP = $lastReal * $dataProject->rencana_biaya / 100; |
|
|
|
array_pop($tempPercentageReal); |
|
|
|
|
|
|
|
array_pop($tempPercentageReal); |
|
|
|
|
|
|
|
$dataResponse = array( |
|
|
|
$dataResponse = array( |
|
|
|
"date" => $tempDate, |
|
|
|
"date" => $tempDate, |
|
|
|
"percentage" => $tempPercentage, |
|
|
|
"percentage" => $tempPercentage, |
|
|
|