Fixed some issues in import, should improve results for #701

This commit is contained in:
James Cole
2017-07-14 06:41:47 +02:00
parent 970c73c221
commit 3c4abb7b60
6 changed files with 111 additions and 5 deletions

View File

@@ -264,8 +264,10 @@ class ImportAccount
return new Account;
}
if ($account->accountType->type !== $this->expectedType) {
// must be of the same type
// except when mapped is an asset, then it's fair game.
// which only shows that user must map very carefully.
if ($account->accountType->type !== $this->expectedType && $account->accountType->type !== AccountType::ASSET) {
Log::error(
sprintf(
'Mapped account #%d is of type "%s" but we expect a "%s"-account. Mapping will be ignored.', $account->id, $account->accountType->type,