Browse Source

temp: calc up bobot planning

pull/3/head
Muhammad Sulaiman Yusuf 2 years ago
parent
commit
4b9da555b1
  1. 8
      app/Models/Activity.php

8
app/Models/Activity.php

@ -87,8 +87,14 @@ class Activity extends Model
$activity->saveQuietly(); $activity->saveQuietly();
} }
} else {
if($parent = Activity::find($this->parent_id)){
$totalChildWeight = Activity::where("parent_id", $this->parent_id)->sum('bobot_planning');
$parent->update([
"bobot_planning" => $totalChildWeight
]);
}
} }
} }
private function updateCostActual() private function updateCostActual()

Loading…
Cancel
Save