1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Only do annual income calculations if we're going to show the BlueVinePromo.

This commit is contained in:
Joshua Dwire 2016-11-14 13:42:09 -05:00
parent 632bff872e
commit 3d84e408bb

View File

@ -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 );