This commit is contained in:
Denis Duliçi 2020-11-12 13:16:32 +03:00
parent 29c165743f
commit c26baddc82

View File

@ -62,7 +62,7 @@ class UpdateAccount extends Job
throw new \Exception($message); 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)); $relationships[] = strtolower(trans_choice('general.companies', 1));
$message = trans('messages.warning.disabled', ['name' => $this->account->name, 'text' => implode(', ', $relationships)]); $message = trans('messages.warning.disabled', ['name' => $this->account->name, 'text' => implode(', ', $relationships)]);
@ -77,6 +77,12 @@ class UpdateAccount extends Job
'transactions' => 'transactions', '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;
} }
} }