%table#subscription-line-items.admin-subscription-form-subscription-line-items
  %colgroup
    %col{:style => "width: 49%;"}/
    %col{:style => "width: 14%;"}/
    %col{:style => "width: 10%;"}/
    %col{:style => "width: 14%;"}/
    %col{:style => "width: 8%;"}/
  %thead
    %tr
      %th= t(:item_description)
      %th.price= t(:price)
      %th.quantity= t(:qty)
      %th.total
        %span= t(:total)
      %th.orders-actions.actions
  %tbody
    %tr.item{ id: "sli_{{$index}}", ng: { repeat: "item in subscription.subscription_line_items | filter:{ _destroy: '!true' }", class: { even: 'even', odd: 'odd' } } }
      %td
        .description {{ item.description }}
        .not-in-open-and-upcoming-order-cycles-warning{ ng: { if: '!item.in_open_and_upcoming_order_cycles' } }
          = t(".not_in_open_and_upcoming_order_cycles_warning")
      %td.price.align-center {{ item.price_estimate | localizeCurrency }}
      %td.quantity
        %input{ name: 'quantity', type: 'number', min: 0, ng: { model: 'item.quantity' } }
      %td.total.align-center {{ (item.price_estimate * item.quantity) | localizeCurrency }}
      %td.actions
        %a.delete-item.icon-trash.no-text{ ng: { click: 'removeSubscriptionLineItem(item)'}, :href => "javascript:void(0)" }
  %tbody#subtotal.no-border-top{"data-hook" => "admin_order_form_subtotal"}
    %tr#subtotal-row
      %td{:colspan => "3"}
        %b
          = t(:subtotal)
          \:
      %td.total.align-center
        %span#order_subtotal {{ subscription.estimatedSubtotal() | localizeCurrency }}
      %td.actions
  %tbody#fees.no-border-top{ ng: { show: "subscription.estimatedFees() > 0" } }
    %tr#fees-row
      %td{:colspan => "3"}
        %b
          = t(:fees)
          \:
      %td.total.align-center
        %span#order_fees {{ subscription.estimatedFees() | localizeCurrency }}
      %td.actions
  %tbody#order-total.grand-total.no-border-top{"data-hook" => "admin_order_form_total"}
    %tr
      %td{:colspan => "3"}
        %b
          = t(:order_total_price)
          \:
      %td.total.align-center
        %span#order_form_total {{ subscription.estimatedTotal() | localizeCurrency }}
      %td.actions
%p.notice
  = t ".this_is_an_estimate"
