diff --git a/app/View/Components/Form/Group/Account.php b/app/View/Components/Form/Group/Account.php index 13f33a5cd..112211465 100644 --- a/app/View/Components/Form/Group/Account.php +++ b/app/View/Components/Form/Group/Account.php @@ -40,7 +40,7 @@ class Account extends Form $this->selected = $account_id; if (! $this->accounts->has($account_id)) { - $account = Model::find($account_id); + $account = Model::with('transactions')->find($account_id); $this->accounts->push($account); } @@ -66,9 +66,9 @@ class Account extends Form protected function getAccounts() { if ($this->hideCurrency) { - return Model::enabled()->orderBy('name')->get(); + return Model::with('transactions')->enabled()->orderBy('name')->get(); } - return Model::enabled()->orderBy('name')->get(); + return Model::with('transactions')->enabled()->orderBy('name')->get(); } }