This commit is contained in:
Myat Zin Wai Maw
2020-02-26 13:13:18 +06:30
parent a29b1551a0
commit 16d76749af
20 changed files with 52 additions and 53 deletions

View File

@@ -48,7 +48,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("sales.sale_status =? and sales.payment_status =? and orders.source='app' and DATE(bookings.created_at)=?",'completed','paid',Date.today).order("bookings.created_at desc").uniq.length
.where("bookings.booking_status !=? and sales.sale_status =? and sales.payment_status =? and orders.source='app' and DATE(bookings.created_at)=?",'completed','completed','paid',Date.today).order("bookings.created_at desc").uniq.length
render "foodcourt/addorders/detail"
end