This commit is contained in:
James Cole
2025-11-12 05:37:33 +01:00
parent 8ff2f817c6
commit 55c045c791
3 changed files with 28 additions and 1 deletions

View File

@@ -47,6 +47,14 @@ trait AccountFilter
AccountTypeEnum::DEBT->value,
AccountTypeEnum::MORTGAGE->value,
],
'normal' => [
AccountTypeEnum::ASSET->value,
AccountTypeEnum::EXPENSE->value,
AccountTypeEnum::REVENUE->value,
AccountTypeEnum::LOAN->value,
AccountTypeEnum::DEBT->value,
AccountTypeEnum::MORTGAGE->value,
],
'asset' => [AccountTypeEnum::DEFAULT->value, AccountTypeEnum::ASSET->value],
'cash' => [AccountTypeEnum::CASH->value],
'expense' => [AccountTypeEnum::EXPENSE->value, AccountTypeEnum::BENEFICIARY->value],
@@ -89,6 +97,16 @@ trait AccountFilter
*/
protected function mapAccountTypes(string $type): array
{
return $this->types[$type] ?? $this->types['all'];
$return = [];
$parts = explode(',', $type);
foreach ($parts as $part) {
if (array_key_exists($part, $this->types)) {
$return = array_merge($return, $this->types[$part]);
}
}
if(0 === count($return)) {
$return = $this->types['normal'];
}
return $return;
}
}

View File

@@ -74,6 +74,9 @@ trait TransactionFilter
$return = array_merge($return, $this->transactionTypes[$part]);
}
}
if(0 === count($return)) {
$return = $this->transactionTypes['all'];
}
return array_unique($return);
}

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## 6.4.7
### Fixed
- #11172
## 6.4.6 - 2025-11-09
### Fixed