mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-10 13:21:21 +00:00
Fix #11172
This commit is contained in:
@@ -47,6 +47,14 @@ trait AccountFilter
|
|||||||
AccountTypeEnum::DEBT->value,
|
AccountTypeEnum::DEBT->value,
|
||||||
AccountTypeEnum::MORTGAGE->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],
|
'asset' => [AccountTypeEnum::DEFAULT->value, AccountTypeEnum::ASSET->value],
|
||||||
'cash' => [AccountTypeEnum::CASH->value],
|
'cash' => [AccountTypeEnum::CASH->value],
|
||||||
'expense' => [AccountTypeEnum::EXPENSE->value, AccountTypeEnum::BENEFICIARY->value],
|
'expense' => [AccountTypeEnum::EXPENSE->value, AccountTypeEnum::BENEFICIARY->value],
|
||||||
@@ -89,6 +97,16 @@ trait AccountFilter
|
|||||||
*/
|
*/
|
||||||
protected function mapAccountTypes(string $type): array
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,6 +74,9 @@ trait TransactionFilter
|
|||||||
$return = array_merge($return, $this->transactionTypes[$part]);
|
$return = array_merge($return, $this->transactionTypes[$part]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(0 === count($return)) {
|
||||||
|
$return = $this->transactionTypes['all'];
|
||||||
|
}
|
||||||
|
|
||||||
return array_unique($return);
|
return array_unique($return);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
## 6.4.7
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- #11172
|
||||||
|
|
||||||
## 6.4.6 - 2025-11-09
|
## 6.4.6 - 2025-11-09
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
Reference in New Issue
Block a user