check product account
This commit is contained in:
@@ -5,7 +5,7 @@ class Product < ApplicationRecord
|
|||||||
mount_uploader :image_path, ProductImageUploader
|
mount_uploader :image_path, ProductImageUploader
|
||||||
|
|
||||||
def self.search_by_product_code(item_code)
|
def self.search_by_product_code(item_code)
|
||||||
account = Account.where('title','like','%Product%').first()
|
account = Account.find_by_title('Product')
|
||||||
if !account.nil?
|
if !account.nil?
|
||||||
account_id = account.id
|
account_id = account.id
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user