From a58c43dfdc2f0d8e99e803482e5da85fa99ba0ef Mon Sep 17 00:00:00 2001 From: Muhammad Sulaiman Yusuf Date: Wed, 19 Oct 2022 10:52:23 +0700 Subject: [PATCH] disable some calc --- app/Http/Controllers/ProjectController.php | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index 39aee49..8cdb564 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -531,27 +531,27 @@ class ProjectController extends Controller } /* print_r($tempDate); exit(); */ - try { - if(round($totalACWP,0) > $totalRencanaBudget){ - $estimatedCost = round($totalACWP,0)+0; - }else{ - $estimatedCost = ($totalRencanaBudget+0); - } - } catch (\DivisionByZeroError $e) { - return response()->json([ - 'message' => $e->getMessage(), - "line" => 566, - 'gantt' => $keyGantt, - ]); - } - $estimatedCost = $totalACWP > $totalRencanaBudget ? $totalACWP : $totalRencanaBudget; - - $costDeviation = $totalRencanaBudget - $estimatedCost; - if($costDeviation > 0){ - $potential = "SAVING"; - } else { - $potential = $costDeviation == 0 ? "ON BUDGET" : "OVERRUN"; - } + /* try { */ + /* if(round($totalACWP,0) > $totalRencanaBudget){ */ + /* $estimatedCost = round($totalACWP,0)+0; */ + /* }else{ */ + /* $estimatedCost = ($totalRencanaBudget+0); */ + /* } */ + /* } catch (\DivisionByZeroError $e) { */ + /* return response()->json([ */ + /* 'message' => $e->getMessage(), */ + /* "line" => 566, */ + /* 'gantt' => $keyGantt, */ + /* ]); */ + /* } */ + /* $estimatedCost = $totalACWP > $totalRencanaBudget ? $totalACWP : $totalRencanaBudget; */ + + /* $costDeviation = $totalRencanaBudget - $estimatedCost; */ + /* if($costDeviation > 0){ */ + /* $potential = "SAVING"; */ + /* } else { */ + /* $potential = $costDeviation == 0 ? "ON BUDGET" : "OVERRUN"; */ + /* } */ $dataResponse = array( "date" =>$tempDate, @@ -564,9 +564,9 @@ class ProjectController extends Controller "bcwp" => round($totalBCWP,0), "rem_to_complete" => ($totalRencanaBudget - round($totalACWP,0)), "add_cost_to_complete" => 0, - "estimated_at_completion" => $estimatedCost, - "cost_deviation" => $costDeviation, - "potential" => $potential, + /* "estimated_at_completion" => $estimatedCost, */ + /* "cost_deviation" => $costDeviation, */ + /* "potential" => $potential, */ ) );