mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Only show Bluevine to primary account
This commit is contained in:
parent
4879881560
commit
67140d87ae
@ -61,8 +61,9 @@ class BlueVineController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$user->account->bluevine_status = 'signed_up';
|
$account = $user->primaryAccount();
|
||||||
$user->account->save();
|
$account->bluevine_status = 'signed_up';
|
||||||
|
$account->save();
|
||||||
|
|
||||||
$quote_data = json_decode( $response->getBody() );
|
$quote_data = json_decode( $response->getBody() );
|
||||||
|
|
||||||
@ -73,8 +74,9 @@ class BlueVineController extends BaseController {
|
|||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
|
|
||||||
if ( $user ) {
|
if ( $user ) {
|
||||||
$user->account->bluevine_status = 'ignored';
|
$account = $user->primaryAccount();
|
||||||
$user->account->save();
|
$account->bluevine_status = 'ignored';
|
||||||
|
$account->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'success';
|
return 'success';
|
||||||
@ -85,4 +87,4 @@ class BlueVineController extends BaseController {
|
|||||||
|
|
||||||
return Redirect::to( '/dashboard' );
|
return Redirect::to( '/dashboard' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ class DashboardController extends BaseController
|
|||||||
$expenses = $dashboardRepo->expenses($accountId, $userId, $viewAll);
|
$expenses = $dashboardRepo->expenses($accountId, $userId, $viewAll);
|
||||||
$tasks = $dashboardRepo->tasks($accountId, $userId, $viewAll);
|
$tasks = $dashboardRepo->tasks($accountId, $userId, $viewAll);
|
||||||
|
|
||||||
$showBlueVinePromo = ! $account->bluevine_status
|
$showBlueVinePromo = ! $user->primaryAccount()->bluevine_status
|
||||||
&& env('BLUEVINE_PARTNER_UNIQUE_ID')
|
&& env('BLUEVINE_PARTNER_UNIQUE_ID')
|
||||||
&& $account->created_at <= date( 'Y-m-d', strtotime( '-1 month' ));
|
&& $account->created_at <= date( 'Y-m-d', strtotime( '-1 month' ));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user