mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
Cannot create transfer
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user