check oqs print

This commit is contained in:
Yan
2017-10-16 15:28:56 +06:30
parent 70c56b245e
commit cbefe0f7d8
2 changed files with 3 additions and 1 deletions

View File

@@ -28,7 +28,7 @@ class MenuItem < ApplicationRecord
MenuItem.select("id, name").map { |e| [e.name, e.id] }
end
# Work with item_code = item_instance_code
def self.search_by_item_code(item_code)
menu_item_hash = Hash.new
mt_instance = MenuItemInstance.find_by_item_instance_code(item_code)

View File

@@ -93,6 +93,7 @@ class Order < ApplicationRecord
return false
end
#Main Method - to update order / add items
def modify
@@ -108,6 +109,7 @@ class Order < ApplicationRecord
menu_item = MenuItem.search_by_item_code(item[:item_instance_code])
# For Product while item code not in menu item
if menu_item.nil?
menu_item = Product.search_by_product_code(item[:item_instance_code])
end