validate foodcourt origami cashier
This commit is contained in:
@@ -7,7 +7,8 @@ class Foodcourt::FoodCourtController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def index
|
||||
def index
|
||||
if !ShiftSale.current_shift.nil?
|
||||
if params[:sale_id].present?
|
||||
sale =Sale.find(params[:sale_id])
|
||||
if sale
|
||||
@@ -50,6 +51,13 @@ class Foodcourt::FoodCourtController < ApplicationController
|
||||
.joins("JOIN customers ON orders.customer_id=customers.customer_id")
|
||||
.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"
|
||||
else
|
||||
if current_user.role == 'administrator' || current_user.role == 'manager'
|
||||
redirect_to origami_dashboard_path
|
||||
else
|
||||
redirect_to new_foodcourt_shift_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def get_menu_category ()
|
||||
|
||||
Reference in New Issue
Block a user