From bee51f8ce50ef94cad8523c9640f08bd0a07c4a3 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Fri, 9 Jun 2023 15:00:42 +0700 Subject: [PATCH] Remove progress status checker --- app/Models/ReportActivityMaterial.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/Models/ReportActivityMaterial.php b/app/Models/ReportActivityMaterial.php index 75b0817..44db31c 100644 --- a/app/Models/ReportActivityMaterial.php +++ b/app/Models/ReportActivityMaterial.php @@ -61,15 +61,10 @@ class ReportActivityMaterial extends Model $activity->biaya_actual -= floatval($assignedMaterial->budget) * floatval($data->qty); $dataPlan = AssignMaterial::where('activity_id', $activity->id)->get(); - if($dataPlan[0]->status_activity == 'done'){ - $activity->persentase_progress = 100; - } else { $totalPlan = $dataPlan->sum('qty_planning'); $totalVolumeActual = ReportActivityMaterial::where('activity_id', '=', $activity->id)->sum("qty"); $percentage = ($totalVolumeActual * 100) / $totalPlan; $activity->persentase_progress = $percentage >= config('app.max_percentage_not_done') ? config('app.max_percentage_not_done') : $percentage; - } - $activity->save(); });