Merge branch 'ui_ux_changes' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes
This commit is contained in:
@@ -77,25 +77,23 @@ class Api::CheckInProcessController < Api::ApiController
|
|||||||
dining_facility.save!
|
dining_facility.save!
|
||||||
end
|
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") }
|
render :json => { :status => true, :checkout_at => booking.checkout_at.utc.getlocal.strftime("%Y-%m-%d %H:%M") }
|
||||||
else
|
else
|
||||||
render :json => { :status => true }
|
render :json => { :status => true }
|
||||||
end
|
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
|
else
|
||||||
render :json => { :status => true }
|
render :json => { :status => true }
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user