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:
parent
6e4b9696a2
commit
e0c0834690
2 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ class OrderByArticles < OrderPdf
|
||||||
next unless rows.length > 1
|
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.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|
|
nice_table name, rows, dimrows do |table|
|
||||||
table.column(0).width = bounds.width / 2
|
table.column(0).width = bounds.width / 2
|
||||||
table.columns(1..-1).align = :right
|
table.columns(1..-1).align = :right
|
||||||
|
|
|
@ -25,7 +25,7 @@ class OrderByGroups < OrderPdf
|
||||||
each_group_order_article_for_ordergroup(oa_id) do |goa|
|
each_group_order_article_for_ordergroup(oa_id) do |goa|
|
||||||
dimrows << rows.length if goa.result == 0
|
dimrows << rows.length if goa.result == 0
|
||||||
rows << [goa.order_article.article.name,
|
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_quantity_with_tolerance(goa),
|
||||||
group_order_article_result(goa),
|
group_order_article_result(goa),
|
||||||
order_article_price_per_unit(goa.order_article),
|
order_article_price_per_unit(goa.order_article),
|
||||||
|
|
Loading…
Reference in a new issue