commission update -> change route under settings
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
class CreateCommissioners < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :commissioners do |t|
|
||||
t.string :name, :null => false
|
||||
t.string :emp_id
|
||||
t.string :created_by
|
||||
t.string :commission_type
|
||||
t.boolean :is_active
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,16 +0,0 @@
|
||||
class CreateProductCommissions < ActiveRecord::Migration[5.1]
|
||||
# rake db:migrate:down VERSION=20170823034141
|
||||
def change
|
||||
create_table :product_commissions do |t|
|
||||
t.string :product_id
|
||||
t.integer :commission_id
|
||||
t.integer :commissioner_id
|
||||
t.decimal :qty, :precision => 10, :scale => 2, :default => 0.00
|
||||
t.string :sale_id
|
||||
t.string :sale_item_id
|
||||
t.decimal :price, :precision => 10, :scale => 2, :default => 0.00
|
||||
t.decimal :amount, :precision => 10, :scale => 2, :default => 0.00
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
17
db/migrate/20170825034141_create_product_commissions.rb
Normal file
17
db/migrate/20170825034141_create_product_commissions.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
class CreateProductCommissions < ActiveRecord::Migration[5.1]
|
||||
# rake db:migrate:down VERSION=20170825034141
|
||||
def change
|
||||
create_table :product_commissions do |t|
|
||||
t.string :product_type
|
||||
t.string :product_code
|
||||
t.integer :commission_id
|
||||
t.integer :commissioner_id
|
||||
t.decimal :qty, precision: 10, scale: 2, default: 0.00
|
||||
t.string :sale_id
|
||||
t.string :sale_item_id
|
||||
t.decimal :price, precision: 10, scale: 2, default: 0.00
|
||||
t.decimal :amount, precision: 10, scale: 2, default: 0.00
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
15
db/migrate/20170825090115_create_commissioners.rb
Normal file
15
db/migrate/20170825090115_create_commissioners.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class CreateCommissioners < ActiveRecord::Migration[5.1]
|
||||
# rake db:migrate:down VERSION=20170825090115
|
||||
def change
|
||||
create_table :commissioners do |t|
|
||||
t.string :name
|
||||
t.string :emp_id
|
||||
t.string :created_by
|
||||
t.integer :commission_id
|
||||
t.datetime :joined_date
|
||||
t.datetime :resigned_date
|
||||
t.boolean :is_active, default: true
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,10 +1,12 @@
|
||||
class CreateCommissions < ActiveRecord::Migration[5.1]
|
||||
# rake db:migrate:down VERSION=20170825093252
|
||||
def change
|
||||
create_table :commissions do |t|
|
||||
t.integer :product_id, null: false
|
||||
t.integer :amount
|
||||
t.string :product_type
|
||||
t.string :product_code
|
||||
t.string :commission_type
|
||||
t.boolean :is_active
|
||||
t.integer :amount
|
||||
t.boolean :is_active, default: true
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user