% if @fp_fp_nilYear %>
<% year = Date.today.year %>
<% else %>
<% year = @fp_valueYear %>
<% end %>
Aggiornato al <%= Date.today.to_dmy %>
<% dates = (1..12).map{|month| DateTime.new(year, month, 1) } %>
<% totals = Hash[(1..12).map{ |month| [DateTime.new(year, month, 1), 0] } ] %>
<%# months = (1..12).map{|d| I18n.l(DateTime.new(Date.today.year, d, 1), format: "%B") } %>
<% months = I18n.t("date.month_names").drop(1) %>
<% totale_versamenti = 0 %>
<% houses = House.filtered_by_attivo.filtered_by_family.ordered_by_name %>
<% months.each do |month| %> | <%= month %> | <% end %>TOTALE annuale nucleo |
da versare |
<%= money_format_zero(value) %> | <% totals[date] += value %> <% versamenti += PensionFund.get_versato(date, member_ids) %> <% end %><%= money_format_zero(importi) %> | <% totale_versamenti += versamenti %><%= money_format_zero(importi - versamenti) %> | |
totali mese: | <% dates.each do |date| %><%= money_format_zero(totals[date]) %> | <% bigtotal += totals[date] %> <% end %><%= money_format_zero(bigtotal) %> | <%= money_format_zero(bigtotal - totale_versamenti) %> |