discount updated

This commit is contained in:
Yan
2017-06-21 20:30:12 +06:30
parent e3b3ff76b2
commit 2525bfbdd9
6 changed files with 331 additions and 82 deletions

View File

@@ -7,7 +7,7 @@ class CreateOrderItems < ActiveRecord::Migration[5.1]
t.string :item_order_by #person who order this
t.string :item_code, :null => false
t.string :item_name, :null => false
t.integer :account, :limit => 8, :null => false, :default => 1
t.integer :account_id, :limit => 8, :null => false, :default => 1
t.decimal :qty, :precision => 10, :scale => 2, :null => false, :default => 0.00
t.decimal :price, :precision => 10, :scale => 2, :null => false, :default => 0.00
t.string :remark

View File

@@ -5,7 +5,7 @@ class CreateSaleItems < ActiveRecord::Migration[5.1]
t.string :sale_id, foreign_key: true, :limit => 16
t.string :product_code, :null => false
t.string :product_name, :null => false
t.integer :account, :limit => 8, :null => false, :default => 1
t.integer :account_id, :limit => 8, :null => false, :default => 1
t.string :remark
t.decimal :qty, :precision => 10, :scale => 2, :null => false, :default => 0.00
t.decimal :unit_price, :precision => 10, :scale => 2, :null => false, :default => 0.00