update oqs action cable for order cahnnel and oqs channel

This commit is contained in:
Aung Myo
2017-09-05 14:07:20 +06:30
parent eeb2a91ce9
commit 4a85039170
5 changed files with 11 additions and 4 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