mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Adapt more & and no & when using sum
This commit is contained in:
@@ -37,13 +37,13 @@
|
||||
%td
|
||||
#{raw(product_and_full_name)}
|
||||
%td.text-right
|
||||
#{line_items.sum(:quantity)}
|
||||
#{line_items.sum(&:quantity)}
|
||||
%td.text-right
|
||||
#{line_items.first.single_money}
|
||||
%td.text-right
|
||||
#{Spree::Money.new(line_items.sum(&:total), currency: line_items.first.currency) }
|
||||
%td.tax.text-right
|
||||
#{Spree::Money.new(line_items.sum(:included_tax), currency: line_items.first.currency) }
|
||||
#{Spree::Money.new(line_items.sum(&:included_tax), currency: line_items.first.currency) }
|
||||
%tr.total-row
|
||||
%td
|
||||
%td
|
||||
|
||||
@@ -13,7 +13,7 @@ Orders summary
|
||||
= t :producer_mail_order_text
|
||||
\
|
||||
- @grouped_line_items.each_pair do |product_and_full_name, line_items|
|
||||
#{line_items.first.variant.sku} - #{raw(line_items.first.product.supplier.name)} - #{raw(product_and_full_name)} (QTY: #{line_items.sum(:quantity)}) @ #{line_items.first.single_money} = #{Spree::Money.new(line_items.sum(&:total), currency: line_items.first.currency)}
|
||||
#{line_items.first.variant.sku} - #{raw(line_items.first.product.supplier.name)} - #{raw(product_and_full_name)} (QTY: #{line_items.sum(&:quantity)}) @ #{line_items.first.single_money} = #{Spree::Money.new(line_items.sum(&:total), currency: line_items.first.currency)}
|
||||
\
|
||||
\
|
||||
#{t :total}: #{@total}
|
||||
|
||||
Reference in New Issue
Block a user