From 2995814927ac5c4a6a5e0f460bdcbe32f1632ce0 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 14 Sep 2014 09:05:16 +0300 Subject: [PATCH] Added archived data to the dashboard calculations --- app/controllers/DashboardController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/DashboardController.php b/app/controllers/DashboardController.php index 4e95368da20b..a1d7a6f220fe 100644 --- a/app/controllers/DashboardController.php +++ b/app/controllers/DashboardController.php @@ -15,7 +15,7 @@ class DashboardController extends \BaseController { ->leftJoin('clients', 'accounts.id', '=', 'clients.account_id') ->leftJoin('invoices', 'clients.id', '=', 'invoices.client_id') ->where('accounts.id', '=', Auth::user()->account_id) - ->where('clients.deleted_at', '=', null) + ->where('clients.is_deleted', '=', false) ->groupBy('accounts.id') ->first(); @@ -25,7 +25,7 @@ class DashboardController extends \BaseController { ->select($select) ->leftJoin('clients', 'accounts.id', '=', 'clients.account_id') ->where('accounts.id', '=', Auth::user()->account_id) - ->where('clients.deleted_at', '=', null) + ->where('clients.is_deleted', '=', false) ->groupBy('accounts.id') ->first(); @@ -37,6 +37,7 @@ class DashboardController extends \BaseController { ->where('balance', '>', 0) ->where('is_recurring', '=', false) ->where('is_quote', '=', false) + ->where('is_deleted', '=', false) ->orderBy('due_date', 'asc')->take(6)->get(); $upcoming = Invoice::scope() @@ -44,6 +45,7 @@ class DashboardController extends \BaseController { ->where('balance', '>', 0) ->where('is_recurring', '=', false) ->where('is_quote', '=', false) + ->where('is_deleted', '=', false) ->orderBy('due_date', 'asc')->take(6)->get(); $data = [