mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 00:04:24 +00:00
This commit is contained in:
@@ -554,6 +554,11 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
++$index;
|
++$index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// reset the rest to zero.
|
||||||
|
$all = [AccountType::DEFAULT, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::CREDITCARD, AccountType::MORTGAGE];
|
||||||
|
$this->user->accounts()->leftJoin('account_types','account_types.id','=','accounts.account_type_id')
|
||||||
|
->whereNotIn('account_types.type', $all)
|
||||||
|
->update(['order' => 0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function searchAccount(string $query, array $types, int $limit): Collection
|
public function searchAccount(string $query, array $types, int $limit): Collection
|
||||||
|
@@ -241,6 +241,11 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
++$index;
|
++$index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// reset the rest to zero.
|
||||||
|
$all = [AccountType::DEFAULT, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::CREDITCARD, AccountType::MORTGAGE];
|
||||||
|
$this->user->accounts()->leftJoin('account_types','account_types.id','=','accounts.account_type_id')
|
||||||
|
->whereNotIn('account_types.type', $all)
|
||||||
|
->update(['order' => 0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAccountsByType(array $types, ?array $sort = [], ?array $filters = []): Collection
|
public function getAccountsByType(array $types, ?array $sort = [], ?array $filters = []): Collection
|
||||||
|
Reference in New Issue
Block a user