From 852d057a471b466751ad95cbfb03e782aa2e62fc Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 13 Apr 2020 07:57:46 +0200 Subject: [PATCH] Fix #3259 --- app/TransactionRules/Actions/SetSourceAccount.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/TransactionRules/Actions/SetSourceAccount.php b/app/TransactionRules/Actions/SetSourceAccount.php index 5b80cad798..be59b2b505 100644 --- a/app/TransactionRules/Actions/SetSourceAccount.php +++ b/app/TransactionRules/Actions/SetSourceAccount.php @@ -73,7 +73,7 @@ class SetSourceAccount implements ActionInterface $type = $journal->transactionType->type; // if this is a transfer or a withdrawal, the new source account must be an asset account or a default account, and it MUST exist: - if ((TransactionType::WITHDRAWAL === $type || TransactionType::TRANSFER === $type) && !$this->findAssetAccount()) { + if ((TransactionType::WITHDRAWAL === $type || TransactionType::TRANSFER === $type) && !$this->findAssetAccount(AccountType::ASSET)) { Log::error( sprintf( 'Cannot change source account of journal #%d because no asset account with name "%s" exists.',