Replace enum

This commit is contained in:
James Cole
2025-01-03 09:05:56 +01:00
parent 44eafeeae5
commit d009ce31ca
36 changed files with 85 additions and 77 deletions

View File

@@ -279,7 +279,7 @@ class TransactionJournalFactory
$amount = (string) $row['amount'];
$foreignAmount = (string) $row['foreign_amount'];
if (null !== $foreignCurrency && $foreignCurrency->id !== $currency->id
&& TransactionType::TRANSFER === $type->type
&& TransactionTypeEnum::TRANSFER->value === $type->type
) {
$transactionFactory->setCurrency($foreignCurrency);
$transactionFactory->setForeignCurrency($currency);
@@ -495,7 +495,7 @@ class TransactionJournalFactory
*/
private function getForeignByAccount(string $type, ?TransactionCurrency $foreignCurrency, Account $destination): ?TransactionCurrency
{
if (TransactionType::TRANSFER === $type) {
if (TransactionTypeEnum::TRANSFER->value === $type) {
return $this->getCurrency($foreignCurrency, $destination);
}