diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index fb37dbdc..fb42bfee 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -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 diff --git a/app/controllers/oqs/home_controller.rb b/app/controllers/oqs/home_controller.rb index 226b3a83..28645a74 100644 --- a/app/controllers/oqs/home_controller.rb +++ b/app/controllers/oqs/home_controller.rb @@ -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")