<%# if params[:pension_fund].present? %> <%# params[:pension_fund].each do |id, value| %> <%# PensionFund.find(id).update_attributes(value: value) %> <%# end %> <%# end %>

<%= PensionFund.label %>

<%= 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) %>
<% if @pension_funds %> <%= will_paginate @pension_funds %> <%= view_table_open %> <%= view_table_head_open %> <%= view_table_row_open %> <%= view_table_head_cell_span 2 %> <%= view_table_head_cell PensionFund.human_attribute_name(:competenza) %> <%= view_table_head_cell PensionFund.human_attribute_name(:person_id) %> <%= view_table_head_cell PensionFund.human_attribute_name(:personhouse_id) %> <%= view_table_head_cell PensionFund.human_attribute_name(:reddito_lordo) %> <%= view_table_head_cell ('Importo calcolato') %> <%= view_table_head_cell PensionFund.human_attribute_name(:importo) %> <%= view_table_head_cell ('') %> <%= view_table_head_cell ('') %> <%= view_table_row_close %> <%= view_table_head_close %> <%= view_table_body_open %> <% @pension_funds.each do |pension_fund| %> <%= view_table_row_open "id='pension_fund_row_id#{pension_fund.id}'" %> <%= render partial:'form_row', locals: { pension_fund: pension_fund } %> <%= view_table_row_close %> <% end %> <%= view_table_body_close %> <%= view_table_close %> <% end %>
<%= iconbutton_submit icon('save'), 'btn-success', 'Salva' %>