Merge pull request #9268 from jibees/9267-Wrong-report-when-selecting-multiple-shops

Split orders across several shops of same order cycle instead of aggregating in several Orders and Fulfilment reports
This commit is contained in:
Rachel Arnould
2022-06-09 18:03:13 +02:00
committed by GitHub
4 changed files with 6 additions and 18 deletions

View File

@@ -21,6 +21,12 @@ module Reporting
report_line_items.orders
end
def query_result
report_line_items.list(line_item_includes).group_by { |e|
[e.variant_id, e.price, e.order.distributor_id]
}.values
end
private
def order_permissions

View File

@@ -44,12 +44,6 @@ module Reporting
variant: [{ option_values: :option_type }, { product: :supplier }]
}]
end
def query_result
report_line_items.list(line_item_includes).group_by { |e|
[e.variant_id, e.price]
}.values
end
end
end
end

View File

@@ -35,12 +35,6 @@ module Reporting
def line_item_includes
[{ variant: [{ option_values: :option_type }, { product: :supplier }] }]
end
def query_result
report_line_items.list(line_item_includes).group_by { |e|
[e.variant_id, e.price]
}.values
end
end
end
end

View File

@@ -42,12 +42,6 @@ module Reporting
[{ order: :distributor,
variant: [{ option_values: :option_type }, { product: :supplier }] }]
end
def query_result
report_line_items.list(line_item_includes).group_by { |e|
[e.variant_id, e.price]
}.values
end
end
end
end