shop code

This commit is contained in:
Myat Zin Wai Maw
2019-11-22 18:24:02 +06:30
parent 5a3f328789
commit d1ab2c194d
106 changed files with 834 additions and 895 deletions

View File

@@ -7,10 +7,10 @@ class Origami::AddordersController < BaseOrigamiController
@webview = true
end
@tables = Table.all.active.order('zone_id asc').group("zone_id")
@rooms = Room.all.active.order('zone_id asc').group("zone_id")
@all_table = Table.all.active.order('status desc')
@all_room = Room.all.active.order('status desc')
@tables = Table.all.active.where("shop_code='#{@shop.shop_code}'").order('zone_id asc').group("zone_id")
@rooms = Room.all.active.where("shop_code='#{@shop.shop_code}'").order('zone_id asc').group("zone_id")
@all_table = Table.all.where("shop_code='#{@shop.shop_code}'").active.order('status desc')
@all_room = Room.all.where("shop_code='#{@shop.shop_code}'").active.order('status desc')
end
def detail
@@ -19,7 +19,7 @@ class Origami::AddordersController < BaseOrigamiController
if check_mobile
@webview = true
end
display_type = Lookup.find_by_lookup_type("display_type")
display_type = Lookup.find_by_lookup_type_and_shop_code("display_type",@shop.shop_code)
if !display_type.nil? && display_type.value.to_i ==2
@display_type = display_type.value
else
@@ -28,10 +28,6 @@ class Origami::AddordersController < BaseOrigamiController
# if params[:menu] == "true"
@menus = []
@menu = []
# else
# @menus = Menu.all
# @menu = MenuCategory.active.where("menu_id =#{@menus[0].id}").order('order_by asc')
# end
@table_id = params[:id]
@table = DiningFacility.find(@table_id)
@@ -140,7 +136,7 @@ class Origami::AddordersController < BaseOrigamiController
@order.new_booking = true
@order.waiters = current_login_employee.name
@order.employee_name = current_login_employee.name
@order.shop_code =@shop.shop_code
@order.is_extra_time = is_extra_time
@order.extra_time = extra_time
@@ -237,7 +233,7 @@ class Origami::AddordersController < BaseOrigamiController
#Send to background job for processing
order = Order.find(order_id)
sidekiq = Lookup.find_by_lookup_type("sidekiq")
sidekiq = Lookup.find_by_lookup_type_and_shop_code("sidekiq",@shop.shop_code)
if ENV["SERVER_MODE"] != 'cloud'
cup_status = `#{"sudo service cups status"}`
print_status = check_cup_status(cup_status)
@@ -311,10 +307,4 @@ class Origami::AddordersController < BaseOrigamiController
return from
end
private
# def set_dining
# @dining = DiningFacility.find(params[:id])
# end
end