product commission transaction in commissioner

This commit is contained in:
Zin Lin Phyo
2017-08-28 18:17:22 +06:30
parent 36b4b15688
commit 1cbea173df
17 changed files with 460 additions and 350 deletions

View File

@@ -4,7 +4,7 @@ class CreateProductCommissions < ActiveRecord::Migration[5.1]
create_table :product_commissions do |t|
t.string :product_type
t.string :product_code
t.integer :commission_id
t.string :commission_id
t.integer :commissioner_id
t.decimal :qty, precision: 10, scale: 2, default: 0.00
t.string :sale_id

View File

@@ -5,7 +5,7 @@ class CreateCommissioners < ActiveRecord::Migration[5.1]
t.string :name
t.string :emp_id
t.string :created_by
t.integer :commission_id
t.string :commission_id
t.datetime :joined_date
t.datetime :resigned_date
t.boolean :is_active, default: true

View File

@@ -1,7 +1,9 @@
class CreateCommissions < ActiveRecord::Migration[5.1]
# rake db:migrate:down VERSION=20170825093252
def change
create_table :commissions do |t|
create_table :commissions, id: false do |t|
t.string :commission_id, limit: 16, primary_key: true # custom primary key
t.string :product_type
t.string :product_code
t.string :commission_type