Browse Source

Adjusting daysof into php format

pull/3/head
Wahyu Ramadhan 2 years ago
parent
commit
a8ea220e24
  1. 4
      app/Models/VersionGantt.php

4
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);

Loading…
Cancel
Save