%table.index{"data-hook" => "invoices"}
  %thead{"data-hook" => "invoice_head"}
    %tr
      %th= "#{t('spree.date')}/#{t('spree.time')}"
      %th= t(:invoice_number)
      %th= t(:amount)
      %th= t(:status)
      %th= t(:invoice_file)
  %tbody
    - @order.invoices.each do |invoice|
      - tr_class = cycle('odd', 'even')
      - tr_id = spree_dom_id(invoice)
      %tr{:class => tr_class, "data-hook" => "invoice_row", :id => tr_id}
        %td.align-center.created_at
          = invoice.presenter.display_date
        %td.align-center.label
          = invoice.display_number
        %td.align-center.label
          = invoice.presenter.total
        %td.align-center.label
          = t(invoice.cancelled ? :cancelled : :active)
        %td.align-center.label
          =link_to(t(:download),print_admin_order_path(@order,invoice_id: invoice.id),target: "_blank")

