17 update for bitp

This commit is contained in:
Yan
2017-07-17 16:55:18 +06:30
parent df06b81b28
commit 33537cef60
2 changed files with 3 additions and 2 deletions

View File

@@ -21,7 +21,8 @@ class HomeController < ApplicationController
session[:session_token] = @employee.token_session
route_by_role(@employee)
else
render :show, flash[:notice] => "Invalid PIN for Employee. Please try again!"
flash[:notice] ="Invalid PIN for Employee. Please try again!"
render :show
end
end

View File

@@ -112,7 +112,7 @@ class Oqs::HomeController < BaseOqsController
left join booking_orders as bo on bo.order_id = assigned_order_items.order_id
left join bookings as bk on bk.booking_id = bo.booking_id
left join dining_facilities as df on df.id = bk.dining_facility_id")
.where("assigned_order_items.delivery_status = true AND odt.price <> 0")
.where("assigned_order_items.delivery_status = true AND odt.price <> 0 AND assigned_order_items.created_at <= ?", Time.now.end_of_day.utc)
.group("assigned_order_items.order_id")