mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-07 22:46:06 +00:00
Change to use total rather than display_total (which returns a Spree::Money object)
This commit is contained in:
@@ -46,12 +46,11 @@ class ProducerMailer < Spree::BaseMailer
|
||||
else
|
||||
lis[li.variant] = li
|
||||
end
|
||||
|
||||
lis
|
||||
end
|
||||
end
|
||||
|
||||
def total_from_line_items(aggregated_line_items)
|
||||
Spree::Money.new(aggregated_line_items.values.map(&:display_amount).reduce(:+)).to_s
|
||||
Spree::Money.new(aggregated_line_items.values.map(&:total).reduce(:+)).to_s
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user