<table class="data" cellspacing="1">
  <tr>
    <th>仕入先ID</th>
    <td>
      <%= h @supplier.id %>
    </td>
  </tr>  
  <tr>
    <th>仕入先名 <span class="pnt">※</span></th>
    <td>
      <%= confirm_tag :text_field, :supplier, :name, {:class=>"data_m",:style=>"ime-mode:active"} %> (上限50文字)
    </td>
  </tr> 
  <tr>
    <th>郵便番号 <span class="pnt">※</span></th>
    <td>
      〒 <%= confirm_tag :text_field, :supplier, :zipcode01, {:size => 10,:style=>"ime-mode:inactive"} %>－
      <%= confirm_tag :text_field, :supplier, :zipcode02, {:size => 10,:style=>"ime-mode:inactive"} %>
      <% unless params[:action] =~ /confirm/ && @supplier.errors.empty? %>
        <input name="zipcode_input" value="住所入力" onclick="address_by_zip('supplier_zipcode01','supplier_zipcode02', 'supplier_prefecture_name', 'supplier_address_city', 'supplier_address_detail', 'supplier_prefecture_id', 'admin/suppliers', '<%=h ActionController::Base.relative_url_root %>');" type="button" class="btn_s">
      <% end %>
    </td>
  </tr>
  <tr>
    <th>ご住所 <span class="pnt">※</span></th>
    <td>
      <% prefectures = Prefecture.find(:all, :order => "position").map {|p| [p.name, p.id]} %>
      <%= confirm_select(confirm_tag(:select, :supplier, :prefecture_id, prefectures), @supplier.prefecture_name, "supplier") %>
      <br/><br/>
      <%= confirm_tag :text_field, :supplier, :address_city, {:class=>"data_m",:style=>"ime-mode:active"} %><span> (上限100文字)</span><br/>
	      ※市区町村を入力(例：東京都渋谷区恵比寿西)<br />
      <br/>
      <%= confirm_tag :text_field, :supplier, :address_detail, {:class=>"data_m",:style=>"ime-mode:active"} %><span> (上限100文字)</span><br/>
	      ※番地、建物、マンション名などを入力(例：0-0-0)<br/>
    </td>
  </tr>
  <tr>
    <th>担当者名 <span class="pnt">※</span></th>
    <td>
      <%= confirm_tag :text_field, :supplier, :contact_name, {:class=>"data_m",:style=>"ime-mode:active"} %> (上限50文字)
    </td>
  </tr>
  <tr>
    <th>TEL <span class="pnt">※</span></th>
    <td>
      <%= confirm_tag :text_field, :supplier, :tel01, {:class=>"data_s",:style=>"ime-mode:inactive"} %>－
      <%= confirm_tag :text_field, :supplier, :tel02, {:class=>"data_s",:style=>"ime-mode:inactive"} %>－
      <%= confirm_tag :text_field, :supplier, :tel03, {:class=>"data_s",:style=>"ime-mode:inactive"} %>
    </td>
  </tr>
  <tr>
    <th>FAX</th>
    <td>
      <%= confirm_tag :text_field, :supplier, :fax01, {:class => "data_s",:style=>"ime-mode:inactive"} %>－
      <%= confirm_tag :text_field, :supplier, :fax02, {:class => "data_s",:style=>"ime-mode:inactive"} %>－
      <%= confirm_tag :text_field, :supplier, :fax03, {:class => "data_s",:style=>"ime-mode:inactive"} %>
    </td>
  </tr>
  <tr>
    <th>メールアドレス</th>
    <td><%= confirm_tag :text_field, :supplier, :email, {:class=>"data_m",:style=>"ime-mode:inactive"} %></td>
  </tr>
  <tr>
    <th>商品掛け率</th>
    <td>
      <%= confirm_tag :text_field, :supplier, :percentage, {:class=>"data_s",:style=>"ime-mode:inactive"} %> %(100分率)
    </td>
  </tr>
  <tr>
   <th>税額端数処理</th>
   <td><%= confirm_select(confirm_tag(:select, :supplier, :tax_rule, Supplier::TAX_RULE_NAMES.map{|a,b|[b,a]}), @supplier.tax_rule_label, "supplier") %></td>
  </tr>  
  <tr>
    <th>備考</th>
    <td>
      <%= confirm_tag :text_area, :supplier ,:free_comment, {:size=>"60x10",:style=>"ime-mode:active"} %>
    </td>
  </tr>  
</table>
<%= hidden_field_tag "id", params[:id] %>
