<%- locals = {:shipment_form => shipment_form} %> <% unless @shipment.order.cart? %> <%= hook :admin_shipment_form_inventory_units, locals do %> <% @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 returned).include?(inventory_unit.state)} %> <%= 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_id.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 %> <% end %> <%= hook :admin_shipment_form_address, locals do %> <% shipment_form.fields_for 'address' do |sa_form| %> <%= render :partial => 'admin/shared/address_form', :locals => {:f => sa_form, :name => t("shipping_address"), :use_billing => false} %> <% end %> <% end %> <%= hook :admin_shipment_form_details, locals do %> <% if Spree::Config[:shipping_instructions] %> <% 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] } %> <%= shipment_form.label :tracking, t('tracking') + ":" %> <%= shipment_form.text_field :tracking %>
<%= shipment_form.label :special_instructions, t('special_instructions') + ":" %> <%= shipment_form.text_area :special_instructions %>
<% end %>