Skip to content

Firefly III: a personal finances manager

Fix #3259

James Cole852d057a471b
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.',