mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-10-13 08:52:05 -05:00
Fix tests.
This commit is contained in:
1 parent
0502f2a4a5
commit
db149ca6e1
50 files changed
+551
-647
No files matched your search
@@ -109,7 +109,10 @@ class TransactionFactory
|
||||
|
||||
Log::debug(sprintf('Source type is "%s", destination type is "%s"', $sourceAccount->accountType->type, $destinationAccount->accountType->type));
|
||||
// throw big fat error when source type === dest type
|
||||
if ($sourceAccount->accountType->type === $destinationAccount->accountType->type && $journal->transactionType->type !== TransactionType::TRANSFER) {
|
||||
if ($sourceAccount->accountType->type === $destinationAccount->accountType->type
|
||||
&& ($journal->transactionType->type !== TransactionType::TRANSFER
|
||||
&& $journal->transactionType->type !== TransactionType::RECONCILIATION)
|
||||
) {
|
||||
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