current shop

This commit is contained in:
Nweni
2019-12-03 13:43:26 +06:30
parent 417d64ecae
commit e0b912bfa0
18 changed files with 98 additions and 111 deletions

View File

@@ -17,14 +17,15 @@ class Origami::FoodCourtController < ApplicationController
# @menus = Menu.all
# @menu = MenuCategory.active.where("menu_id =#{@menus[0].id}").order('order_by asc')
# end
@zone = Zone.all.where("shop_code='#{@shop.shop_code}' and is_active= true")
shop = Shop.current_shop
@zone = Zone.all.where("shop_code='#{shop.shop_code}' and is_active= true")
@customer = Customer.all
@tables = Table.all.active.where("shop_code='#{@shop.shop_code}'").order('status desc')
@rooms = Room.all.active.where("shop_code='#{@shop.shop_code}'").order('status desc')
@tables = Table.all.active.where("shop_code='#{shop.shop_code}'").order('status desc')
@rooms = Room.all.active.where("shop_code='#{shop.shop_code}'").order('status desc')
@cashier_type = "food_court"
#checked quick_service only
@quick_service_only = true
lookup_dine_in = Lookup.where("shop_code='#{@shop.shop_code}'").collection_of('dinein_cashier')
lookup_dine_in = Lookup.where("shop_code='#{shop.shop_code}'").collection_of('dinein_cashier')
if !lookup_dine_in.empty?
lookup_dine_in.each do |dine_in|
if dine_in[0].downcase == "dineincashier"