mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
NOTE: Moved estimatedSubtotal and estimatedTotal functions to the new factory from the subscription line items controller
43 lines
1.6 KiB
Plaintext
43 lines
1.6 KiB
Plaintext
%table#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 }}
|
|
%td.price.align-center {{ item.price_estimate | currency }}
|
|
%td.quantity
|
|
%input{ name: 'quantity', type: 'number', min: 0, ng: { model: 'item.quantity' } }
|
|
%td.total.align-center {{ (item.price_estimate * item.quantity) | currency }}
|
|
%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 {{ subscription.estimatedSubtotal() | currency }}
|
|
%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() | currency }}
|
|
%td.actions
|