shop code

This commit is contained in:
Myat Zin Wai Maw
2019-11-22 18:24:02 +06:30
parent 5a3f328789
commit d1ab2c194d
106 changed files with 834 additions and 895 deletions

View File

@@ -18,17 +18,17 @@ class Api::CallWaitersController < ActionController::API
# CallWaiterJob.perform_later(@table,@time)
if ENV["SERVER_MODE"] == 'cloud'
from = request.subdomain + "." + request.domain
else
else
from = ""
end
ActionCable.server.broadcast "call_waiter_channel",table: @table,time:@time,from: from, shift_ids: shift_ids
end
ActionCable.server.broadcast "call_waiter_channel",table: @table,time:@time,from: from, shift_ids: shift_ids
# get printer info
@shop = Shop.first
unique_code = "CallWaiterPdf"
# @shop = Shop.first
unique_code = "CallWaiterPdf"
print_settings = PrintSetting.find_by_unique_code(unique_code)
printer = Printer::ReceiptPrinter.new(print_settings)
printer = Printer::ReceiptPrinter.new(print_settings)
printer.print_call_waiter(print_settings,@table,@time,@shop)
end
end