mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix two sum calls in checkout helper
This commit is contained in:
@@ -26,7 +26,7 @@ module CheckoutHelper
|
||||
|
||||
def display_checkout_admin_and_handling_adjustments_total_for(order)
|
||||
adjustments = order.adjustments.eligible.where('originator_type = ? AND source_type != ? ', 'EnterpriseFee', 'Spree::LineItem')
|
||||
Spree::Money.new adjustments.sum(&:amount), currency: order.currency
|
||||
Spree::Money.new adjustments.sum(:amount), currency: order.currency
|
||||
end
|
||||
|
||||
def checkout_line_item_adjustments(order)
|
||||
@@ -34,7 +34,7 @@ module CheckoutHelper
|
||||
end
|
||||
|
||||
def checkout_subtotal(order)
|
||||
order.item_total + checkout_line_item_adjustments(order).sum(&:amount)
|
||||
order.item_total + checkout_line_item_adjustments(order).sum(:amount)
|
||||
end
|
||||
|
||||
def display_checkout_subtotal(order)
|
||||
|
||||
Reference in New Issue
Block a user