%table.order-summary{:width => "100%"}
  %thead
    %tr
      %th{align: "left"}
        %h4
          = t :email_order_summary_item
      %th{align: "left"}
        %h4
          = t :email_order_summary_sku
      %th{align: "right"}
        %h4
          = t :email_order_summary_quantity
      %th{align: "right", width: "25%"}
        %h4
          = t :email_order_summary_price
  %tbody
    - @order.line_items.sorted_by_name_and_unit_value.each do |item|
      %tr
        %td
          = render 'spree/shared/line_item_name', line_item: item
          %br
          %small
            %em= item.variant.supplier.name
        %td
          - if item.variant.sku.blank?
            \-
          - else
            = item.variant.sku
        %td{align: "right"}
          - if @changes && @changes[item.id].present?
            %del.quantity_was= @changes[item.id]
          = item.quantity
          -# Report changes made to subscriptions

        %td{align: "right"}
          = item.display_amount_with_adjustments
  %tfoot
    %tr
      %td{align: "right", colspan: "3"}
        = t :email_order_summary_subtotal
      %td{align: "right"}
        = display_checkout_subtotal(@order)
    - checkout_adjustments_for(@order, exclude: [:line_item]).reverse_each do |adjustment|
      %tr
        %td{align: "right", colspan: "3"}
          - if adjustment.originator_type == "Voucher"
            = t(:email_order_summary_voucher_label, code: adjustment.label)
          - else
            = "#{adjustment.label}:"
        %td{align: "right"}
          = adjustment.display_amount
    %tr
      %td{align: "right", colspan: "3"}
        %strong
          = t :email_order_summary_total
      %td{align: "right"}
        %strong= @order.display_total

    - if @order.total_tax > 0
      %tr
        %td{align: "right", colspan: "3"}
          = t :email_order_summary_includes_tax
        %td{align: "right"}
          = display_checkout_tax_total(@order)
%p &nbsp;
