From c26baddc82b3657b05fa5e7ccc78e3e9f896ab34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Thu, 12 Nov 2020 13:16:32 +0300 Subject: [PATCH] close #1659 --- app/Jobs/Banking/UpdateAccount.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/Jobs/Banking/UpdateAccount.php b/app/Jobs/Banking/UpdateAccount.php index 8854ba1ea..866360db9 100644 --- a/app/Jobs/Banking/UpdateAccount.php +++ b/app/Jobs/Banking/UpdateAccount.php @@ -62,7 +62,7 @@ class UpdateAccount extends Job throw new \Exception($message); } - if (!$this->request->get('enabled') && ($this->account->id == setting('default.account'))) { + if (!$this->request->get('enabled')) { $relationships[] = strtolower(trans_choice('general.companies', 1)); $message = trans('messages.warning.disabled', ['name' => $this->account->name, 'text' => implode(', ', $relationships)]); @@ -77,6 +77,12 @@ class UpdateAccount extends Job 'transactions' => 'transactions', ]; - return $this->countRelationships($this->account, $rels); + $relationships = $this->countRelationships($this->account, $rels); + + if ($this->account->id == setting('default.account')) { + $relationships[] = strtolower(trans_choice('general.companies', 1)); + } + + return $relationships; } }