diff --git a/app/Http/Controllers/DashboardBoDController.php b/app/Http/Controllers/DashboardBoDController.php index c0ccd94..315c0ca 100644 --- a/app/Http/Controllers/DashboardBoDController.php +++ b/app/Http/Controllers/DashboardBoDController.php @@ -75,7 +75,9 @@ class DashboardBoDController extends Controller if($project->kode_sortname != ""){ $resp = $this->getInvoiceIntegration($project->kode_sortname); /* $resp = $project->kode_sortname; */ - $totalExpenditure+= $resp->data->total_invoice_amount ?? 0; + $cost = $resp->data->total_cost ?? 0; + $cost = substr($cost, 0, strpos($cost, ".")); + $totalExpenditure+= (int) $cost; $totalInvoice += $resp->data->total_invoice_amount ?? 0; $totalPaidInvoice += $resp->data->total_invoice_paid_amount ?? 0; }