<% if params[SrgPnsHelper::IncassoFondopensione].present? %>
<% tipoDiIncasso = SrgPnsHelper::IncassoFondopensione %>
<% result = SrgPn.registraMovimento(current_user, params, @filter_params, tipoDiIncasso) %>
<%= render partial: 'shared/show_result_registramovimento', locals: {result: result, tipoDiIncasso: tipoDiIncasso} %>
<% params.delete(tipoDiIncasso) %>
<% end %>
<% currentperiod = daterange_current() %>
<% list_of_months = [] %>
<% (-12).upto(0) do |m| %>
<% list_of_months << currentperiod.next_month(m) %>
<% end %>
<%# counter = 0 %>
<% region = Region.find(@house.region_id) %>
<% list_of_months.each do |month| %>
<%= render partial: "show_panel_pension_funds_body", locals: { current_house: @house, current_region: region, current_month: month } %>
<% end %>
<%# if counter == 0 %>
<%#= "Tutti i #{PensionFund.label} sono stati versati." %>
<%# end %>
<% parameters = @filter_params.merge(filterhouse_id: @house.id, filterdate: daterange_current) %>
<%= iconbutton_to pension_funds_path, icon('hand-point-right'), 'btn-success btn-xs', "Vedi #{PensionFund.label} di #{@house.descrizione}", parameters %>
<% parameters = {filterhouse_id: @house.id, filtersrgpnfund_id: PensionFundsHelper::PensionFund_QecFund.srg_pn_fund_id, filtersrgcrb_id: PensionFundsHelper::PensionFund_Crb.id} %>
<%= iconbutton_to srg_pns_path, icon('hand-point-right'), 'btn-success btn-xs', "Vedi versamenti per #{PensionFund.label} di #{@house.descrizione}", parameters %>
<%= icon('chevron-up') %> Torna all'inizio della pagina