Missing account component with `transactions`

This commit is contained in:
Cüneyt Şentürk 2024-02-26 14:11:28 +03:00
parent 2581d2b5c6
commit 3b6fea9d9b
1 changed files with 3 additions and 3 deletions

View File

@ -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();
}
}