item instance code add to sale_item
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user