From dcf90b615947bc44d0ccf8349b3a3e74e3416f6a Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 17 Jun 2018 07:44:59 +0200 Subject: [PATCH] Cannot create transfer --- app/Factory/TransactionFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Factory/TransactionFactory.php b/app/Factory/TransactionFactory.php index bb5baf3cbe..cc615dcc7d 100644 --- a/app/Factory/TransactionFactory.php +++ b/app/Factory/TransactionFactory.php @@ -109,7 +109,7 @@ class TransactionFactory Log::debug(sprintf('Source type is "%s", destination type is "%s"', $sourceType, $destinationType)); // throw big fat error when source type === dest type - if ($sourceAccount->accountType->type === $destinationAccount->accountType->type) { + if ($sourceAccount->accountType->type === $destinationAccount->accountType->type && $journal->transactionType->type !== TransactionType::TRANSFER) { throw new FireflyException(sprintf('Source and destination account cannot be both of the type "%s"', $destinationAccount->accountType->type)); } if ($sourceAccount->accountType->type !== AccountType::ASSET && $destinationAccount->accountType->type !== AccountType::ASSET) {