From 7f1fc56f789cccb2fa49a6f42c0e27ea1fbd0856 Mon Sep 17 00:00:00 2001 From: Steve Pettitt Date: Wed, 4 May 2016 07:58:23 +0100 Subject: [PATCH] Change to use total rather than display_total (which returns a Spree::Money object) --- app/mailers/producer_mailer.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/mailers/producer_mailer.rb b/app/mailers/producer_mailer.rb index d65d722894..52decf5d8a 100644 --- a/app/mailers/producer_mailer.rb +++ b/app/mailers/producer_mailer.rb @@ -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