diff --git a/app/Support/Import/JobConfiguration/Ynab/SelectAccountsHandler.php b/app/Support/Import/JobConfiguration/Ynab/SelectAccountsHandler.php index 1f109d774b..bc48b7e615 100644 --- a/app/Support/Import/JobConfiguration/Ynab/SelectAccountsHandler.php +++ b/app/Support/Import/JobConfiguration/Ynab/SelectAccountsHandler.php @@ -86,10 +86,11 @@ class SelectAccountsHandler implements YnabJobConfigurationInterface $applyRules = 1 === (int)($data['apply_rules'] ?? 0); foreach ($mapping as $ynabId => $localId) { // validate each - $ynabId = $this->validYnabAccount($ynabId); - $accountId = $this->validLocalAccount((int)$localId); - $final[$ynabId] = $accountId; - + $ynabId = $this->validYnabAccount($ynabId); + $accountId = $this->validLocalAccount((int)$localId); + if ($accountId !== 0) { + $final[$ynabId] = $accountId; + } } Log::debug('Final mapping is:', $final); $messages = new MessageBag;