<%= t("budgets.ballots.show.voted_html",
count: @ballot.investments.count) %>
<%= t("budgets.ballots.show.voted_info_html") %>
<% @ballot.groups.each do |group| %>
<%= group.name %> - <%= group.headings.first.name %>
<% if @ballot.has_lines_in_group?(group) %>
<%= t("budgets.ballots.show.amount_spent") %>
<%= @budget.formatted_amount(@ballot.amount_spent(@ballot.heading_for_group(group).id))) %>
<% else %>
<%= t("budgets.ballots.show.zero") %>
<%= link_to t("budgets.ballots.show.heading_link"),
budget_investments_path(budget, heading_id: heading.id),
data: { no_turbolink: true } %>
<% end %>
<%= render partial: 'budgets/ballot/investment',
collection: @ballot.investments.by_group(group.id) %>
<%= t("budgets.ballots.show.remaining",
amount_city: @budget.formatted_amount(@ballot.amount_available(@ballot.heading_for_group(group))))).html_safe %>
<% end %>