From 3d84e408bbbd4c60b84b090b2f151f2764a01a5f Mon Sep 17 00:00:00 2001 From: Joshua Dwire Date: Mon, 14 Nov 2016 13:42:09 -0500 Subject: [PATCH] Only do annual income calculations if we're going to show the BlueVinePromo. --- app/Http/Controllers/DashboardController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index 6e9ad5be248b..e468d62e0a34 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -42,6 +42,7 @@ class DashboardController extends BaseController $payments = $dashboardRepo->payments($accountId, $userId, $viewAll); $expenses = $dashboardRepo->expenses($accountId, $userId, $viewAll); $tasks = $dashboardRepo->tasks($accountId, $userId, $viewAll); + $showBlueVinePromo = !$account->bluevine_status && env('BLUEVINE_PARTNER_UNIQUE_ID'); // check if the account has quotes $hasQuotes = false; @@ -91,9 +92,10 @@ class DashboardController extends BaseController 'currencies' => $currencies, 'expenses' => $expenses, 'tasks' => $tasks, + 'showBlueVinePromo' => $showBlueVinePromo, ]; - if(true){ + if($showBlueVinePromo){ $usdLast12Months = 0; $paidLast12Months = $dashboardRepo->paidLast12Months( $account, $userId, $viewAll );