<%= render :partial => 'spree/admin/shared/stock_sub_menu' %> <%content_for :page_title do %> <%= "#{Spree.t(:editing_stock_transfer)} #{@stock_transfer.number}" %> <% end %> <% content_for :page_actions do %>
  • <%= button_link_to Spree.t(:back_to_stock_transfers_list), admin_stock_transfers_path, icon: 'arrow-left' %>
  • <%= button_link_to Spree.t(:ready_to_ship), '#', icon: 'truck', id: 'ready-to-ship-transfer-button' %>
  • <% end %>
    <%= Spree.t(:you_cannot_undo_action) %>
    <%= Spree.t('finalize_stock_transfer.will_cause') %>:
    <%= Spree.t(:are_you_sure_finalize_stock_transfer) %>
    <%= link_to Spree.t(:no_dont_finalize), '#', :id => 'cancel-finalize-link' %> <%= link_to Spree.t(:yes_finalize), finalize_admin_stock_transfer_path(@stock_transfer), { method: 'put' } %>
    <%= form_for [:admin, @stock_transfer] do |f| %>

    <%= @stock_transfer.created_by.email %>

    <%= f.field_container :description do %> <%= f.label nil, Spree.t(:description) %> <%= f.text_field :description, value: @stock_transfer.description, maxlength: 255, size: 0, class: 'fullwidth' %> <%= f.error_message_on :description %> <% end %> <%= f.field_container :destination_location do %> <%= f.label nil, Spree.t(:destination_location) %> <%= f.select :destination_location_id, options_from_collection_for_select(@destination_stock_locations, :id, :name, @stock_transfer.destination_location_id), {include_blank: true}, {class: 'select2 fullwidth', "data-placeholder" => Spree.t(:select_a_stock_location)} %> <%= f.error_message_on :destination_location %> <% end %>
    <%= button Spree.t('actions.save'), 'ok' %>
    <% end %>
    <%= Spree.t(:variant_to_add) %>
    <%= hidden_field_tag :stock_transfer_number, @stock_transfer.number %> <%= hidden_field_tag :variant_display_attributes, @variant_display_attributes.to_json %> <%= text_field_tag :transfer_item_variant_id, "", :class => "variant_autocomplete fullwidth" %>
    <%= Spree.t(:added) %> <%= render partial: 'transfer_item_table', locals: { transfer_items: @stock_transfer.transfer_items, show_expected: true, show_received: false, show_actions: true } %>