diff --git a/app/Models/VersionGantt.php b/app/Models/VersionGantt.php index 236bff2..0784bbe 100644 --- a/app/Models/VersionGantt.php +++ b/app/Models/VersionGantt.php @@ -41,6 +41,10 @@ class VersionGantt extends Model public function updateActDuration(){ $daysOff = explode(',', $this->config_dayoff); + if (in_array('0', $daysOff)) { + $key = array_search('0', $daysOff, false); + $daysOff[$key] = '7'; + } $activities = Activity::where('version_gantt_id', $this->id)->get(); foreach ($activities as $value) { $startDate = new DateTime($value->start_date);