Browse Source

bugfix sum up

pull/3/head
Muhammad Sulaiman Yusuf 2 years ago
parent
commit
dcb365cee1
  1. 5
      app/Models/Activity.php

5
app/Models/Activity.php

@ -120,7 +120,6 @@ class Activity extends Model
private function updatePersentaseProgress()
{
print_r(2);
if($parent = Activity::find($this->parent_id)){
$parentActWeight = $parent->bobot_planning;
@ -131,11 +130,9 @@ class Activity extends Model
$currentActProportionalProgress = ($currentActWeight / $parentActWeight) * $child->persentase_progress;
$totalChildProportionalProgress += $currentActProportionalProgress;
}
print_r($totalChildProportionalProgress);
$x = $parent->update([
$parent->update([
"persentase_progress" => $totalChildProportionalProgress
]);
print_r($x);
}
}

Loading…
Cancel
Save