Sha256: 6232cffc337f09604448ad3ce1514963fc105c4ecad32e8f14e42ed304d29cff

Contents?: true

Size: 1.59 KB

Versions: 6

Compression:

Stored size: 1.59 KB

Contents

- unless @payments.empty?
  .table
    %table.table.table-hover
      %thead
        %tr
          %th= t('tienda.orders.id')
          %th= t('tienda.orders.type')
          %th= t('tienda.orders.method')
          %th= t('tienda.orders.reference')
          %th= t('tienda.orders.amount')
          %th= t('tienda.orders.refunded?')
          %th
      %tbody
        - for payment in @payments
          %tr
            %td= payment.id
            %td
              = payment.refund? ? t('tienda.orders.refund') : t('tienda.orders.payment')
              %span.float-right= boolean_tag payment.confirmed?
            %td= payment.method
            %td= link_to_if payment.transaction_url, payment.reference, payment.transaction_url

            - if payment.refund?
              %td{:colspan => 2}
                %b= number_to_currency payment.amount
                - if payment.parent_payment_id
                  #{t('tienda.orders.from_payment')} ##{payment.parent_payment_id}
            - else
              %td= number_to_currency payment.amount
              %td= boolean_tag payment.refunded?, nil, true_text: number_to_currency(payment.amount_refunded)
            %td.refund
              - if payment.refundable?
                = link_to t('tienda.orders.refund'), [:refund, @order, payment], class: 'btn btn-danger btn-sm', rel: 'dialog'
              - else
                = link_to t('tienda.delete'), [@order, payment], class: 'btn btn-danger btn-sm', data: {confirm: t('tienda.orders.payment_remove_confirmation') }, method: :delete
- else
  .alert.alert-warning
    = t('tienda.orders.no_payments')

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tienda-2.1.3 app/views/tienda/orders/_payments_table.html.haml
tienda-2.1.2 app/views/tienda/orders/_payments_table.html.haml
tienda-2.1.1 app/views/tienda/orders/_payments_table.html.haml
tienda-2.1.0 app/views/tienda/orders/_payments_table.html.haml
tienda-2.0.2 app/views/tienda/orders/_payments_table.html.haml
tienda-2.0.1 app/views/tienda/orders/_payments_table.html.haml