mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
36 lines
1.3 KiB
Plaintext
36 lines
1.3 KiB
Plaintext
%table.index
|
|
%thead
|
|
%tr
|
|
%th= "#{t('spree.date')}/#{t('spree.time')}"
|
|
%th= t(:description)
|
|
%th= t(:amount)
|
|
%th= t(:tax_category)
|
|
%th= t(:tax)
|
|
%th= t(:total_incl_tax)
|
|
%th.actions
|
|
%tbody
|
|
- @collection.each do |adjustment|
|
|
- @edit_url = edit_admin_order_adjustment_path(@order, adjustment)
|
|
- @delete_url = admin_order_adjustment_path(@order, adjustment)
|
|
- taxable = adjustment.adjustable_type == "Spree::Shipment" ? adjustment.adjustable : adjustment
|
|
- tr_class = cycle('odd', 'even')
|
|
- tr_id = spree_dom_id(adjustment)
|
|
%tr{:class => tr_class, :id => tr_id}
|
|
%td.align-center.created_at
|
|
= pretty_time(adjustment.created_at)
|
|
%td.align-center.label
|
|
= adjustment.label
|
|
%td.align-center.amount
|
|
= adjustment.display_amount.to_html
|
|
%td.align-center.tax-category
|
|
= taxable.tax_category&.name || "-"
|
|
%td.align-center.tax
|
|
= display_taxes(taxable)
|
|
%td.align-center.total
|
|
= display_total_with_tax(taxable)
|
|
- unless @order.canceled?
|
|
%td.actions
|
|
- if adjustment.originator_type.nil?
|
|
= link_to_edit adjustment, no_text: true
|
|
= link_to_delete adjustment, no_text: true
|