|
|
|
@ -340,7 +340,10 @@ class ProjectController extends Controller
|
|
|
|
|
|
|
|
|
|
public static function setSyncDate($activity_id, $activity, $report) { |
|
|
|
|
$status = AssignMaterial::select('status_activity')->where('activity_id', $activity_id)->first(); |
|
|
|
|
if (isset($status->status_activity) && $status->status_activity != 'done') { |
|
|
|
|
if (!isset($status->status_activity)) { |
|
|
|
|
$status->status_activity = 'open'; |
|
|
|
|
} |
|
|
|
|
if ($status->status_activity != 'done') { |
|
|
|
|
$minDate = date_create($report->report_date); |
|
|
|
|
$maxDate = date_create($report->report_date); |
|
|
|
|
date_add($maxDate, date_interval_create_from_date_string($activity->duration . " days")); |
|
|
|
|