diff --git a/app/Http/Controllers/DashboardApiController.php b/app/Http/Controllers/DashboardApiController.php index c6cf454666d8..0db08e555010 100644 --- a/app/Http/Controllers/DashboardApiController.php +++ b/app/Http/Controllers/DashboardApiController.php @@ -23,8 +23,8 @@ class DashboardApiController extends BaseAPIController $dashboardRepo = $this->dashboardRepo; $metrics = $dashboardRepo->totals($accountId, $userId, $viewAll); - $paidToDate = $dashboardRepo->paidToDate($account, $userId, $viewAll); - $averageInvoice = $dashboardRepo->averages($account, $userId, $viewAll); + $paidToDate = $dashboardRepo->paidToDate($user->account, $userId, $viewAll); + $averageInvoice = $dashboardRepo->averages($user->account, $userId, $viewAll); $balances = $dashboardRepo->balances($accountId, $userId, $viewAll); $activities = $dashboardRepo->activities($accountId, $userId, $viewAll); $pastDue = $dashboardRepo->pastDue($accountId, $userId, $viewAll);