app order

This commit is contained in:
Myat Zin Wai Maw
2019-12-04 14:37:21 +06:30
19 changed files with 97 additions and 138 deletions

View File

@@ -68,7 +68,7 @@ class Foodcourt::OrdersController < BaseFoodcourtController
.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'").order("bookings.created_at desc").uniq
.where("orders.source='app' and DATE(bookings.created_at) = '#{Date.today}'").order("bookings.created_at desc").uniq
end
def completed
customer =Customer.find_by_customer_id(params[:customer_id])