Funzioni
<%= iconbutton_new new_emo_function_path, 'Inserisci nuova funzione', @filter_params.merge(filterperson_id: @person.id) %>
<%= view_table_open %>
<%= view_table_head_open %>
<%= view_table_row_open %>
<%= view_table_head_cell_span 2 %>
<%= view_table_head_cell (EmoFunction.human_attribute_name('in_use') ) %>
<%= view_table_head_cell (EmoFunction.human_attribute_name('descrizione') ) %>
<%= view_table_head_cell (link_to(EmoFunction.human_attribute_name('emo_sector_id') , emo_sectors_path )) %>
<%= view_table_head_cell (EmoFunction.human_attribute_name('person_id') ) %>
<%= view_table_head_cell (EmoFunction.human_attribute_name('monthly_hours') ) %>
<%= view_table_head_cell (EmoFunction.human_attribute_name('hourly_payment') ) %>
<%= view_table_head_cell (EmoFunction.human_attribute_name('monthly_salary') ) %>
<%= view_table_head_cell (EmoFunction.human_attribute_name('scalo_fisso') ) %>
<%= view_table_head_cell (EmoFunction.human_attribute_name('rimborso_per_km') ) %>
<%= view_table_head_cell (EmoFunction.human_attribute_name('rimborso_mobile') ) %>
<%= view_table_head_cell (link_to(EmoFunction.human_attribute_name('emo_fund_id') , emo_funds_path )) %>
<%= view_table_head_cell (EmoFunction.human_attribute_name('note') ) %>
<%= view_table_row_close %>
<%= view_table_head_close %>
<%= view_table_body_open %>
<% emo_functions = EmoFunction.where(person_id: @person.id) %>
<% emo_functions.each do |emo_function| %>
<%= view_table_row_open %>
<%= view_table_cell ( iconbutton_view emo_function, '') %>
<%= view_table_cell ( iconbutton_edit edit_emo_function_path(emo_function), '') if policy(EmoFunction).edit? %>
<%#= view_table_cell ( iconbutton_delete emo_function, '') %>
<%= view_table_cell ( check_box_tag :in_use, :in_use, emo_function.in_use, disabled: true) %>
<%= view_table_cell ( emo_function.descrizione) %>
<%= view_table_cell ( emo_function.emo_sector_id.present? ? link_to( emo_function.emo_sector.descrizione, emo_sector_path(emo_function.emo_sector) ) : nil) %>
<%= view_table_cell ( emo_function.person_id.present? ? link_to( emo_function.person.dh_person_name, person_path(emo_function.person) ) : nil) %>
<%= view_table_cell ( emo_function.monthly_hours) %>
<%= view_table_cell ( emo_function.hourly_payment) %>
<%= view_table_cell ( money_format(emo_function.monthly_salary) ) %>
<%= view_table_cell ( money_format(emo_function.scalo_fisso) ) %>
<%= view_table_cell ( money_format(emo_function.rimborso_per_km) ) %>
<%= view_table_cell ( money_format(emo_function.rimborso_mobile) ) %>
<%= view_table_cell ( emo_function.emo_fund_id.present? ? link_to( emo_function.emo_fund.format_for_formselect, emo_fund_path(emo_function.emo_fund) ) : nil) %>
<%= view_table_cell ( emo_function.note) %>
<%= view_table_row_close %>
<% end %>
<%= view_table_body_close %>
<%= view_table_close %>
Dati mensili (ultimi 10)
<% emo_months = EmoMonth.search({}).filter_by_person(@person.id).limit(10) %>
<%= 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 (link_to(EmoMonth.human_attribute_name('emo_function_id') , emo_functions_path) ) %>
<%= view_table_head_cell (EmoMonth.human_attribute_name(:person_id) ) %>
<%= 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(:busta_paga) ) %>
<%= view_table_head_cell (EmoMonth.human_attribute_name(:rimborsi_vari) ) %>
<%= view_table_head_cell (EmoMonth.human_attribute_name(:rimborso_bp) ) %>
<%= view_table_head_cell (EmoMonth.human_attribute_name(:rimborso_km) ) %>
<%= view_table_head_cell ('stato') %>
<%= view_table_head_cell (EmoMonth.human_attribute_name('compenso_importo') ) %>
<%= view_table_head_cell ('Versato') %>
<%= view_table_head_cell ('Data versamento') %>
<%= view_table_head_cell (EmoMonth.human_attribute_name('note') ) %>
<%= view_table_row_close %>
<%= view_table_head_close %>
<%= view_table_body_open %>
<% 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 policy(EmoMonth).edit? %>
<%#= view_table_cell ( iconbutton_delete emo_month, '') %>
<%= 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_id.present? ? link_to( emo_month.emo_function.descrizione, emo_function_path(emo_month.emo_function) ) : nil) %>
<%= 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.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 ( emo_month.ore_effettive) %>
<%= view_table_cell ( emo_month.ore_bp) %>
<%= view_table_cell ( emo_month.monthly_hours) %>
<%= view_table_cell ( money_format(emo_month.busta_paga) ) %>
<%= view_table_cell ( money_format(emo_month.rimborsi_vari) ) %>
<%= view_table_cell ( emo_month.rimborso_bp) %>
<%= view_table_cell ( emo_month.rimborso_km) %>
<%= view_table_cell ( emo_month.get_status_icon ) %>
<%= view_table_cell ( money_format(emo_month.compenso_importo) ) %>
<%= view_table_cell ( money_format(emo_month.get_versamento_importo) ) %>
<% lastdata = emo_month.get_versamento_lastdate %>
<%= view_table_cell ( lastdata.present? ? lastdata.to_dmy : nil ) %>
<%= view_table_cell ( emo_month.note) %>
<%= view_table_row_close %>
<% end %>
<%= view_table_body_close %>
<%= view_table_close %>
<%= icon('chevron-up') %> Torna all'inizio della pagina