Fixed some rare bugs.

This commit is contained in:
James Cole 2016-10-02 15:09:43 +02:00
parent 7d21255f7f
commit 0a147e5c9c
2 changed files with 8 additions and 7 deletions

View File

@ -181,13 +181,13 @@ class ImportValidator
Log::debug(sprintf('No account named %s of type %s, create new account.', $account->name, $type));
$result = $repository->store(
[
'user' => $this->user->id,
'accountType' => config('firefly.shortNamesByFullName.' . $type),
'name' => $account->name,
'user' => $this->user->id,
'accountType' => config('firefly.shortNamesByFullName.' . $type),
'name' => $account->name,
'virtualBalance' => 0,
'active' => true,
'iban' => null,
'openingBalance' => 0,
'active' => true,
'iban' => null,
'openingBalance' => 0,
]
);
}
@ -262,6 +262,7 @@ class ImportValidator
$entry->valid = false;
Log::warning('Cannot import entry. Asset account is NULL and import account is also NULL.');
return $entry;
}
Log::debug('Asset account is OK.', ['id' => $entry->fields['asset-account']->id, 'name' => $entry->fields['asset-account']->name]);

View File

@ -143,7 +143,7 @@ class TagRepository implements TagRepositoryInterface
->transactionJournals()
->sortCorrectly()
->expanded()
->groupBy(['tag_transaction_journal.tag_id'])
->groupBy(['tag_transaction_journal.tag_id','tag_transaction_journal.transaction_journal_id'])
->get(TransactionJournal::queryFields());
return $journals;