<% content_for :page_specific_javascript do %> <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %> <% end %> <% if 'venue_management_bills' == params[:action] %>

<%= @venue_management.title %>

<% end %> <% @table_fields.each do |f| %> <%= Admin::VenueManagementBillsHelper.thead(f) %> <% end %> <% @bills.each do |bill| %> <% if 'venue_management_bills' != params[:action] %> <% end %> <% end %>
<%= bill.venue_management_main.title %> <% contractors = bill.contractor.display_contractors rescue "" %> <% contractors = t(:empty) if contractors.blank? %> <%= link_to contractors, (@venue_management_page_url.blank? ? "#" : "/#{I18n.locale}"+@venue_management_page_url+"/#{contractors.to_s.strip}-#{bill.id}?method=show_bill"), :target => '_self' %>
<%= bill.display_accounting_month %> <%= "#{t("vm_bill.#{bill.bill_typeA}")}/#{t("vm_bill.#{bill.bill_typeB}")}" %> <% if bill.bill_typeB == 'other' && bill.bill_other.present? %> -<%=bill.bill_other%> <% end %> <%= bill.display_caculation_basis %> <%= bill.reason %> <%= bill.total_amount %> <%= bill.pay_date %> <%= bill.pay_method %> <%= bill.display_note %>
<% filter_url = request.fullpath.split("?")[1..-1].join("?") %> <% if @venue_management.present? %> <% filter_url.blank? ? (filter_url += "id=#{@venue_management.id}") : (filter_url += "&id=#{@venue_management.id}") %>
<%= content_tag :div, class: "pagination-centered" do %> <%= paginate(@bills) %>
<%= link_to content_tag(:i, nil, class: "fa fa-download") + " " + t('venue_management.export'), export_admin_venue_management_bills_path(:format=>'xlsx')+"#{(filter_url.blank? ? '' : ('?'+filter_url))}", class: "btn btn-primary", target: '_blank' %> <%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_venue_management_bill_path(id: @venue_management.id), class: "btn btn-primary" %>
<% end %>
<% else %> <%= content_tag :div, class: "bottomnav clearfix" do (content_tag(:div, class: "pagination-centered") do paginate(@bills) end) + ('
'.html_safe + link_to(content_tag(:i, nil, class: "fa fa-download") + " " + t('venue_management.export'), export_admin_venue_management_bills_path(:format=>'xlsx')+"#{(filter_url.blank? ? '' : ('?'+filter_url))}", class: "btn btn-primary", target: '_blank') + '
'.html_safe) end %> <% end %>