Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into ui_ux_changes

This commit is contained in:
San Wai Lwin
2018-03-13 14:53:07 +06:30
33 changed files with 1188 additions and 82 deletions

View File

@@ -1,4 +1,4 @@
class Origami::AddordersController < ApplicationController#BaseOrigamiController
class Origami::AddordersController < BaseOrigamiController
# before_action :set_dining, only: [:detail]
def index
@@ -161,10 +161,15 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController
end
@status, @booking = @order.generate
# Order.send_customer_view(@booking)
if current_user.role != "waiter" && params[:create_type] == "create_pay"
if @status && @booking && @order.source == 'quick_service'
@status, @sale = Sale.request_bill(@order,current_user,current_login_employee)
# for second display
ActionCable.server.broadcast "second_display_channel",data: @sale,status:"sale"
result = {:status=> @status, :data => @sale }
render :json => result.to_json
end