shop code
This commit is contained in:
@@ -17,7 +17,6 @@ class Foodcourt::FoodCourtController < ApplicationController
|
||||
# @menus = Menu.all
|
||||
# @menu = MenuCategory.active.where("menu_id =#{@menus[0].id}").order('order_by asc')
|
||||
# end
|
||||
shop = Shop.current_shop
|
||||
@zone = Zone.all.where("is_active= true")
|
||||
@customer = Customer.all
|
||||
@tables = Table.all.active.order('status desc')
|
||||
@@ -40,7 +39,7 @@ class Foodcourt::FoodCourtController < ApplicationController
|
||||
.joins("JOIN orders ON orders.order_id=booking_orders.order_id")
|
||||
.joins("JOIN order_items ON orders.order_id=order_items.order_id")
|
||||
.joins("JOIN customers ON orders.customer_id=customers.customer_id")
|
||||
.where("orders.source='app' and bookings.shop_code='#{Shop.current_shop.shop_code}' and DATE(bookings.created_at) = '#{Date.today}' and bookings.booking_status='assign'").uniq.length
|
||||
.where("orders.source='app' and bookings.shop_code='#{@shop.shop_code}' and DATE(bookings.created_at) = '#{Date.today}' and bookings.booking_status='assign'").uniq.length
|
||||
|
||||
render "foodcourt/addorders/detail"
|
||||
end
|
||||
@@ -163,7 +162,7 @@ class Foodcourt::FoodCourtController < ApplicationController
|
||||
end
|
||||
|
||||
def get_all_product()
|
||||
@product = Product.where("shop_code='#{Shop.current_shop.shop_code}'")
|
||||
@product = Product.where("shop_code='#{@shop.shop_code}'")
|
||||
end
|
||||
|
||||
# render json for http status code
|
||||
|
||||
Reference in New Issue
Block a user