mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Make code work for relations and arrays
This commit is contained in:
@@ -180,11 +180,11 @@ module OpenFoodNetwork
|
||||
end
|
||||
|
||||
def total_untaxable_products(order)
|
||||
order.line_items.without_tax.sum(&:amount)
|
||||
order.line_items.without_tax.to_a.sum(&:amount)
|
||||
end
|
||||
|
||||
def total_taxable_products(order)
|
||||
order.line_items.with_tax.sum(&:amount)
|
||||
order.line_items.with_tax.to_a.sum(&:amount)
|
||||
end
|
||||
|
||||
def total_untaxable_fees(order)
|
||||
|
||||
Reference in New Issue
Block a user