bill and tax

This commit is contained in:
Myat Zin Wai Maw
2019-12-17 15:06:37 +06:30
parent cd9756d061
commit 8af99742a3
4 changed files with 8 additions and 15 deletions

View File

@@ -122,21 +122,12 @@ class Api::OrdersController < Api::ApiController
end
@status, @booking = @order.generate
if @status && @booking
Order.process_order_queue(@order.order_id,@order.table_id,@order.source)
end
if @order.table_id.to_i > 0
table = DiningFacility.find(@booking.dining_facility_id)
type = 'order'
from = getCloudDomain #get sub domain in cloud mode
ActionCable.server.broadcast "order_channel",table: table,type:type,from:from
end
# # for parallel order
# remoteIP = ""
# begin
# @status, @booking = @order.generate
# remoteIP = request.remote_ip
# end while request.remote_ip != remoteIP
if current_user.role != "waiter" && params[:create_type] == "create_pay"
if @status && @booking && (@order.source == 'quick_service') || (@order.source == 'food_court') || (@order.source == 'app')
@status, @sale = Sale.request_bill(@order,current_user,current_user)