x_11_file_import_via_plugin #65

Open
flip wants to merge 65 commits from x_11_file_import_via_plugin into develop
Showing only changes of commit 285441cb4b - Show all commits

View file

@ -113,7 +113,7 @@ class OrderPdf < RenderPdf
# get quantity for each article and ordergroup
goa_records = group_order_articles(group_ids)
.group('group_order_articles.order_article_id, group_orders.ordergroup_id')
.pluck('group_order_articles.order_article_id', 'group_orders.ordergroup_id', 'SUM(COALESCE(group_order_articles.result, group_order_articles.quantity))')
.pluck('group_order_articles.order_article_id', 'group_orders.ordergroup_id', Arel.sql('SUM(COALESCE(group_order_articles.result, group_order_articles.quantity))'))
# transform the flat list of results in a hash (with the article as key), which contains an array for all ordergroups
results = goa_records.group_by(&:first).transform_values do |value|