Merge branch 'oqs' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Yan
2017-09-05 14:14:10 +06:30
24 changed files with 298 additions and 121 deletions

View File

@@ -131,6 +131,7 @@ class Oqs::HomeController < BaseOqsController
left join dining_facilities as df on df.id = bk.dining_facility_id")
.where("assigned_order_items.delivery_status = #{status} AND odt.price <> 0 AND assigned_order_items.created_at >= '#{Time.now.beginning_of_day.utc}' #{oqs} ")
query = query.where("df.name LIKE ? OR odt.order_id LIKE ? OR odt.item_name LIKE ? OR cus.name = '#{filter}'","%#{filter}%","%#{filter}%","%#{filter}%",)
.order("assigned_order_items.assigned_order_item_id desc")
.group("assigned_order_items.assigned_order_item_id")
end