diff --git a/app/controllers/origami/movetable_controller.rb b/app/controllers/origami/movetable_controller.rb index 1753e096..bbc02bdc 100755 --- a/app/controllers/origami/movetable_controller.rb +++ b/app/controllers/origami/movetable_controller.rb @@ -82,24 +82,26 @@ class Origami::MovetableController < BaseOrigamiController @get_type = Booking.update_dining_facility(booking_array,change_to,change_from) - # get printer info - @from = (DiningFacility.find(change_from)).name - @to = (DiningFacility.find(change_to)).name - @type = (DiningFacility.find(change_to)).type - @moved_by = @current_user.name - @date = DateTime.now - @shop = Shop.first - unique_code = "MoveTablePdf" - pdf_no = PrintSetting.where(:unique_code => unique_code).count - #print_settings = PrintSetting.find_by_unique_code(unique_code) - printer_array = [] - printer_array = PrintSetting.where(:unique_code => unique_code) + if ENV["SERVER_MODE"] != "cloud" #no print in cloud server + # get printer info + @from = (DiningFacility.find(change_from)).name + @to = (DiningFacility.find(change_to)).name + @type = (DiningFacility.find(change_to)).type + @moved_by = @current_user.name + @date = DateTime.now + @shop = Shop.first + unique_code = "MoveTablePdf" + pdf_no = PrintSetting.where(:unique_code => unique_code).count + #print_settings = PrintSetting.find_by_unique_code(unique_code) + printer_array = [] + printer_array = PrintSetting.where(:unique_code => unique_code) - for i in 0..pdf_no - if i != pdf_no - print_settings = printer_array[i] - printer = Printer::ReceiptPrinter.new(print_settings) - printer.print_move_table(print_settings,@to,@from ,@shop,@date,@type,@moved_by,order_items) + for i in 0..pdf_no + if i != pdf_no + print_settings = printer_array[i] + printer = Printer::ReceiptPrinter.new(print_settings) + printer.print_move_table(print_settings,@to,@from ,@shop,@date,@type,@moved_by,order_items) + end end end end diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index 1f87ca65..00852f95 100755 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -437,10 +437,12 @@