<%= form_for(@customer) do |f| %> <% if @customer.errors.any? %>

<%= pluralize(@customer.errors.count, "error") %> prohibited this customer from being saved:

<% end %> <%= f.fields_for :reports, @report do |report| %>

工事内容

<%= report.text_field :name %>

日付

<%= report.date_field :date %>

担当者

<%= report.text_field :detail %>

請求書送付済

<%= report.select :memo1, ["請求無", "未送付:請求有", "送付不要:請求有", "送付済:請求有"],{include_blank: true, selected: @report.memo1}, style: "width: 90%" %>

在庫使用有無

<%= report.select :memo2, ["在庫使用無", "在庫使用有:未入力", "在庫入力済"],{include_blank: true, selected: @report.memo2}, style: "width: 90%" %>
<% if @uploaded_file %> <% @uploaded_file.each do |files| %>

<%= link_to files.upload_file_name, {action: 'download', id: files.id}, target: "_blank" %>

<%= link_to '削除', files, method: :delete, data:{confirm: '本当に削除しますか?'}, class: "w8-button l-blue small"%>
<% end %> <% end %> <% if @uploading_file %> <% @uploading_file.each do |content| %>
<%= report.fields_for :contents, content do |c| %> <%= c.file_field :upload_file, class: "file" %> <% end %>
<% end %> <% end %> <% end %>
<%= f.submit "更新", :name => "report_update", class: "w8-button l-blue normal" %>
<% end %>