Files
openfoodnetwork/app/helpers/admin/orders_helper.rb
2019-04-03 11:15:54 +11:00

14 lines
422 B
Ruby

module Admin
module OrdersHelper
# Adjustments to display under "Order adjustments".
#
# We exclude shipping method adjustments because they are displayed in a
# separate table together with the order line items.
def order_adjustments_for_display(order)
order.adjustments.eligible.select do |adjustment|
adjustment.originator_type != "Spree::ShippingMethod"
end
end
end
end