Merge branch 'august_spring' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
10
db/migrate/20170824110103_create_inventory_definitions.rb
Normal file
10
db/migrate/20170824110103_create_inventory_definitions.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateInventoryDefinitions < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :inventory_definitions do |t|
|
||||
t.string :item_code
|
||||
t.integer :min_order_level, :default => 0
|
||||
t.integer :max_stock_level, :default => 0
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
15
db/migrate/20170824110117_create_stock_journals.rb
Normal file
15
db/migrate/20170824110117_create_stock_journals.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class CreateStockJournals < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :stock_journals do |t|
|
||||
t.string :item_code, :null => false
|
||||
t.integer :inventory_definition_id, :null => false
|
||||
t.integer :credit, :default => 0
|
||||
t.integer :debit, :default => 0
|
||||
t.integer :balance, :default => 0
|
||||
t.string :remark
|
||||
t.string :trans_ref, :null => false
|
||||
t.string :trans_type
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
11
db/migrate/20170824110125_create_stock_checks.rb
Normal file
11
db/migrate/20170824110125_create_stock_checks.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateStockChecks < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :stock_checks do |t|
|
||||
t.integer :check_by
|
||||
t.datetime :check_start
|
||||
t.datetime :check_end
|
||||
t.string :reason
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
14
db/migrate/20170824110130_create_stock_check_items.rb
Normal file
14
db/migrate/20170824110130_create_stock_check_items.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class CreateStockCheckItems < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :stock_check_items do |t|
|
||||
t.integer :stock_check_id, :null => false
|
||||
t.string :item_code, :null => false
|
||||
t.integer :stock_count, :default => 0
|
||||
t.integer :stock_journal_id
|
||||
t.integer :stock_balance
|
||||
t.integer :different
|
||||
t.string :remark
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user