mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 08:17:32 -05:00 
			
		
		
		
	Only show Bluevine to primary account
This commit is contained in:
		
							parent
							
								
									76ff810c42
								
							
						
					
					
						commit
						43b7c43e7c
					
				@ -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';
 | 
				
			||||||
 | 
				
			|||||||
@ -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