mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 10:47:00 +00:00 
			
		
		
		
	🤖 Auto commit for release 'develop' on 2025-09-07
This commit is contained in:
		| @@ -478,18 +478,18 @@ class AccountRepository implements AccountRepositoryInterface, UserGroupInterfac | ||||
| 
 | ||||
|     public function getAccountsByType(array $types, ?array $sort = []): Collection | ||||
|     { | ||||
|         $res   = array_intersect([AccountTypeEnum::ASSET->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value], $types); | ||||
|         $query = $this->user->accounts(); | ||||
|         $res     = array_intersect([AccountTypeEnum::ASSET->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::DEBT->value], $types); | ||||
|         $query   = $this->user->accounts(); | ||||
|         if (0 !== count($types)) { | ||||
|             $query->accountTypeIn($types); | ||||
|         } | ||||
| 
 | ||||
|         // add sort parameters
 | ||||
|         $allowed = config('firefly.allowed_db_sort_parameters.Account', []); | ||||
|         $sorted = 0; | ||||
|         $sorted  = 0; | ||||
|         if (0 !== count($sort)) { | ||||
|             foreach ($sort as $param) { | ||||
|                 if(in_array($param[0], $allowed, true)) { | ||||
|                 if (in_array($param[0], $allowed, true)) { | ||||
|                     $query->orderBy($param[0], $param[1]); | ||||
|                     ++$sorted; | ||||
|                 } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user