|
|
@ -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() |
|
|
|