Show stockorder in PDFs

When generating a PDF, which contains a order from a supplier and stock,
we want show that some articles are from stock instead of showing the
original supplier, since the people want to know where to look for their
products during pickup.
This commit is contained in:
Patrick Gansterer 2021-02-08 01:05:29 +01:00
parent 6e4b9696a2
commit e0c0834690
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class OrderByArticles < OrderPdf
next unless rows.length > 1
name = "#{order_article.article.name} (#{order_article.article.unit} | #{order_article.price.unit_quantity} | #{number_to_currency(order_article.price.fc_price)})"
name += " #{order_article.article.supplier.name}" if @options[:show_supplier]
name += " #{order_article.order.name}" if @options[:show_supplier]
nice_table name, rows, dimrows do |table|
table.column(0).width = bounds.width / 2
table.columns(1..-1).align = :right

View File

@ -25,7 +25,7 @@ class OrderByGroups < OrderPdf
each_group_order_article_for_ordergroup(oa_id) do |goa|
dimrows << rows.length if goa.result == 0
rows << [goa.order_article.article.name,
goa.order_article.article.supplier.name,
goa.group_order.order.name,
group_order_article_quantity_with_tolerance(goa),
group_order_article_result(goa),
order_article_price_per_unit(goa.order_article),