fixed foc

This commit is contained in:
NyanLinHtut
2019-11-18 15:48:35 +06:30
parent 5702819b8b
commit 8638a53f12
2 changed files with 15 additions and 15 deletions

View File

@@ -23,8 +23,8 @@ class InventoryDefinition < ApplicationRecord
end
end
def self.find_product_in_inventory(item,instance_code)
# unless instance_code.empty?
def self.find_product_in_inventory(item)
# unless instance_code.nil?
# instance_code = instance_code.to_s
# instance_code[0] = ""
# instance_code = instance_code.chomp("]")
@@ -33,8 +33,9 @@ class InventoryDefinition < ApplicationRecord
# end
#
# if prod = InventoryDefinition.where("item_code IN(#{instance_code})")
# puts "found prodcut+++++++++++++++++++++++++++++++++++==="
# puts prod.to_json
# if stock_check_item = StockCheckItem.where("item_code IN(#{instance_code})")
# return true, prod
# end
# end
if product = InventoryDefinition.find_by_item_code(item.item_instance_code)