<%= EmoMonth.label %>

<%= form_tag(emo_months_path, method: :get) do %> <%= view_table_open %> <%= view_table_row_open %> <%= render "shared/filteremosector_id" %> <%= render "shared/filteremofunction_id" %> <%= render "shared/filteremofund_id" %> <%= view_table_row_close %> <%= view_table_row_open %> <%= render "shared/filterdate" %> <%= render "shared/filterperson_id" %> <%= render "shared/filteremomonthversato" %> <%= view_table_row_close %> <%= view_table_close %> <% end %> <%= page_entries_info @emo_months %>, <%= select_per_page(params, session) %>
Totale '<%= EmoMonth.human_attribute_name(:importo_dapagare) %>' per le <%= @emo_months_notpaged.count %> voci filtrate: <%= money_format(@emo_months_notpaged.sum(:importo_dapagare)) %>
legenda icona di stato: <%= icon(EmoMonthsHelper::StatusIcon_DataToBeInserted) %> <%= EmoMonthsHelper::StatusLabel_DataToBeInserted %> <%= icon(EmoMonthsHelper::StatusIcon_MoneyToBeGiven) %> <%= EmoMonthsHelper::StatusLabel_MoneyToBeGiven %> <%= icon(EmoMonthsHelper::StatusIcon_MoneyGiven) %> <%= EmoMonthsHelper::StatusLabel_MoneyGiven %> <%= icon(EmoMonthsHelper::StatusIcon_Problem) %> <%= EmoMonthsHelper::StatusLabel_Problem %>
<% if @emo_months %> <%= will_paginate @emo_months %> <%= view_table_open %> <%= view_table_head_open %> <%= view_table_row_open %> <%= view_table_head_cell_span 3 %> <%= view_table_head_cell (EmoMonth.human_attribute_name(:competenza)) %> <%= view_table_head_cell (EmoMonth.human_attribute_name(:person_id)) %> <%= view_table_head_cell (link_to(EmoMonth.human_attribute_name(:emo_function_id), emo_functions_path) ) %> <%= view_table_head_cell (EmoMonth.human_attribute_name(:emo_fund_id)) %> <%= view_table_head_cell (EmoMonth.human_attribute_name(:ore_effettive)) %> <%= view_table_head_cell (EmoMonth.human_attribute_name(:ore_bp)) %> <%= view_table_head_cell (EmoMonth.human_attribute_name(:monthly_hours)) %> <%= view_table_head_cell (EmoMonth.human_attribute_name(:rimborsi_vari).gsub('/'," / ")) %> <%= view_table_head_cell (EmoMonth.human_attribute_name(:rimborso_bp)) %> <%= view_table_head_cell (EmoMonth.human_attribute_name(:rimborso_km)) %> <%= view_table_head_cell (EmoMonth.human_attribute_name(:totalemese_importo)) %> <%= view_table_head_cell (EmoMonth.human_attribute_name(:busta_paga).gsub('/'," / ")) %> <%= view_table_head_cell (EmoMonth.human_attribute_name(:compenso_importo)) %> <%= view_table_head_cell ('Versato / Scalato') %> <%= view_table_head_cell (EmoMonth.human_attribute_name(:importo_dapagare)) %> <%= view_table_head_cell (EmoMonth.human_attribute_name(:status_pagamenti)) %> <%= view_table_head_cell ('Data versamento') %> <%= view_table_head_cell ('Competenza scalo') %> <%= view_table_head_cell (EmoMonth.human_attribute_name(:note)) %> <%= view_table_row_close %> <%= view_table_head_close %> <%= view_table_body_open %> <%# @emo_months.order_for_index.each do |emo_month| %> <% @emo_months.each do |emo_month| %> <%= view_table_row_open %> <%= view_table_cell ( iconbutton_view emo_month, '') %> <%= view_table_cell ( iconbutton_edit edit_emo_month_path(emo_month), '') %> <% if emo_month.can_destroy? %> <%= view_table_cell ( iconbutton_delete emo_month, '') %> <% else %> <%= view_table_cell ('') %> <% end %> <%#= view_table_cell ( iconbutton_to target_path, icon('wallet'), nil, "Versa", params) %> <%#= view_table_cell ( iconbutton_to target_path, icon('exchange-alt'), nil, "Scala", params) %> <%#= view_table_cell ( iconbutton_new new_emo_month_path, '', @filter_params.merge(emo_function_id: emo_month.emo_function_id, competenza: (emo_month.competenza + 1.month) ) ) %> <%= view_table_cell ( "

#{daterange_name(emo_month.competenza)}

" ) %> <% if emo_month.emo_function_id.present? %> <%= view_table_cell ( "

#{emo_month.emo_function.person_id.present? ? link_to( emo_month.emo_function.person.dh_person_name, person_path(emo_month.emo_function.person) ) : nil }

" ) %> <%= view_table_cell ( emo_month.emo_function_id.present? ? link_to( emo_month.emo_function.descrizione, emo_function_path(emo_month.emo_function) ) : nil) %> <%= view_table_cell ( emo_month.emo_function.emo_fund_id.present? ? link_to( emo_month.emo_function.emo_fund.codice, emo_fund_path(emo_month.emo_function.emo_fund) ) : nil) %> <% else %> <%= view_table_cell ('') %> <%= view_table_cell ('') %> <%= view_table_cell ('') %> <% end %> <%= view_table_cell_right ( emo_month.ore_effettive) %> <%= view_table_cell_right ( emo_month.ore_bp) %> <%= view_table_cell_right ( emo_month.monthly_hours) %> <%= view_table_cell_right ( money_format(emo_month.rimborsi_vari) ) %> <%= view_table_cell_right ( money_format(emo_month.rimborso_bp) ) %> <%= view_table_cell_right ( emo_month.rimborso_km) %> <%= view_table_cell_right ( money_format(emo_month.totalemese_importo) ) %> <%= view_table_cell_right ( money_format(emo_month.busta_paga) ) %> <%= view_table_cell_right ( money_format(emo_month.compenso_importo) ) %> <%= view_table_cell_right ( money_format(emo_month.importo_versato - emo_month.importo_scalato) ) %> <%= view_table_cell_right ( money_format(emo_month.importo_dapagare) ) %> <%= view_table_cell ( emo_month.get_status_icon(emo_month.status_pagamenti) ) %> <% lastdata = emo_month.get_versamento_lastdate %> <%= view_table_cell ( lastdata.present? ? lastdata.to_dmy : nil ) %> <% lastdata = emo_month.get_scalo_lastdate %> <%= view_table_cell ( lastdata.present? ? "

#{daterange_name(lastdata)}

" : nil ) %> <%= view_table_cell ( emo_month.note) %> <%= view_table_row_close %> <% end %> <%= view_table_body_close %> <%= view_table_close %> <%= will_paginate @emo_months %> <% end %>