Browse Source

Merge pull request 'staging -> General' (#239) from staging into general

Reviewed-on: ordo/adw-backend#239
pull/3/head
farhantock 1 year ago
parent
commit
9820be839e
  1. 2
      app/Helpers/MasterFunctionsHelper.php
  2. 6
      app/Http/Controllers/DashboardBoDController.php

2
app/Helpers/MasterFunctionsHelper.php

@ -311,7 +311,7 @@ class MasterFunctionsHelper
->groupBy('activity_id')
->first();
$weekCount = $keyPlanM->duration / 7;
$weeklyPlan = $sumVolPlan->ttl_qty_plan / $weekCount;
$weeklyPlan = $weekCount > 0 ? $sumVolPlan->ttl_qty_plan / $weekCount : 0;
$weeklyProgress = $weeklyPlan / $sumVolPlan->ttl_qty_plan * $keyPlanM->bobot_planning;
$dataTempPlan[$x]['activity_id'] = $keyPlanM->id;
$dataTempPlan[$x]['bobot_planning'] = $keyPlanM->bobot_planning;

6
app/Http/Controllers/DashboardBoDController.php

@ -136,6 +136,9 @@ class DashboardBoDController extends Controller
foreach ($projects as $index => $project) {
$project->scurve = MasterFunctionsHelper::getSCurve($project->id);
$selisihProgress = 0;
$planningProgress = 0;
$actualProgress = 0;
if ($project->scurve && $project->scurve[0]) {
$planningArray = $project->scurve[0]['data']['percentagePlan'];
$actualArray = $project->scurve[0]['data']['percentageReal'];
@ -178,6 +181,9 @@ class DashboardBoDController extends Controller
foreach ($projects as $project) {
$project->scurve = MasterFunctionsHelper::getSCurve($project->id);
$selisihProgress = 0;
$planningProgress = 0;
$actualProgress = 0;
if ($project->scurve && $project->scurve[0]) {
$planningArray = $project->scurve[0]['data']['percentagePlan'];
$actualArray = $project->scurve[0]['data']['percentageReal'];

Loading…
Cancel
Save