mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-06 22:36:07 +00:00
Only show Admin & Handling fees once on completed order form
This commit is contained in:
@@ -16,7 +16,7 @@ module CheckoutHelper
|
||||
enterprise_fee_adjustments = adjustments.select { |a| a.originator_type == 'EnterpriseFee' && a.source_type != 'Spree::LineItem' }
|
||||
adjustments.reject! { |a| a.originator_type == 'EnterpriseFee' && a.source_type != 'Spree::LineItem' }
|
||||
unless exclude.include? :admin_and_handling
|
||||
adjustments << Spree::Adjustment.new(label: 'Admin & Handling', amount: enterprise_fee_adjustments.sum(&:amount))
|
||||
adjustments << Spree::Adjustment.new(label: I18n.t(:orders_form_admin), amount: enterprise_fee_adjustments.sum(&:amount))
|
||||
end
|
||||
|
||||
adjustments
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
%span.order-total.distribution-total= display_checkout_admin_and_handling_adjustments_total_for(@order)
|
||||
%td
|
||||
|
||||
- checkout_adjustments_for(@order, exclude: [:line_item]).reject{ |a| a.amount == 0 }.reverse_each do |adjustment|
|
||||
- checkout_adjustments_for(@order, exclude: [:line_item, :admin_and_handling]).reject{ |a| a.amount == 0 }.reverse_each do |adjustment|
|
||||
%tr.order-adjustment
|
||||
%td.text-right{:colspan => "3"}
|
||||
= adjustment.label
|
||||
|
||||
@@ -1045,7 +1045,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
orders_edit_checkout: Checkout
|
||||
orders_form_empty_cart: "Empty cart"
|
||||
orders_form_subtotal: Produce subtotal
|
||||
orders_form_admin: Admin and handling
|
||||
orders_form_admin: Admin & Handling
|
||||
orders_form_total: Total
|
||||
orders_oc_expired_headline: Orders have closed for this order cycle
|
||||
orders_oc_expired_text: "Sorry, orders for this order cycle closed %{time} ago! Please contact your hub directly to see if they can accept late orders."
|
||||
|
||||
Reference in New Issue
Block a user