<%= form_tag(pension_funds_path, method: :get) do %>
<%= view_table_open %>
<%= view_table_row_open %>
<%= render "shared/filterdate" %>
<% if !pundit_user.has_house_policyscope?(HousePn) %>
<%= render "shared/filterhouse_id" %>
<%= render "shared/filterhouseisentity" %>
<% end %>
<%= render "shared/filterperson_id" %>
<%= view_table_row_close %>
<%= view_table_close %>
<% end %>
<%= page_entries_info @pension_funds %>, <%= select_per_page(params, session) %>
<% totale_reddito_lordo = @pension_funds_notpaged.sum(:reddito_lordo) %>
<% totale_importo_effettivo = @pension_funds_notpaged.sum(:importo) %>
Totale su <%= @pension_funds_notpaged.count %> voci, Reddito Effettivo = <%= money_format(totale_reddito_lordo) %>, Importo effettivo = <%= money_format(totale_importo_effettivo) %>
<%= iconbutton_export_xlsx pension_funds_path(format: :xlsx), 'Esporta come .xlsx', @filter_params %>
<%= iconbutton_new new_pension_fund_path, 'Nuovo fondo pensione', @filter_params %>
<% if !@fp_nilHouse %>
<%= iconbutton_to house_path(@fp_valueHouse), icon('hand-point-right'), 'btn-success btn-xs', 'Nucleo', @filter_params %>
<% end %>
<% if !@fp_nilPerson %>
<%= iconbutton_to person_path(@fp_valuePerson), icon('hand-point-right'), 'btn-success btn-xs', 'Persona', @filter_params %>
<% end %>