<%# if !(local_assigns.has_key? :can_do_payment) %> <% if (defined? can_do_payment).nil? %> <% can_do_payment = false %> <% end %> <%= view_table_open %> <%= view_table_head_open %> <%= view_table_row_open %> <%= view_table_head_cell_span 2 %> <% if !pundit_user.has_house_policyscope?(HousePn) %> <%= view_table_head_cell (link_to(HouseAdac.human_attribute_name(:house_id), houses_path )) %> <% end %> <%= view_table_head_cell HouseAdac.human_attribute_name(:competenza) %> <%= view_table_head_cell HouseAdac.human_attribute_name(:importo) %> <%= view_table_head_cell HouseAdac.human_attribute_name(:rata) %> <%= view_table_head_cell HouseAdac.human_attribute_name(:rate) %> <%= view_table_head_cell HouseAdac.human_attribute_name(:descrizione) %> <%= view_table_head_cell (link_to(HouseAdac.human_attribute_name(:person_id), people_path )) %> <%= view_table_head_cell (link_to(HouseAdac.human_attribute_name(:house_crb_id), house_crbs_path )) %> <%= view_table_head_cell HouseAdac.human_attribute_name(:scadenza) %> <% if can_do_payment %> <%= view_table_head_cell nil %> <% end %> <%= view_table_row_close %> <%= view_table_head_close %> <%= view_table_body_open %> <% house_adacs.each_with_index do |house_adac, house_adac_index| %> <%= view_table_row_open %> <%= view_table_cell ( iconbutton_view house_adac, nil) %> <%= view_table_cell ( iconbutton_edit edit_house_adac_path(house_adac), nil) %> <%#= view_table_cell ( iconbutton_delete house_adac, nil) %> <% if !pundit_user.has_house_policyscope?(HousePn) %> <%= view_table_cell (house_adac.house ? link_to( house_adac.house.format_for_formselect, house_path(house_adac.house) ) : nil) %> <% end %> <%= view_table_cell (daterange_name(house_adac.competenza)) %> <%= view_table_cell_right ( money_format house_adac.importo) %> <%= view_table_cell (house_adac.rata) %> <%= view_table_cell (house_adac.rate) %> <%= view_table_cell (house_adac.descrizione) %> <%= view_table_cell (house_adac.person ? link_to( house_adac.person.dh_person_name, person_path(house_adac.person) ) : nil) %> <%= view_table_cell (house_adac.house_crb ? link_to( house_adac.house_crb.format_for_formselect, house_crb_path(house_adac.house_crb_id) ) : nil) %> <%= view_table_cell (house_adac.scadenza.to_dmy) %> <%#= view_table_cell (iconbutton_submit(icon('euro-sign'), 'btn-success btn-xs', "Paga", HouseAdacsHelper::EseguiPagamento) ) %> <% if can_do_payment and house_adac.person_id.blank? %> <%= view_table_cell_open %> <%= render partial: "shared/modal_dialog", locals: { thisID: "_paga_#{house_adac_index.to_s}", button_label: icon_with_text(icon('euro-sign'), 'Paga'), button_class: "btn btn-success btn-xs", title: "Registra movimento #{HousePn.label(1)}", partial_path: "house_pns/form", partial_locals: { house_pn: HousePn.new( importo: house_adac.importo, competenza: house_adac.competenza, descrizione: house_adac.descrizione, person_id: house_adac.person_id, house_pn_fund_id: HousePnFund.get_default(house_adac.house_id).id, house_crb_id: house_adac.house_crb_id) }, include_close_button: false } %> <%= view_table_cell_close %> <% else %> <%= view_table_cell (nil) %> <% end %> <%= view_table_row_close %> <% end %> <%= view_table_body_close %> <%= view_table_close %>