item instance code add to sale_item

This commit is contained in:
Yan
2017-09-04 15:10:26 +06:30
parent 008da6ee47
commit a4884c9bea
2 changed files with 2 additions and 0 deletions

View File

@@ -158,6 +158,7 @@ class Sale < ApplicationRecord
#pull
sale_item.product_code = item.item_code
sale_item.item_instance_code = item.item_instance_code
sale_item.product_name = item.item_name
sale_item.product_alt_name = item.alt_name
sale_item.account_id = item.account_id

View File

@@ -4,6 +4,7 @@ class CreateSaleItems < ActiveRecord::Migration[5.1]
t.string :sale_item_id, :limit => 16, :primary_key => true#custom primary key - to ensure consistence for cloud syncing
t.string :sale_id, foreign_key: true, :limit => 16
t.string :product_code, :null => false
t.string :item_instance_code
t.string :product_name, :null => false
t.string :product_alt_name, :null => false
t.integer :account_id, :limit => 8, :null => false, :default => 1