<% unless @shipment.order.cart? %> <% @shipment.order.inventory_units.each do |inventory_unit| %> <% end %>
<%= t(:include_in_shipment) %> <%= t(:sku) %> <%= t(:item_description) %> <%= t(:status) %> <%= t(:note) %>
<%= check_box_tag "inventory_units[#{inventory_unit.id}]", :true, (inventory_unit.shipment == @shipment), { :disabled => %w(shipped backordered).include?(inventory_unit.state), :class => 'inventory_unit'} %> <%= inventory_unit.variant.sku %> <%=inventory_unit.variant.product.name %> <%= '(' + variant_options(inventory_unit.variant) + ')' unless inventory_unit.variant.option_values.empty? %> <%= t(inventory_unit.state) %> <% if inventory_unit.shipment == @shipment %> <%= t(:included_in_this_shipment) %> <% elsif !inventory_unit.shipment.nil? %> <%= t(:included_in_other_shipment) %> - <%= link_to inventory_unit.shipment.number, edit_admin_order_shipment_url(inventory_unit.order, inventory_unit.shipment) %> <% end %>
<% end %>
<% shipment_form.fields_for 'address' do |sa_form| %> <%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => sa_form, :name => t(:shipping_address), :use_billing => false } %> <% end %>
<%= t(:shipment_details) %>
<%= shipment_form.label :shipping_method_id, t(:shipping_method) + ':' %> <%= shipment_form.select :shipping_method_id, @shipping_methods.map {|sm| ["#{sm.name} - #{sm.zone.name}", sm.id] }, {}, {:class => 'select2 fullwidth'} %>
<%= shipment_form.label :tracking, t(:tracking) + ':' %> <%= shipment_form.text_field :tracking, :class => 'fullwidth' %>
<% if Spree::Config[:shipping_instructions] %>
<%= shipment_form.label :special_instructions, t(:special_instructions) + ':' %> <%= shipment_form.text_area :special_instructions, :class => 'fullwidth' %>
<% end %>