add readme
This commit is contained in:
@@ -24,18 +24,18 @@ class InventoryDefinition < ApplicationRecord
|
||||
end
|
||||
|
||||
def self.find_product_in_inventory(item,instance_code)
|
||||
unless instance_code.empty?
|
||||
instance_code = instance_code.to_s
|
||||
instance_code[0] = ""
|
||||
instance_code = instance_code.chomp("]")
|
||||
else
|
||||
instance_code = '"0"'
|
||||
end
|
||||
|
||||
if prod = InventoryDefinition.where("item_code IN(#{instance_code})")
|
||||
puts "found prodcut+++++++++++++++++++++++++++++++++++==="
|
||||
puts prod.to_json
|
||||
end
|
||||
# unless instance_code.empty?
|
||||
# instance_code = instance_code.to_s
|
||||
# instance_code[0] = ""
|
||||
# instance_code = instance_code.chomp("]")
|
||||
# else
|
||||
# instance_code = '"0"'
|
||||
# end
|
||||
#
|
||||
# if prod = InventoryDefinition.where("item_code IN(#{instance_code})")
|
||||
# puts "found prodcut+++++++++++++++++++++++++++++++++++==="
|
||||
# puts prod.to_json
|
||||
# end
|
||||
|
||||
if product = InventoryDefinition.find_by_item_code(item.item_instance_code)
|
||||
if stock_check_item = StockCheckItem.find_by_item_code(item.item_instance_code)
|
||||
|
||||
Reference in New Issue
Block a user