Browse Source

Fix sync report

pull/3/head
Wahyu Ramadhan 1 year ago
parent
commit
e56c4597d2
  1. 5
      app/Http/Controllers/ProjectController.php

5
app/Http/Controllers/ProjectController.php

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

Loading…
Cancel
Save