|
|
@ -83,7 +83,6 @@ class DashboardBoDController extends Controller |
|
|
|
$totalInvoice += $resp->data->total_invoice_amount ?? 0; |
|
|
|
$totalInvoice += $resp->data->total_invoice_amount ?? 0; |
|
|
|
$totalPaidInvoice += $resp->data->total_invoice_paid_amount ?? 0; |
|
|
|
$totalPaidInvoice += $resp->data->total_invoice_paid_amount ?? 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return response()->json([ |
|
|
|
return response()->json([ |
|
|
@ -147,15 +146,13 @@ class DashboardBoDController extends Controller |
|
|
|
} |
|
|
|
} |
|
|
|
$selisihProgress = $planningProgress - $actualProgress; |
|
|
|
$selisihProgress = $planningProgress - $actualProgress; |
|
|
|
try { |
|
|
|
try { |
|
|
|
if ($selisihProgress > 0 && $selisihProgress <= 5){ |
|
|
|
if ($selisihProgress > 0 && $selisihProgress <= 20) { |
|
|
|
$return['warning'] += 1; |
|
|
|
$return['warning'] += 1; |
|
|
|
$projects[$index]->status = 'warning'; |
|
|
|
$projects[$index]->status = 'warning'; |
|
|
|
} |
|
|
|
} elseif ($selisihProgress == 0) { |
|
|
|
elseif ($selisihProgress == 0){ |
|
|
|
|
|
|
|
$return['on-schedule'] += 1; |
|
|
|
$return['on-schedule'] += 1; |
|
|
|
$projects[$index]->status = 'on-schedule'; |
|
|
|
$projects[$index]->status = 'on-schedule'; |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
$return['behind-schedule'] += 1; |
|
|
|
$return['behind-schedule'] += 1; |
|
|
|
$projects[$index]->status = 'behind-schedule'; |
|
|
|
$projects[$index]->status = 'behind-schedule'; |
|
|
|
} |
|
|
|
} |
|
|
@ -193,11 +190,9 @@ class DashboardBoDController extends Controller |
|
|
|
$selisihProgress = $planningProgress - $actualProgress; |
|
|
|
$selisihProgress = $planningProgress - $actualProgress; |
|
|
|
if ($selisihProgress > 0 && $selisihProgress <= 5) { |
|
|
|
if ($selisihProgress > 0 && $selisihProgress <= 5) { |
|
|
|
$warning++; |
|
|
|
$warning++; |
|
|
|
} |
|
|
|
} elseif ($selisihProgress == 0) { |
|
|
|
elseif ($selisihProgress == 0){ |
|
|
|
|
|
|
|
$onSchedule++; |
|
|
|
$onSchedule++; |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
$behindSchedule++; |
|
|
|
$behindSchedule++; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|