% if (params[:controller]=="emo_months") && (params[:action]=="new") %> <% if params[:emo_month].present? && params[:emo_month][:person_id].is_valid_id? %> <% current_person_id = params[:emo_month][:person_id] %> <% else %> <% current_person_id = params[:filterperson_id] %> <% end %> <% if current_person_id.is_valid_id? %> <% current_person = Person.find(current_person_id) %> <% end %> <% if params[:emo_month].present? && params[:emo_month][:competenza].is_valid_date? %> <% current_competenza = params[:emo_month][:competenza].to_date %> <% elsif @emo_month.competenza.is_valid_date? %> <% current_competenza = @emo_month.competenza %> <% else %> <% current_competenza = ApplicationController.helpers.daterange_current #params[:filterdate] %> <% end %> <% elsif (params[:controller]=="emo_months") && (["edit","show"].include?(params[:action])) %> <% current_emo_function_id = @emo_month.emo_function_id %> <% if current_emo_function_id.is_valid_id? %> <% current_emo_function = EmoFunction.find(current_emo_function_id) %> <% current_person_id = current_emo_function.person_id %> <% if current_person_id.is_valid_id? %> <% current_person = Person.find(current_person_id) %> <% end %> <% end %> <% if params[:emo_month].present? && params[:emo_month][:competenza].is_valid_date? %> <% current_competenza = params[:emo_month][:competenza].to_date %> <% elsif @emo_month.competenza.is_valid_date? %> <% current_competenza = @emo_month.competenza %> <% else %> <% current_competenza = ApplicationController.helpers.daterange_current #params[:filterdate] %> <% end %> <% end %> <% if current_person.present? && current_competenza.is_valid_date? %>
<%= EmoMonth.human_attribute_name(:emo_sector_id) %> | <%= EmoMonth.human_attribute_name(:emo_function_id) %> | <%= EmoMonth.human_attribute_name(:ore_effettive) %> | <%= EmoMonth.human_attribute_name(:ore_bp) %> | <%= EmoMonth.human_attribute_name(:monthly_hours) %> | <%= EmoMonth.human_attribute_name(:rimborsi_vari).gsub('/'," / ") %> | <%= EmoMonth.human_attribute_name(:rimborso_bp) %> | <%= EmoMonth.human_attribute_name(:rimborso_km) %> | <%= EmoMonth.human_attribute_name(:busta_paga).gsub('/'," / ") %> | <%= EmoMonth.human_attribute_name(:totalemese_importo) %> | <%= EmoMonth.human_attribute_name(:compenso_importo) %> | <%= EmoMonth.human_attribute_name(:importo_versato) %> | <%= EmoMonth.human_attribute_name(:importo_scalato) %> | <%= EmoMonth.human_attribute_name(:importo_dapagare).gsub('/'," / ") %> |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<%= notetext(emo_function.emo_sector.descrizione) %> | <%= notetext(emo_function.descrizione) %> | <% if emo_month.blank? %> <% emo_month = EmoMonth.new %> <% end %><%= money_format_zero(emo_month[:ore_effettive]) %> | <%= money_format_zero(emo_month[:ore_bp]) %> | <%= money_format_zero(emo_month[:monthly_hours]) %> | <%= money_format_zero(emo_month[:rimborsi_vari]) %> | <%= money_format_zero(emo_month[:rimborso_bp]) %> | <%= money_format_zero(emo_month[:rimborso_km]) %> | <%= money_format_zero(emo_month[:busta_paga]) %> | <%= money_format_zero(emo_month[:totalemese_importo]) %> | <%= money_format_zero(emo_month[:compenso_importo]) %> | <%= money_format_zero(emo_month[:importo_versato]) %> | <%= money_format_zero(emo_month[:importo_scalato]) %> | <%= money_format_zero(emo_month[:importo_dapagare]) %> |
totali: | <%= money_format_zero(emo_month_totals[:ore_effettive]) %> | <%= money_format_zero(emo_month_totals[:ore_bp]) %> | <%= money_format_zero(emo_month_totals[:monthly_hours]) %> | <%= money_format_zero(emo_month_totals[:rimborsi_vari]) %> | <%= money_format_zero(emo_month_totals[:rimborso_bp]) %> | <%= money_format_zero(emo_month_totals[:rimborso_km]) %> | <%= money_format_zero(emo_month_totals[:busta_paga]) %> | <%= money_format_zero(emo_month_totals[:totalemese_importo]) %> | <%= money_format_zero(emo_month_totals[:compenso_importo]) %> | <%= money_format_zero(emo_month_totals[:importo_versato]) %> | <%= money_format_zero(emo_month_totals[:importo_scalato]) %> | <%= money_format_zero(emo_month_totals[:importo_dapagare]) %> |