<%= render :partial => "submenu" %>

<div id="main"><!-- メイン -->

<h2>顧客編集</h2>
<%= flash[:notice] %>
<%= flash[:errors] %>

<div class="space70_bottom">
<% form_for :customer, @customer, :url=>{:action => 'confirm'} do |f| %>
  <%= render :partial => "form", :locals => {:f => f} %>
  <div class="btn_box">
    <%= f.submit "確認する", :class=>"btn" %>
    <%= image_tag("btn_side.gif", :width => "6", :height => "34", :class => "btn_side") %>
  </div>
<% end %>
</div>

<h3>▼購入履歴</h3><br/>
<table class="data2 clear" cellspacing="1">
  <tr>
    <th>日付</th><th>受注番号</th><th>購入金額</th><th>発送日</th><th>支払方法</th>
  </tr>
  <% for o in (@orders || []) %>
  <% d = o.order_deliveries.first %>
  <tr>
    <td><%= o.received_at.strftime("%Y/%m/%d %H:%M") if o.received_at %></td>
    <td><%= link_to o.code, {:action => :show, :controller => "orders", :id => o},
            :popup => ["受注情報詳細", "width=760,height=600,resizable=yes,scrollbars=yes"]%></td>
    <td><%= purchase_price(d.total, d.use_point) %></td>
    <td><%= get_hassou_name(d) %></td>
    <td><%= d.payment && d.payment.name %></td>
  </tr>
  <% end %>
</table>

<% @admin_customer_payment_list.each do |list| %>
  <%= render :partial => list %>
<% end %>

</div><!-- /メイン -->
