promotions product issue and membership setting checked
This commit is contained in:
@@ -103,9 +103,10 @@ class Settings::PromotionsController < ApplicationController
|
||||
arr_inst = []
|
||||
item_inst = MenuItemInstance.find_by_item_instance_code(params[:item_instance_code])
|
||||
if item_inst.nil?
|
||||
product = Product.where("item_code = ?",params[:item_instance_code]).pluck(:name,:item_code)
|
||||
res.push(product.name)
|
||||
res.push(product.item_code)
|
||||
product = Product.where("item_code = ?",params[:item_instance_code])
|
||||
product.each do |pdt|
|
||||
res.push({pdt.item_code => pdt.name})
|
||||
end
|
||||
else
|
||||
# menu_item = item_inst.menu_item.pluck(:name,:item_code)
|
||||
# res.push(item_inst.item_instance_name)
|
||||
|
||||
Reference in New Issue
Block a user