This commit is contained in:
Myat Zin Wai Maw
2020-02-25 15:10:54 +06:30
parent 1d0100b382
commit 300779402d
6 changed files with 43 additions and 11 deletions

View File

@@ -74,7 +74,8 @@ class Api::OrdersController < Api::ApiController
else
if checkin_checkout_time(params[:booking_id])
table = DiningFacility.find(params[:table_id]) if params[:table_id].present?
table = DiningFacility.find_by_name(params[:table_name]) if params[:table_name].present?
# table = DiningFacility.find(params[:table_id]) if params[:table_id].present?
booking = table.current_checkin_booking if table
booking ||= Booking.find(params[:booking_id]) if params[:booking_id].present?
@@ -107,7 +108,7 @@ class Api::OrdersController < Api::ApiController
customer_id: params[:customer_id].present? ? params[:customer_id] : Customer.walkin.customer_id, # for no customer id from mobile
items: items_arr,
guest: params[:guest_info],
table_id: params[:table_id],
table_id: !table.nil? ? table.id : '',
new_booking: true,
waiters: @user.name,
employee_name: @user.name,
@@ -132,7 +133,8 @@ class Api::OrdersController < Api::ApiController
end
end
else
return return_json_status_with_code(406, "Checkout time is over!")
@status =false
@message ="Checkout time is over!"
end
end
end