Fix tests.

This commit is contained in:
James Cole committed 2018-07-01 09:27:22 +02:00
1 parent 0502f2a4a5
commit db149ca6e1
50 files changed
+551 -647

No files matched your search

+4 -1
View File
@@ -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) {