<% payments.each do |payment| %> <% end %>
<%= Spree::Payment.human_attribute_name(:number) %> <%= "#{Spree.t('date')}/#{Spree.t('time')}" %> <%= Spree.t(:amount) %> <%= Spree.t(:payment_method) %> <%= Spree.t(:transaction_id) %> <%= Spree.t(:payment_state) %>
<%= link_to payment.number, spree.admin_order_payment_path(@order, payment) %> <%= pretty_time(payment.created_at) %> <%= payment.display_amount %> <%= payment_method_name(payment) %> <%= payment.transaction_id %> <%= Spree.t(payment.state, scope: :payment_states, default: payment.state.capitalize) %> <% payment.actions.each do |action| %> <% if action == 'credit' %> <%= link_to_with_icon('exit.svg', Spree.t(:refund), new_admin_order_payment_refund_path(@order, payment), no_text: true, class: "btn btn-outline-secondary btn-sm") if can?(:create, Spree::Refund) %> <% else %> <%= link_to_with_icon(action + '.svg', Spree.t(action), fire_admin_order_payment_path(@order, payment, e: action), method: :put, no_text: true, data: { action: action }, class: "btn btn-outline-secondary btn-sm") if can?(action.to_sym, payment) %> <% end %> <% end %>