From af760afb8a5598de3607eaffeab40d677a606b0f Mon Sep 17 00:00:00 2001 From: Omar Juma <3085079+donjuma@users.noreply.github.com> Date: Fri, 8 Nov 2024 13:26:06 -0500 Subject: [PATCH 1/2] fixes #1369 --- app/models/account.rb | 2 +- app/views/accounts/_account_list.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/account.rb b/app/models/account.rb index bc4f7123331..8f9334349df 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -47,7 +47,7 @@ def by_group(period: Period.all, currency: Money.default_currency.iso_code) accounts.each do |account| group.add_value_node( account, - account.balance_money.exchange_to(currency, fallback_rate: 0), + account.value, account.series(period: period, currency: currency) ) end diff --git a/app/views/accounts/_account_list.html.erb b/app/views/accounts/_account_list.html.erb index 28103fae8eb..24e8e08fcb5 100644 --- a/app/views/accounts/_account_list.html.erb +++ b/app/views/accounts/_account_list.html.erb @@ -40,7 +40,7 @@ <% end %>
-

<%= format_money account.balance_money %>

+

<%= format_money account.value %>

<%= render "shared/sparkline", series: account_value_node.series, id: dom_id(account, :list_sparkline) %> From db91ae42d1c061a1f159ed54746a6e81d8c79488 Mon Sep 17 00:00:00 2001 From: Omar Juma <3085079+donjuma@users.noreply.github.com> Date: Fri, 8 Nov 2024 14:58:00 -0500 Subject: [PATCH 2/2] fixes #1369 - updated family model --- app/models/family.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/family.rb b/app/models/family.rb index 8d0d063bfbb..cf356132aee 100644 --- a/app/models/family.rb +++ b/app/models/family.rb @@ -109,7 +109,7 @@ def net_worth end def assets - Money.new(accounts.active.assets.map { |account| account.balance_money.exchange_to(currency, fallback_rate: 0) }.sum, currency) + Money.new(accounts.active.assets.map { |account| account.value }.sum, currency) end def liabilities