venue_management/app/views/venue_managements/show_bill.html.erb

80 lines
3.6 KiB
Plaintext
Raw Normal View History

2020-09-08 06:12:14 +00:00
<% # encoding: utf-8 %>
<% @@session = session %>
<%= yield %>
<%
data = action_data
@venue_management_bill = data["venue_management_bill"]
@params = data['params']
%>
<table class="table table-striped venue_managementive-show-table">
<tbody>
<tr>
<th class="venue_managementive-title-field"><%= t('venue_management.title') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_bill.venue_management_main.title %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.contractor') %></th>
<td class="venue_managementive-title-value">
<% contractors = @venue_management_bill.contractor.display_contractors rescue "" %>
<% contractors = t(:empty) if contractors.blank? %>
<%= contractors %>
</td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.accounting_month') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_bill.accounting_month.strftime("%Y-%m") %></td>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.bill_type') %></th>
<td class="venue_managementive-title-value"><%= "#{t("vm_bill.#{@venue_management_bill.bill_typeA}")}/#{t("vm_bill.#{@venue_management_bill.bill_typeB}")}" %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.caculation_basis') %></th>
<td class="venue_managementive-title-value"><%= "#{t("vm_bill.#{@venue_management_bill.caculation_basis_type}")}: #{@venue_management_bill.caculation_basis}" %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.reason') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_bill.reason %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.amount') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_bill.amount %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.pay_date') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_bill.pay_date %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.pay_method') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_bill.pay_method %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.note') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_bill.note %></td>
</tr>
<% if !@venue_management_bill.venue_management_files.blank? %>
<tr>
<th class="venue_managementive-title-field"><i class="fa fa-fw fa-paperclip"></i><%= t(:file_) %></th>
<td class="venue_managementive-title-value">
<% @venue_management_bill.venue_management_files.map do |file| %>
<%= link_to (file.title.blank? ? File.basename(file.file.path) : file.title) , file.file.url, {:target => '_blank', :title => file.description} if file.file.file %>
<% end %>
</td>
</tr>
<% end %>
<% if !@venue_management_bill.venue_management_links.blank? %>
<tr>
<th class="venue_managementive-title-field"><i class="fa fa-fw fa-link"></i><%= t(:link) %></th>
<td class="venue_managementive-title-value">
<% @venue_management_bill.venue_management_links.map do |link| %>
<%= link_to (link.title.blank? ? link.url : link.title), link.url, :target => '_blank' %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<br />
<%= link_to t(:close), 'javascript:window.close();', :class => 'btn btn-primary' %>