Only get active savings accounts.

This commit is contained in:
unknown 2015-12-02 08:22:25 +01:00
parent 96836e2d6c
commit de634da513

View File

@ -273,6 +273,7 @@ class AccountRepository implements AccountRepositoryInterface
$accounts = Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->orderBy('accounts.name', 'ASC') $accounts = Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->orderBy('accounts.name', 'ASC')
->leftJoin('account_meta', 'account_meta.account_id', '=', 'accounts.id') ->leftJoin('account_meta', 'account_meta.account_id', '=', 'accounts.id')
->where('account_meta.name', 'accountRole') ->where('account_meta.name', 'accountRole')
->where('accounts.active', 1)
->where('account_meta.data', '"savingAsset"') ->where('account_meta.data', '"savingAsset"')
->get(['accounts.*']); ->get(['accounts.*']);
$start = clone Session::get('start', new Carbon); $start = clone Session::get('start', new Carbon);