From 179483abd7d7f2712cf9ae9adc54cb1d439ac8d1 Mon Sep 17 00:00:00 2001 From: Muhammad Sulaiman Yusuf Date: Tue, 18 Oct 2022 16:30:25 +0700 Subject: [PATCH] bugfix --- app/Http/Controllers/DashboardBoDController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; }