<% country = session[:zoned] && session[:zoned][:prd_country] %> <% country = country ? country.to_i : 0 %> <% c = Rails.application.config.commonCountriesForSelect.select {|e| e[1]==country} %> <% csel = (c.length == 1) %> <% if csel %> <%= f.field_container :cprice do %> <%= f.label :cprice, t(:country_price) %> *
(<%= t('country') + ": #{c[0][0]}" -%>)
<%= f.text_field :cprice, :value => number_with_precision( getCPrice(@product), precision: 2) %> <%= f.error_message_on :cprice %> <% end %> <% end %> <%= f.field_container :price do %> <%= f.label :price, t(:master_price) %> *
<%= f.text_field :price, :value => number_with_precision( @product.price, precision: 2) %> <%= f.error_message_on :price %> <% end %> <%= f.field_container :cost_price do %> <%= f.label :cost_price, t(:cost_price) %>
<%= f.text_field :cost_price, :value => number_with_precision( @product.cost_price, precision: 2) %> <%= f.error_message_on :cost_price %> <% end %> <%= f.field_container :available_on do %> <%= f.label :available_on, t(:available_on) %>
<%= f.error_message_on :available_on %> <%= f.text_field :available_on, :class => 'datepicker' %> <% end %> <% unless @product.has_variants? %> <%= f.field_container :sku do %> <%= f.label :sku, t(:sku) %>
<%= f.text_field :sku, :size => 16 %> <% end %> <% if Spree::Config[:track_inventory_levels] %> <%= f.field_container :on_hand do %> <%= f.label :on_hand, t(:on_hand) %>
<%= f.number_field :on_hand, :min => 0 %> <% end %> <% end %> <% end %> <%= f.field_container :shipping_categories do %> <%= f.label :shipping_category_id, t(:shipping_categories) %>
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :include_blank => true }, { 'style' => 'width:200px' }) %> <%= f.error_message_on :shipping_category %> <% end %> <%= f.field_container :tax_category do %> <%= f.label :tax_category_id, t(:tax_category) %>
<%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { :include_blank => true }, { 'style' => 'width:200px' }) %> <%= f.error_message_on :tax_category %> <% end %>