%table.order-summary{:width => "100%"}
  %thead
    %tr
      %th{:align => "left"}
        %h4= t(:invoice_column_item)
      %th{:align => "right", :width => "15%"}
        %h4= t(:invoice_column_qty)
      %th{:align => "right", :width => "15%"}
        %h4= @order.total_tax > 0 ? t(:invoice_column_tax) : ""
      %th{:align => "right", :width => "15%"}
        %h4= t(:invoice_column_price)
  %tbody
    - @order.line_items.sort_by{ |li| li.product.name }.each do |item|
      %tr
        %td
          = render 'spree/shared/line_item_name', line_item: item
          %br
          %small
            %em= raw(item.variant.product.supplier.name)
        %td{:align => "right"}
          = item.quantity
        %td{:align => "right"}
          = item.included_tax > 0 ? item.display_included_tax : ""
        %td{:align => "right"}
          = item.display_amount_with_adjustments
    - checkout_adjustments_for(@order, exclude: [:line_item]).reject{ |a| a.amount == 0 }.reverse_each do |adjustment|
      %tr
        %td
          %strong= "#{raw(adjustment.label)}"
        %td{:align => "right"}
          1
        %td{:align => "right"}
          = adjustment.included_tax > 0 ? adjustment.display_included_tax : ""
        %td{:align => "right"}
          = adjustment.display_amount
  %tfoot
    %tr
      %td{:align => "right", :colspan => "2"}
        %strong= t(:invoice_tax_total)
      %td{:align => "right", :colspan => "2"}
        %strong= display_checkout_tax_total(@order)
    %tr
      %td{:align => "right", :colspan => "2"}
        %strong= t(:total_excl_tax)
      %td{:align => "right", :colspan => "2"}
        %strong= display_checkout_total_less_tax(@order)
    %tr
      %td{:align => "right", :colspan => "2"}
        %strong= t(:total_incl_tax)
      %td{:align => "right", :colspan => "2"}
        %strong= @order.display_total
%p
  &nbsp;
