Fix missing stock group orders in PDFs

This commit is contained in:
Patrick Gansterer 2020-02-25 01:16:24 +01:00
parent 739914ad43
commit b45e48e4c9

View file

@ -73,7 +73,7 @@ class OrderPdf < RenderPDF
group('groups.id'). group('groups.id').
offset(offset). offset(offset).
limit(limit). limit(limit).
pluck('groups.name', 'SUM(group_orders.price)', 'groups.id') pluck('groups.name', 'SUM(group_orders.price)', 'ordergroup_id')
result.map do |item| result.map do |item|
[item.first || stock_ordergroup_name] + item[1..-1] [item.first || stock_ordergroup_name] + item[1..-1]