From 0e9fbecbe445ebf019efd0c1f6900ab1d458ba8f Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 4 Sep 2018 19:32:50 +0200 Subject: [PATCH] Forgot the credit card type [skip ci] --- app/Factory/TransactionFactory.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Factory/TransactionFactory.php b/app/Factory/TransactionFactory.php index 9168702251..ad0f6d985e 100644 --- a/app/Factory/TransactionFactory.php +++ b/app/Factory/TransactionFactory.php @@ -204,10 +204,11 @@ class TransactionFactory throw new FireflyException(sprintf('Source and destination account cannot be both of the type "%s"', $destinationType)); } // source must be in this list AND dest must be in this list: - $list = [AccountType::DEFAULT, AccountType::ASSET, AccountType::CASH, AccountType::DEBT, AccountType::MORTGAGE, AccountType::LOAN, AccountType::MORTGAGE]; + $list = [AccountType::DEFAULT, AccountType::ASSET, AccountType::CREDITCARD, AccountType::CASH, AccountType::DEBT, AccountType::MORTGAGE, + AccountType::LOAN, AccountType::MORTGAGE]; if ( - !\in_array($sourceType, $list, true) && - !\in_array($destinationType, $list, true)) { + !\in_array($sourceType, $list, true) + && !\in_array($destinationType, $list, true)) { throw new FireflyException(sprintf('At least one of the accounts must be an asset account (%s, %s).', $sourceType, $destinationType)); } // either of these must be asset or default account.