menu items

This commit is contained in:
Min Zeya Phyo
2017-05-29 15:27:22 +06:30
parent 08f993d621
commit de29de486f
22 changed files with 286 additions and 4 deletions

View File

@@ -6,6 +6,11 @@ class MenuItem < ApplicationRecord
default_scope { order('item_code asc') }
def self.collection
MenuItem.select("id, name").map { |e| [e.name, e.id] }
end
def self.search_by_item_code(item_code)
menu_item_hash = Hash.new
mt_instance = MenuItemInstance.find_by_item_instance_code(item_code)