Second part of stock-integration.

Introduced StockArticle and a special page for ordering from stock. StockChanges will be created and the StockArticle.quantity
updated in 'order.close!'.
This commit is contained in:
Benjamin Meichsner 2009-02-06 16:26:35 +01:00
parent 1912a3fd80
commit c17b63b192
37 changed files with 616 additions and 340 deletions

View file

@ -46,6 +46,7 @@ ActiveRecord::Schema.define(:version => 20090119155930) do
t.datetime "updated_at"
t.decimal "quantity", :default => 0.0
t.datetime "deleted_at"
t.string "type"
end
add_index "articles", ["name", "supplier_id"], :name => "index_articles_on_name_and_supplier_id"
@ -212,8 +213,8 @@ ActiveRecord::Schema.define(:version => 20090119155930) do
create_table "stock_changes", :force => true do |t|
t.integer "delivery_id"
t.integer "order_id"
t.integer "article_id"
t.decimal "quantity", :precision => 6, :scale => 2, :default => 0.0
t.integer "stock_article_id"
t.decimal "quantity", :default => 0.0
t.datetime "created_at"
end