diff --git a/module/programplan/model.php b/module/programplan/model.php index 2119433318..61d186ffdf 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -205,7 +205,7 @@ class programplanModel extends model $data->textColor = $this->lang->execution->gantt->stage->textColor; $data->bar_height = $this->lang->execution->gantt->bar_height; - if($data->endDate > $data->start_date) $data->duration = helper::diffDate($data->endDate, $data->start_date) + 1; + if($data->endDate > $data->start_date) $data->duration = helper::diffDate(substr($data->endDate, 0, 10), substr($data->start_date, 0, 10)) + 1; if($data->start_date) $data->start_date = date('d-m-Y', strtotime($data->start_date)); if($data->start_date == '' or $data->endDate == '') $data->duration = 1; @@ -294,7 +294,7 @@ class programplanModel extends model $data->owner_id = join(',', $assigneds); } - if($data->endDate > $data->start_date) $data->duration = helper::diffDate($data->endDate, $data->start_date) + 1; + if($data->endDate > $data->start_date) $data->duration = helper::diffDate(substr($data->endDate, 0, 10), substr($data->start_date, 0, 10)) + 1; if($data->start_date) $data->start_date = date('d-m-Y', strtotime($data->start_date)); if($data->start_date == '' or $data->endDate == '') $data->duration = 1;