<%= render partial: 'shared/header', locals: { links: [[@customer.name.truncate(6), @customer], ["契約情報一覧", "#"]]} %> <%= render 'sidebar' %>
<%= render partial: 'title', locals: { title: @customer.name + " 契約情報一覧"} %>

物件名

開始日

終了日

契約種別

添付ファイル

<% @customer.transactions.each do |transaction| %>

<%= transaction.name %>

<%= transaction.start %>

<%= transaction.expire %>

<%= transaction.payment %>

<% transaction.contents.each do |c| %> <% next if !c.upload_file %>

<%= link_to c.upload_file_name.truncate(20), { action: 'download', id: c.id}, target: "_blank"%>

<% end %>
<%= link_to '詳細', trans_lookup_path(@customer, transaction), class: "w8-button l-blue del" %>
<%= link_to '編集', trans_edit_path(@customer, transaction), class: "w8-button l-blue del" %>
<%= link_to '削除', transaction, method: :delete, data: { confirm: "本当に削除しますか?"}, class: "w8-button l-blue del" %>
<% end %>

<%= link_to '新規', trans_edit_path(@customer, @trans_new), class: "w8-button l-blue small " %>