mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 06:31:22 +00:00
Replace enum
This commit is contained in:
@@ -220,7 +220,7 @@ class AccountBalanceGrouped
|
||||
// deposit = incoming
|
||||
// transfer or reconcile or opening balance, and these accounts are the destination.
|
||||
if (
|
||||
TransactionType::DEPOSIT === $journal['transaction_type_type']
|
||||
TransactionTypeEnum::DEPOSIT->value === $journal['transaction_type_type']
|
||||
|
||||
|| (
|
||||
(
|
||||
|
||||
@@ -40,7 +40,7 @@ trait TransactionFilter
|
||||
$types = [
|
||||
'all' => [
|
||||
TransactionTypeEnum::WITHDRAWAL->value,
|
||||
TransactionType::DEPOSIT,
|
||||
TransactionTypeEnum::DEPOSIT->value,
|
||||
TransactionTypeEnum::TRANSFER->value,
|
||||
TransactionType::OPENING_BALANCE,
|
||||
TransactionType::RECONCILIATION,
|
||||
@@ -49,9 +49,9 @@ trait TransactionFilter
|
||||
'withdrawals' => [TransactionTypeEnum::WITHDRAWAL->value],
|
||||
'expense' => [TransactionTypeEnum::WITHDRAWAL->value],
|
||||
'expenses' => [TransactionTypeEnum::WITHDRAWAL->value],
|
||||
'income' => [TransactionType::DEPOSIT],
|
||||
'deposit' => [TransactionType::DEPOSIT],
|
||||
'deposits' => [TransactionType::DEPOSIT],
|
||||
'income' => [TransactionTypeEnum::DEPOSIT->value],
|
||||
'deposit' => [TransactionTypeEnum::DEPOSIT->value],
|
||||
'deposits' => [TransactionTypeEnum::DEPOSIT->value],
|
||||
'transfer' => [TransactionTypeEnum::TRANSFER->value],
|
||||
'transfers' => [TransactionTypeEnum::TRANSFER->value],
|
||||
'opening_balance' => [TransactionType::OPENING_BALANCE],
|
||||
@@ -59,7 +59,7 @@ trait TransactionFilter
|
||||
'reconciliations' => [TransactionType::RECONCILIATION],
|
||||
'special' => [TransactionType::OPENING_BALANCE, TransactionType::RECONCILIATION],
|
||||
'specials' => [TransactionType::OPENING_BALANCE, TransactionType::RECONCILIATION],
|
||||
'default' => [TransactionTypeEnum::WITHDRAWAL->value, TransactionType::DEPOSIT, TransactionTypeEnum::TRANSFER->value],
|
||||
'default' => [TransactionTypeEnum::WITHDRAWAL->value, TransactionTypeEnum::DEPOSIT->value, TransactionTypeEnum::TRANSFER->value],
|
||||
];
|
||||
$return = [];
|
||||
$parts = explode(',', $type);
|
||||
|
||||
Reference in New Issue
Block a user