From ef2fe2ead2acaa3398799140084e8939d4e9e1cb Mon Sep 17 00:00:00 2001 From: San Wai Lwin Date: Tue, 14 Aug 2018 14:03:45 +0630 Subject: [PATCH] Edit booking_id erroe --- .../origami/check_in_process_controller.rb | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/app/controllers/origami/check_in_process_controller.rb b/app/controllers/origami/check_in_process_controller.rb index 207163c5..92fd8142 100644 --- a/app/controllers/origami/check_in_process_controller.rb +++ b/app/controllers/origami/check_in_process_controller.rb @@ -33,21 +33,22 @@ class Origami::CheckInProcessController < BaseOrigamiController @dining_facility.status = "occupied" @dining_facility.save! 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, cashier_terminal, booking, table) + end + 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, cashier_terminal, booking, table) - end - end end respond = {:status => 'ok'} respond_to do |format|