|
|
|
@ -106,6 +106,35 @@ class MasterFunctionsHelper
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
public static function getSCurveCarausell($request) |
|
|
|
|
{ |
|
|
|
|
$allGantt = []; |
|
|
|
|
if (!is_int($request->gantt_id) && !is_int($request->project_id) && !is_int($request->period)) { |
|
|
|
|
if (isset($request->gantt_id)) { |
|
|
|
|
$allGantt[] = $request->gantt_id; |
|
|
|
|
} else { |
|
|
|
|
$allGantt[] = MasterFunctionsHelper::getLatestGantt($request->project_id); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
$allGantt[] = MasterFunctionsHelper::getLatestGantt($request->project_id); |
|
|
|
|
} |
|
|
|
|
foreach ($allGantt as $gantt) { |
|
|
|
|
if (!isset($gantt['last_gantt_id'])) { |
|
|
|
|
$ganttId = $gantt; |
|
|
|
|
} else { |
|
|
|
|
$ganttId = $gantt['last_gantt_id']; |
|
|
|
|
} |
|
|
|
|
$gantt = VersionGantt::find($ganttId)->toArray(); |
|
|
|
|
if (isset($gantt['calculation_type'])) { |
|
|
|
|
if ($gantt['calculation_type'] == 'simple') { |
|
|
|
|
// to do |
|
|
|
|
return MasterFunctionsHelper::calculateProgressBasedOnSimple($gantt); |
|
|
|
|
} else { |
|
|
|
|
return MasterFunctionsHelper::calculateProgressBasedOnReportMaterial($gantt); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function getLinearSCurve($request) |
|
|
|
|
{ |
|
|
|
|