mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Replace enum
This commit is contained in:
@@ -225,8 +225,8 @@ class AccountBalanceGrouped
|
||||
|| (
|
||||
(
|
||||
TransactionTypeEnum::TRANSFER->value === $journal['transaction_type_type']
|
||||
|| TransactionType::RECONCILIATION === $journal['transaction_type_type']
|
||||
|| TransactionType::OPENING_BALANCE === $journal['transaction_type_type']
|
||||
|| TransactionTypeEnum::RECONCILIATION->value === $journal['transaction_type_type']
|
||||
|| TransactionTypeEnum::OPENING_BALANCE->value === $journal['transaction_type_type']
|
||||
)
|
||||
&& in_array($journal['destination_account_id'], $this->accountIds, true)
|
||||
)
|
||||
|
@@ -42,8 +42,8 @@ trait TransactionFilter
|
||||
TransactionTypeEnum::WITHDRAWAL->value,
|
||||
TransactionTypeEnum::DEPOSIT->value,
|
||||
TransactionTypeEnum::TRANSFER->value,
|
||||
TransactionType::OPENING_BALANCE,
|
||||
TransactionType::RECONCILIATION,
|
||||
TransactionTypeEnum::OPENING_BALANCE->value,
|
||||
TransactionTypeEnum::RECONCILIATION->value,
|
||||
],
|
||||
'withdrawal' => [TransactionTypeEnum::WITHDRAWAL->value],
|
||||
'withdrawals' => [TransactionTypeEnum::WITHDRAWAL->value],
|
||||
@@ -54,11 +54,11 @@ trait TransactionFilter
|
||||
'deposits' => [TransactionTypeEnum::DEPOSIT->value],
|
||||
'transfer' => [TransactionTypeEnum::TRANSFER->value],
|
||||
'transfers' => [TransactionTypeEnum::TRANSFER->value],
|
||||
'opening_balance' => [TransactionType::OPENING_BALANCE],
|
||||
'reconciliation' => [TransactionType::RECONCILIATION],
|
||||
'reconciliations' => [TransactionType::RECONCILIATION],
|
||||
'special' => [TransactionType::OPENING_BALANCE, TransactionType::RECONCILIATION],
|
||||
'specials' => [TransactionType::OPENING_BALANCE, TransactionType::RECONCILIATION],
|
||||
'opening_balance' => [TransactionTypeEnum::OPENING_BALANCE->value],
|
||||
'reconciliation' => [TransactionTypeEnum::RECONCILIATION->value],
|
||||
'reconciliations' => [TransactionTypeEnum::RECONCILIATION->value],
|
||||
'special' => [TransactionTypeEnum::OPENING_BALANCE->value, TransactionTypeEnum::RECONCILIATION->value],
|
||||
'specials' => [TransactionTypeEnum::OPENING_BALANCE->value, TransactionTypeEnum::RECONCILIATION->value],
|
||||
'default' => [TransactionTypeEnum::WITHDRAWAL->value, TransactionTypeEnum::DEPOSIT->value, TransactionTypeEnum::TRANSFER->value],
|
||||
];
|
||||
$return = [];
|
||||
|
@@ -75,7 +75,7 @@ trait UserNavigation
|
||||
return false;
|
||||
}
|
||||
$type = $journal->transactionType->type;
|
||||
$editable = [TransactionTypeEnum::WITHDRAWAL->value, TransactionTypeEnum::TRANSFER->value, TransactionTypeEnum::DEPOSIT->value, TransactionType::RECONCILIATION];
|
||||
$editable = [TransactionTypeEnum::WITHDRAWAL->value, TransactionTypeEnum::TRANSFER->value, TransactionTypeEnum::DEPOSIT->value, TransactionTypeEnum::RECONCILIATION->value];
|
||||
|
||||
return in_array($type, $editable, true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user