|
|
|
@ -468,9 +468,9 @@ class MasterFunctionsHelper
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ($dataHeader) { |
|
|
|
|
$totalRencanaBudget = Activity::where('parent_id', $dataHeader->id)->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['id'])->sum("rencana_biaya"); |
|
|
|
|
// $totalRencanaBudget = Activity::where('parent_id', $dataHeader->id)->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['id'])->sum("rencana_biaya"); |
|
|
|
|
} else { |
|
|
|
|
$totalRencanaBudget = Activity::whereNull('parent_id')->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['id'])->sum("rencana_biaya"); |
|
|
|
|
// $totalRencanaBudget = Activity::whereNull('parent_id')->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['id'])->sum("rencana_biaya"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!Activity::where("version_gantt_id", $keyGantt['id'])->first()) |
|
|
|
@ -506,16 +506,16 @@ class MasterFunctionsHelper
|
|
|
|
|
} |
|
|
|
|
$period = new \DatePeriod($begin, $interval, $end); |
|
|
|
|
|
|
|
|
|
$arr_ActualM = []; |
|
|
|
|
// $arr_ActualM = []; |
|
|
|
|
$tempDate = []; |
|
|
|
|
$tempPercentagePlan = []; |
|
|
|
|
$tempPercentagePlanWhr = []; |
|
|
|
|
$tempPercentageReal = []; |
|
|
|
|
$tempTtlPercentPlan = 0; |
|
|
|
|
$tempTtlPercentActual = 0; |
|
|
|
|
// $tempPercentagePlan = []; |
|
|
|
|
// $tempPercentagePlanWhr = []; |
|
|
|
|
// $tempPercentageReal = []; |
|
|
|
|
// $tempTtlPercentPlan = 0; |
|
|
|
|
// $tempTtlPercentActual = 0; |
|
|
|
|
|
|
|
|
|
$currentACWP = 0; |
|
|
|
|
$currentBCWP = 0; |
|
|
|
|
// $currentACWP = 0; |
|
|
|
|
// $currentBCWP = 0; |
|
|
|
|
$dataActivityPlanDate = []; |
|
|
|
|
$progressPlanKomulatifWeek = []; |
|
|
|
|
$progressActualKomulatifWeek = []; |
|
|
|
@ -551,11 +551,15 @@ class MasterFunctionsHelper
|
|
|
|
|
|
|
|
|
|
$dataActivityPlan = []; |
|
|
|
|
$dataActivityActual = []; |
|
|
|
|
$today = new DateTime(); |
|
|
|
|
$today = date('Y-m-d'); |
|
|
|
|
$statusCutOfDate = false; |
|
|
|
|
// if (new \DateTime($loopDay) < $today) { |
|
|
|
|
// $statusCutOfDate = true; |
|
|
|
|
// } |
|
|
|
|
if (new \DateTime($loopDay) == new \DateTime($loopDay . ' Friday')){ |
|
|
|
|
|
|
|
|
|
$progressPlanKomulatifWeek[] += round($tmpProgressPlanWeek,2); |
|
|
|
|
if (new \DateTime($loopDay) < $today) { |
|
|
|
|
if (new \DateTime($loopDay . ' Friday') <= new \DateTime($today . ' Friday')) { |
|
|
|
|
// $tempPercentageReal[] = round($tempTtlPercentActual, 2); |
|
|
|
|
$progressActualKomulatifWeek[] += round($tmpProgressActualWeek,2); |
|
|
|
|
} |
|
|
|
@ -599,7 +603,7 @@ class MasterFunctionsHelper
|
|
|
|
|
// $progressActualWeek = ((((($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) / $keyActualM->qty_plan)*100)*$keyActualM->bobot_planning)/100; |
|
|
|
|
// jika total report > dari planning |
|
|
|
|
if($keyActualM->sum_qty_actual > $keyActualM->qty_plan){ |
|
|
|
|
$progressActualWeek = (($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) *$keyActualM->bobot_planning/100; |
|
|
|
|
$progressActualWeek = ($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * $keyActualM->bobot_planning; |
|
|
|
|
}else{ |
|
|
|
|
// jika total report < dari planning |
|
|
|
|
// $progressActualWeek = ((($keyActualM->qty_actual / $keyActualM->sum_qty_actual) * 100) / $keyActualM->qty_plan)*$keyActualM->bobot_planning; |
|
|
|
@ -1431,11 +1435,11 @@ class MasterFunctionsHelper
|
|
|
|
|
|
|
|
|
|
$dataActivityPlan = []; |
|
|
|
|
$dataActivityActual = []; |
|
|
|
|
$today = new DateTime(); |
|
|
|
|
$today = date('Y-m-d'); |
|
|
|
|
if (new \DateTime($loopDay) == new \DateTime($loopDay . ' Friday')){ |
|
|
|
|
|
|
|
|
|
$progressPlanKomulatifWeek[] += round($tmpProgressPlanWeek,2); |
|
|
|
|
if (new \DateTime($loopDay) < $today) { |
|
|
|
|
if (new \DateTime($loopDay . ' Friday') <= new \DateTime($today . ' Friday')) { |
|
|
|
|
// $tempPercentageReal[] = round($tempTtlPercentActual, 2); |
|
|
|
|
$progressActualKomulatifWeek[] += round($tmpProgressActualWeek,2); |
|
|
|
|
} |
|
|
|
@ -1681,11 +1685,11 @@ class MasterFunctionsHelper
|
|
|
|
|
|
|
|
|
|
$dataActivityPlan = []; |
|
|
|
|
$dataActivityActual = []; |
|
|
|
|
$today = new DateTime(); |
|
|
|
|
$today = date('Y-m-d'); |
|
|
|
|
if (new \DateTime($loopDay) == new \DateTime($loopDay . ' Friday')){ |
|
|
|
|
|
|
|
|
|
$progressPlanKomulatifWeek[] += round($tmpProgressPlanWeek,2); |
|
|
|
|
if (new \DateTime($loopDay) < $today) { |
|
|
|
|
$progressPlanKomulatifWeek[] += round($tmpProgressPlanWeek,2); |
|
|
|
|
if (new \DateTime($loopDay . ' Friday') <= new \DateTime($today . ' Friday')) { |
|
|
|
|
// $tempPercentageReal[] = round($tempTtlPercentActual, 2); |
|
|
|
|
$progressActualKomulatifWeek[] += round($tmpProgressActualWeek,2); |
|
|
|
|
} |
|
|
|
|