<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: 'Return Authorizations' } %> <% content_for :page_actions do %> <% if @order.shipments.any? &:shipped? %>
  • <% if can? :create, Spree::ReturnAuthorization %> <%= button_link_to t('spree.new_return_authorization'), new_admin_order_return_authorization_url(@order) %> <% end %>
  • <% end %> <% end %> <% admin_breadcrumb(plural_resource_name(Spree::ReturnAuthorization)) %> <% if @order.shipments.any?(&:shipped?) || @order.return_authorizations.any? %> <% @return_authorizations.each do |return_authorization| %> <% end %>
    <%= Spree::ReturnAuthorization.human_attribute_name(:number) %> <%= Spree::ReturnAuthorization.human_attribute_name(:state) %> <%= Spree::ReturnAuthorization.human_attribute_name(:total_excluding_vat) %> <%= Spree::ReturnAuthorization.human_attribute_name(:created_at) %>
    <%= return_authorization.number %> <%= t( return_authorization.state, scope: 'spree.return_authorization_states' ) %> <%= return_authorization.display_total_excluding_vat.to_html %> <%= pretty_time(return_authorization.created_at) %> <% if can? :update, return_authorization %> <%= link_to_edit return_authorization, no_text: true, class: 'edit' %> <% end %> <% if can?(:destroy, return_authorization) && !return_authorization.customer_returned_items? %> <%= link_to_delete return_authorization, no_text: true %> <% end %>
    <% else %>
    <%= t('spree.cannot_create_returns') %>
    <% end %>