% allow_return_item_changes = !@return_authorization.customer_returned_items? %>
<% if allow_return_item_changes %> <%= check_box_tag 'select-all' %> <% end %> | <%= Spree::Product.model_name.human %> | <%= Spree::ReturnAuthorization.human_attribute_name(:state) %> | <%= Spree::ReturnItem.human_attribute_name(:charged) %> | <%= Spree::ReturnItem.human_attribute_name(:amount) %> | <%= Spree::ReimbursementType.model_name.human %> | <%= Spree::ReturnItem.human_attribute_name(:exchange_variant) %> | <%= Spree::ReturnItem.human_attribute_name(:return_reason) %> |
---|---|---|---|---|---|---|---|
<% if editable %> <%= item_fields.hidden_field :inventory_unit_id %> <%= item_fields.check_box :_destroy, {checked: return_item.persisted?, class: 'add-item', "data-price" => return_item.amount}, '0', '1' %> <% end %> |
<%= inventory_unit.variant.name %>
|
<%= Spree.t(inventory_unit.state, scope: :inventory_states) %> | <%= return_item.display_amount %> | <% if editable %> <%= item_fields.text_field :amount, { class: 'refund-amount-input' } %> <% else %> <%= return_item.display_amount %> <% end %> | <% if editable %> <%= item_fields.select :preferred_reimbursement_type_id, @reimbursement_types.collect{|r|[r.name.humanize, r.id]}, {include_blank: true}, {class: 'custom-select fullwidth'} %> <% else %> <%= return_item.preferred_reimbursement_type.try(:name) %> <% end %> | <% if editable %> <%= item_fields.collection_select :exchange_variant_id, return_item.eligible_exchange_variants(@stock_locations), :id, :exchange_name, { include_blank: true }, { class: "custom-select fullwidth return-item-exchange-selection" } %> <% elsif return_item.exchange_processed? %> <%= return_item.exchange_variant.exchange_name %> <% end %> | <% if editable %> <%= item_fields.select :return_reason_id, @reasons.collect{|r|[r.name, r.id]}, {include_blank: true}, {class: 'custom-select fullwidth'} %> <% else %> <%= return_item.return_reason.try(:name) %> <% end %> |