Compare commits
2 commits
d648f1bd55
...
043eccf167
| Author | SHA1 | Date | |
|---|---|---|---|
| 043eccf167 | |||
| 683c81bc76 |
2 changed files with 6 additions and 4 deletions
|
|
@ -187,9 +187,11 @@ class GroupOrderInvoicePdf < RenderPdf
|
|||
index = 0
|
||||
supplier_headlines = []
|
||||
group_order_articles.group_by { |goa| goa.group_order.order.supplier.name }.each do |supplier_name, articles|
|
||||
if articles.map(&:result).sum > 0
|
||||
data << [supplier_name, "", "", "", "", ""]
|
||||
index += 1
|
||||
supplier_headlines << index
|
||||
end
|
||||
|
||||
articles.each do |goa|
|
||||
next if goa.result.to_i == 0
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class OrdergroupInvoice < ApplicationRecord
|
|||
#how to define one order?
|
||||
|
||||
invoice_data[:pickup] = order.pickup
|
||||
invoice_data[:supplier] = order.supplier&.name
|
||||
invoice_data[:supplier] = FoodsoftConfig[:name]
|
||||
invoice_data[:ordergroup] = group_orders.first.ordergroup
|
||||
invoice_data[:group_order_ids] = group_orders.pluck(:id)
|
||||
invoice_data[:invoice_number] = invoice_number
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue