Edit in check_in_process_controller

This commit is contained in:
San Wai Lwin
2018-08-07 16:26:34 +06:30
parent e9b26f1684
commit 144f27d64c

View File

@@ -77,25 +77,23 @@ class Api::CheckInProcessController < Api::ApiController
dining_facility.save!
end
if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
unique_code = "CheckInOutPdf"
printer = PrintSetting.find_by_unique_code(unique_code)
# print when complete click
order_queue_printer = Printer::OrderQueuePrinter.new(printer)
if !printer.nil?
order_queue_printer.print_check_in_out(printer, booking, dining_facility)
end
end
render :json => { :status => true, :checkout_at => booking.checkout_at.utc.getlocal.strftime("%Y-%m-%d %H:%M") }
else
render :json => { :status => true }
end
if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
printer = PrintSetting.find_by_unique_code("CheckInOutPdf")
unique_code = "CheckInOutPdf"
booking = Booking.find_by_booking_id(booking.booking_id)
table = DiningFacility.find(params[:dining_id])
# print when complete click
order_queue_printer = Printer::OrderQueuePrinter.new(printer)
if !printer.nil?
order_queue_printer.print_check_in_out(printer, booking, table)
end
end
else
render :json => { :status => true }
end