app order

This commit is contained in:
Myat Zin Wai Maw
2019-12-02 17:48:36 +06:30
parent cac6994ccb
commit 600d3973cd
4 changed files with 14 additions and 12 deletions

View File

@@ -91,6 +91,9 @@ class Foodcourt::OrdersController < BaseFoodcourtController
.where("orders.source='app' and bookings.shop_code='#{@shop.shop_code}'").order("created_at desc")
end
def app_order_by_booking
@order_items = OrderItems.joins("JOIN orders ON orders.order_id=order_items.order_id")
.joins("JOIN booking_orders ON booking_orders.order_id=orders.order_id")
.where("orders.source='app' and booking_orders.booking_id='#{params[:booking_id]}'").order("created_at desc")
end
end

View File

@@ -104,7 +104,7 @@ class Foodcourt::PaymentsController < BaseFoodcourtController
end
#orders print out
if type == "quick_service"
# if type == "quick_service"
booking = Booking.find_by_sale_id(sale_id)
if booking.dining_facility_id.to_i>0
table_id = booking.dining_facility_id
@@ -127,7 +127,7 @@ class Foodcourt::PaymentsController < BaseFoodcourtController
ActionCable.server.broadcast "order_queue_station_channel",order: assign_order,from:from
end
end
# end
#for card sale data
card_data = Array.new