OSDN Git Service

受注管理周りの表示の体裁を整えた
[elecoma/elecoma.git] / app / views / admin / orders / statement.html.erb
1 <%=h flash[:notice] %>
2 <%=h flash[:error] %>
3 <%= render :partial => "submenu" %>
4
5 <div id="main"><!-- メイン -->
6   <h2>納品書</h2><br />
7
8   <% form_tag({:action => 'statement_download',:id => @order_delivery.id })do  %>
9     <div class="btn_box space20_bottom" >
10       <%= submit_tag 'PDF DOWNLOAD', :class=>"btn" %>
11       <%= image_tag("btn_side.gif", :width => "6", :height => "34", :class => "btn_side") %>
12     </div>
13   <%end%>
14
15   <table cellspacing="1" class="data">
16     <tr>
17       <th>発行日</th><td><%=h Time.now.strftime('%Y/%m/%d')%></td>
18     </tr>
19     <tr>
20       <th>受注日</th><td><%=h date(@order_delivery.received_at) %></td>
21     </tr>
22     <tr>
23       <th>お客様氏名</th>
24         <td>
25           <%=h @order_delivery.family_name %> 
26           <%=h @order_delivery.first_name %> 様
27         </td>
28     </tr>
29     <tr>
30       <th>受注コード</th><td><%=h @order_delivery.order_code %></td></tr>
31     <tr>
32       <th>住所</th>
33         <td colspan="3">
34            〒<%=h @order_delivery.zipcode01 %>-
35              <%=h @order_delivery.zipcode02 %><br />
36              <%=h @order_delivery.prefecture_name %> 
37              <%=h @order_delivery.address_city %> 
38              <%=h @order_delivery.address_detail %>
39         </td>
40     </tr>
41     <tr>
42       <th colspan="2">会社情報</th></tr>
43     <tr>
44       <th>会社名</th>
45         <td><%=h @shop.try(:corp_name) %></td>
46     </tr>
47     <tr>
48       <th>住所</th>
49         <td>
50           〒<%=h @shop.try(:zipcode) %><br />
51             <%=h @shop.try(:address) %>
52         </td>
53     </tr>
54     <tr>
55       <th>TEL</th>
56         <td><%=h @shop.try(:tel) %></td>
57     </tr>
58   </table>    
59
60   <h3>毎度お買い上げいただき誠にありがとうございます。下記の通りに納品いたします。</h3> <br />
61
62   <table cellspacing="1" class="data2">  
63     <tr>
64       <th colspan="6">受付商品情報</th>
65     </tr>
66     <tr>
67       <th class="center">商品コード</th>
68       <th class="center">商品名/<br />規格1/<br />規格2</th>
69       <th class="center">単価</th>
70       <th class="center">数量</th>
71       <th class="center">税込み価格</th>
72       <th class="center">小計</th>
73     </tr>
74   
75   <% @order_delivery.order_details.each do | detail | %>
76     <tr>
77       <td><%=h detail.product_code %></td>
78       <td>
79         <%=h detail.product_name %>/<br />
80         <%=h detail.style_category_name1 %>/<br />
81         <%=h detail.style_category_name2 %>
82       </td>
83       <td><%=h number_with_delimiter(detail.price) %>円</td>
84       <td><%=h number_with_delimiter(detail.quantity) %></td>
85       <td><%= number_with_delimiter(detail.price_with_tax) %>円</td>
86       <td><%= number_with_delimiter(detail.subtotal) %>円</td>
87     </tr>
88   <% end %>
89   
90     <tr>
91       <th colspan="5">小計</th>
92         <td><%=h number_with_delimiter(@order_delivery.subtotal) %>円</td>
93     </tr>
94   
95   <% unless @order_delivery.discount.blank? %>
96     <tr>
97       <th colspan="5">値引</th>
98         <td><%=h number_with_delimiter(@order_delivery.discount) || 0 %>円</td>
99     </tr>
100   <% end %>
101   
102     <tr>
103        <th colspan="5">送料</th>
104          <td><%=h number_with_delimiter(@order_delivery.deliv_fee) %>円</td>
105     </tr>
106     <tr>
107       <th colspan="5">手数料</th>
108         <td><%=h number_with_delimiter(@order_delivery.charge) %>円</td>
109     </tr>
110     <tr>
111       <th colspan="5">合計</th>
112         <td><%=h number_with_delimiter(@order_delivery.total) %>円</td>
113     </tr>
114   
115   <% unless @order_delivery.use_point.blank? %>
116     <tr>
117       <th colspan="5">使用ポイント</th>
118         <td><%=h number_with_delimiter(@order_delivery.use_point) %>ポイント</td>
119     </tr>
120   <% end %>
121   
122   <% unless @order_delivery.add_point.blank? %>
123     <tr>
124       <th colspan="5">追加ポイント</th>
125         <td><%=h number_with_delimiter(@order_delivery.add_point) %>ポイント</td>
126     </tr>
127   <% end %>
128   
129     <tr>
130       <th colspan="5">お支払い合計</th>
131         <td><%=h number_with_delimiter(@order_delivery.payment_total) %>円</td>
132     </tr>
133   </table>
134 </div>