%# locals: (investment_metrics:) %> <% if investment_metrics[:has_investments] %>
<%= format_money(investment_metrics[:portfolio_value]) %>
<%= format_money(Money.new(investment_metrics[:unrealized_trend].value, Current.family.currency)) %> (<%= investment_metrics[:unrealized_trend].percent_formatted %>)
<% else %><%= t("reports.investment_performance.no_data") %>
<% end %><%= format_money(investment_metrics[:period_contributions]) %>
<%= format_money(investment_metrics[:period_withdrawals]) %>
<%= holding.ticker %>
<%= truncate(holding.name, length: 25) %>
<%= icon("alert-triangle", size: "sm") %> <%= t("reports.investment_performance.taxable_realized_note") %>
<% end %><%= t("reports.investment_performance.holdings") %>
<% data[:holdings].first(5).each do |holding| %><%= t("reports.investment_performance.and_more", count: data[:holdings].count - 5) %>
<% end %><%= t("reports.investment_performance.sell_trades") %>
<% data[:sell_trades].first(5).each do |trade| %> <% gain = trade.realized_gain_loss %><%= t("reports.investment_performance.and_more", count: data[:sell_trades].count - 5) %>
<% end %><%= account.name %>
<%= account.short_subtype_label %>
<%= format_money(account.balance_money) %>
<% end %> <% end %>