2020-10-14 01:48:38 +00:00
|
|
|
<% content_for :page_specific_javascript do %>
|
|
|
|
<%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
|
|
|
|
<% end %>
|
2020-09-08 06:12:14 +00:00
|
|
|
<script>
|
|
|
|
if(document.querySelectorAll("#orbit-bar").length==0) location.reload();
|
|
|
|
</script>
|
2020-09-22 15:19:59 +00:00
|
|
|
<% if 'venue_management_bills' == params[:action] %>
|
2020-09-08 06:12:14 +00:00
|
|
|
<h4><%= @venue_management.title %></h4>
|
|
|
|
<% end %>
|
|
|
|
<table class="table main-list">
|
|
|
|
<thead>
|
|
|
|
<tr class="sort-header">
|
|
|
|
<% @table_fields.each do |f| %>
|
|
|
|
<%= Admin::VenueManagementBillsHelper.thead(f) %>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% @bills.each do |bill| %>
|
|
|
|
<tr>
|
|
|
|
<% if 'venue_management_bills' != params[:action] %>
|
|
|
|
<td><%= bill.venue_management_main.title %></td>
|
|
|
|
<% end %>
|
|
|
|
<td>
|
|
|
|
<% 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' %>
|
|
|
|
<div class="quick-edit">
|
|
|
|
<ul class="nav nav-pills">
|
|
|
|
<% if can_edit_or_delete?(bill) %>
|
|
|
|
<li><%= link_to t(:edit), edit_admin_venue_management_bill_path(bill.id) %></li>
|
2020-10-05 16:09:17 +00:00
|
|
|
<li><%= link_to t(:copy), copy_admin_venue_management_bills_path(:id=>bill.id) %></li>
|
2020-09-08 06:12:14 +00:00
|
|
|
<li><a href="#" class="delete text-error" rel="/admin/venue_management_bills/<%=bill.id.to_s%>"><%= t(:delete_) %></a></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</td>
|
2020-09-14 14:55:39 +00:00
|
|
|
<td><%= bill.display_accounting_month %></td>
|
2020-09-08 08:32:08 +00:00
|
|
|
<td><%= "#{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 %>
|
|
|
|
</td>
|
2020-10-02 07:53:48 +00:00
|
|
|
<td><%= bill.display_caculation_basis %></td>
|
2020-09-08 06:12:14 +00:00
|
|
|
<td><%= bill.reason %></td>
|
2020-10-05 16:09:17 +00:00
|
|
|
<td><%= bill.total_amount %></td>
|
2020-09-08 06:12:14 +00:00
|
|
|
<td><%= bill.pay_date %></td>
|
|
|
|
<td><%= bill.pay_method %></td>
|
2020-10-27 02:41:08 +00:00
|
|
|
<td><%= bill.display_note %></td>
|
2020-09-08 06:12:14 +00:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2020-10-16 04:03:26 +00:00
|
|
|
<% filter_url = request.fullpath.split("?")[1..-1].join("?") %>
|
2020-09-08 06:12:14 +00:00
|
|
|
<% if @venue_management.present? %>
|
2020-10-16 08:12:28 +00:00
|
|
|
<% filter_url.blank? ? (filter_url += "id=#{@venue_management.id}") : (filter_url += "&id=#{@venue_management.id}") %>
|
2020-09-08 06:12:14 +00:00
|
|
|
<!-- footer -->
|
|
|
|
<div class="bottomnav clearfix">
|
2020-10-16 04:03:26 +00:00
|
|
|
<%= content_tag :div, class: "pagination-centered" do %>
|
2020-10-05 16:09:17 +00:00
|
|
|
<%= paginate(@bills) %>
|
|
|
|
<div class="action pull-right">
|
2020-10-16 04:03:26 +00:00
|
|
|
<%= 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' %>
|
2020-10-05 16:09:17 +00:00
|
|
|
<%= 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" %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2020-09-08 06:12:14 +00:00
|
|
|
</div>
|
|
|
|
<!-- footer:end -->
|
2020-10-16 04:03:26 +00:00
|
|
|
<% else %>
|
|
|
|
<%=
|
|
|
|
content_tag :div, class: "bottomnav clearfix" do
|
|
|
|
(content_tag(:div, class: "pagination-centered") do
|
|
|
|
paginate(@bills)
|
|
|
|
end) +
|
|
|
|
('<div class="action pull-right">'.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') +
|
|
|
|
'</div>'.html_safe)
|
|
|
|
end
|
|
|
|
%>
|
2020-09-08 06:12:14 +00:00
|
|
|
<% end %>
|
2020-10-05 16:09:17 +00:00
|
|
|
<style type="text/css">
|
|
|
|
.pagination-centered .pagination{
|
2020-10-16 04:03:26 +00:00
|
|
|
width: calc(100% - 18em);
|
|
|
|
padding-left: 6em;
|
2020-10-05 16:09:17 +00:00
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
.main-list {
|
|
|
|
margin-bottom: 30px;
|
|
|
|
}
|
|
|
|
</style>
|