Browse Source

Merge pull request 'staging' (#6) from staging into master

Reviewed-on: ibnu/generic-ospro-backend#6
pull/3/head
farhantock 1 year ago
parent
commit
b08d6657ae
  1. 2
      app/Helpers/MasterFunctionsHelper.php

2
app/Helpers/MasterFunctionsHelper.php

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

Loading…
Cancel
Save