mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Reports restore original columns ordering
This commit is contained in:
committed by
Jean-Baptiste Bellet
parent
89212736e9
commit
294f7c2fb5
@@ -13,8 +13,8 @@ module Reporting
|
||||
quantity: proc { |line_items| line_items.to_a.sum(&:quantity) },
|
||||
curr_cost_per_unit: proc { |line_items| line_items.first.price },
|
||||
total_cost: proc { |line_items| line_items.sum(&:amount) },
|
||||
shipping_method: proc { |line_items| line_items.first.order.shipping_method&.name },
|
||||
total_shipping_cost: proc { |_line_items| "" }
|
||||
total_shipping_cost: proc { |_line_items| "" },
|
||||
shipping_method: proc { |line_items| line_items.first.order.shipping_method&.name }
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ module Reporting
|
||||
producer: supplier_name,
|
||||
product: product_name,
|
||||
variant: variant_name,
|
||||
curr_cost_per_unit: proc { |line_items| line_items.first.price },
|
||||
quantity: proc { |line_items| line_items.sum(&:quantity) },
|
||||
total_units: proc { |line_items| total_units(line_items) },
|
||||
total_cost: proc { |line_items| line_items.sum(&:amount) },
|
||||
curr_cost_per_unit: proc { |line_items| line_items.first.price },
|
||||
total_cost: proc { |line_items| line_items.sum(&:amount) }
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ module Reporting
|
||||
producer: supplier_name,
|
||||
product: product_name,
|
||||
variant: variant_name,
|
||||
curr_cost_per_unit: proc { |line_items| line_items.first.price },
|
||||
hub: hub_name,
|
||||
quantity: proc { |line_items| line_items.to_a.sum(&:quantity) },
|
||||
curr_cost_per_unit: proc { |line_items| line_items.first.price },
|
||||
total_cost: proc { |line_items| line_items.sum(&:amount) },
|
||||
shipping_method: proc { |line_items| line_items.first.order.shipping_method&.name }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user