<%= f.label :sku %> <%= f.text_field :sku, :class => 'fullwidth' %>
<%= f.label :track_inventory do %> <%= f.check_box :track_inventory %> <%= Spree::Variant.human_attribute_name(:track_inventory) %> <% end %>
<% if f.object.new_record? %>
<% @product.option_types.each_with_index do |option_type, index| %>
<%= label :new_variant, option_type.presentation %> <%= f.collection_select 'option_value_ids', option_type.option_values, :id, :presentation, { include_blank: true }, { name: 'variant[option_value_ids][]', class: "select2 fullwidth" } %>
<% end %>
<% end %>
<% [:weight, :height, :width, :depth].each_with_index do |field, index| %>
<%= f.label field %> <%= f.text_field field, value: number_with_precision(@variant.send(field), :precision => 2), class: 'fullwidth' %>
<% end %>

<%== t('.pricing_hint') %>

<%= f.label :price %> <%= f.text_field :price, :value => number_to_currency(@variant.price, :unit => ''), :class => 'fullwidth' %>
<% if show_rebuild_vat_checkbox? %>
<%= render "spree/admin/shared/rebuild_vat_prices_checkbox", form: f, model_name: "variant", wrapper_class: "field" %>
<% end %>
<%= f.label :cost_price %> <%= f.text_field :cost_price, :value => number_to_currency(@variant.cost_price, :unit => ''), :class => 'fullwidth' %>
<%= f.label :tax_category %> <%= f.field_hint :tax_category %> <%= f.collection_select :tax_category_id, @tax_categories, :id, :name, { :include_blank => t('.use_product_tax_category') }, { :class => 'select2 fullwidth' } %>