Complete refactoring of orders-workflow.

OrderResult tables are removed. Data consistency is now possible through new article.price-history (ArticlePrice).
Balancing-workflow needs to be updated.
This commit is contained in:
Benjamin Meichsner 2009-01-29 01:57:51 +01:00
parent 80287aeea4
commit 9eb2125f15
98 changed files with 1121 additions and 1717 deletions

View file

@ -41,12 +41,13 @@ pdf.text "Ansprechpartner: " + @order.supplier.contact_person
pdf.move_down 10
# Articles
data = @order.order_article_results.collect do |a|
[a.order_number, a.units_to_order, a.name,
a.unit_quantity, a.unit, a.net_price]
data = @order.order_articles.all(:include => :article).collect do |a|
[a.article.order_number, a.units_to_order, a.article.name,
a.price.unit_quantity, a.article.unit, a.price.price]
end
pdf.table data,
:font_size => 8,
:vertical_padding => 3,
:border_style => :grid,
:headers => ["BestellNr.", "Menge","Name", "Gebinde", "Einheit","Preis/Einheit"]
:headers => ["BestellNr.", "Menge","Name", "Gebinde", "Einheit","Preis/Einheit"],
:align => {0 => :left}