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

This commit is contained in:
phyusin
2018-08-07 16:31:16 +06:30

View File

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