Browse Source

handling plan overflow

pull/3/head
wahyu 1 year ago
parent
commit
0c487fc05b
  1. 6
      app/Helpers/MasterFunctionsHelper.php

6
app/Helpers/MasterFunctionsHelper.php

@ -708,6 +708,9 @@ class MasterFunctionsHelper
$tempTtlPercentPlan += $sumPercentagePlan;
$tempTtlPercentActual += $sumPercentageActual;
if ($tempTtlPercentPlan >= 100)
$tempTtlPercentPlan = 100;
$currentACWP += $totalACWP;
$currentBCWP += $totalBCWP;
@ -715,6 +718,9 @@ class MasterFunctionsHelper
$tempPercentagePlan[] = round($tempTtlPercentPlan, 2);
$tempPercentagePlanWhr[] = ["weekly period", $tempPercentagePlan];
$tempPercentageReal[] = round($tempTtlPercentActual, 2);
if ($tempTtlPercentPlan >= 100 && $tempTtlPercentActual >= 100) {
break;
}
} else {
$tempPercentage[] = array(round($sumPercentagePlan, 2), round($sumPercentageActual, 2));
$tempPercentagePlan[] = round($sumPercentagePlan, 2);

Loading…
Cancel
Save