Files
openfoodnetwork/app/views/admin/standing_orders/_items.html.haml
Rob Harrington e661430cc9 StandingLineItems added to StandingOrder are saved
Adding some additional validation
2018-02-09 14:43:30 +11:00

43 lines
1.5 KiB
Plaintext

%table#standing-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.qty= t(:qty)
%th.total
%span= t(:total)
%th.orders-actions.actions
%tbody
%tr.item{ ng: { repeat: 'item in standingOrder.standing_line_items', class: { even: 'even', odd: 'odd' } } }
%td.description {{ item.description }}
%td.price.align-center {{ item.price_with_fees | currency }}
%td.qty
%input.qty{ name: 'quantity', type: 'number', min: 0, ng: { model: 'item.quantity' } }
%td.total.align-center {{ (item.price_with_fees * item.quantity) | currency }}
%td.actions
%a.delete-resource.icon_link.with-tip.icon-trash.no-text{ data: { confirm: "Are you sure?" }, :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 {{ 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 {{ estimatedTotal() | currency }}
%td.actions