Finish up bunq import routine.

This commit is contained in:
James Cole
2018-03-24 18:55:02 +01:00
parent 3c9b7c07af
commit 6a6482dc7f
24 changed files with 696 additions and 79 deletions

View File

@@ -162,9 +162,14 @@ class AccountFactory
if ($accountTypeId > 0) {
return AccountType::find($accountTypeId);
}
$type = config('firefly.accountTypeByIdentifier.' . strval($accountType));
$type = config('firefly.accountTypeByIdentifier.' . strval($accountType));
$result = AccountType::whereType($type)->first();
if (is_null($result) && !is_null($accountType)) {
// try as full name:
$result = AccountType::whereType($accountType)->first();
}
return AccountType::whereType($type)->first();
return $result;
}