This commit is contained in:
James Cole
2023-02-04 10:46:31 +01:00
parent be0d785a56
commit b1e3cf3a20

View File

@@ -81,7 +81,7 @@ trait JournalServiceTrait
// if result is NULL but IBAN is set, any result of the search by NAME can't overrule
// this account. In such a case, the name search must be retried with a new name.
if (null !== $result && null === $numberResult && null === $ibanResult && null !== $data['iban']) {
if (null !== $result && null === $numberResult && null === $ibanResult && '' !== (string) $data['iban']) {
$data['name'] = sprintf('%s (%s)', $data['name'], $data['iban']);
Log::debug(sprintf('Search again using the new name, "%s".', $data['name']));
$result = $this->findAccountByName(null, $data, $expectedTypes[$transactionType]);