|
|
@@ -9,10 +9,10 @@ class OrderDetail < ActiveRecord::Base
|
|
|
validate :order_validation
|
|
|
after_create :import_orders
|
|
|
def before_import_save(record)
|
|
|
- pd = Product.where("id = ?", record.product_id).first
|
|
|
- pd = Product.where("id = ?", record.product_id).first
|
|
|
- pd = Product.where("id = ?", record.product_id).first
|
|
|
- pd = Product.where("id = ?", record.product_id).first
|
|
|
+ pd = Product.where("id = ?", record[:product_id]).first
|
|
|
+ pd = Product.where("id = ?", record[:product_id]).first
|
|
|
+ pd = Product.where("id = ?", record[:product_id]).first
|
|
|
+ pd = Product.where("id = ?", record[:product_id]).first
|
|
|
end
|
|
|
|
|
|
def import_orders
|