Edit for checkin pdf

This commit is contained in:
San Wai Lwin
2018-08-13 14:37:41 +06:30
parent a282279ba2
commit 671aa155cd
5 changed files with 20 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ class Origami::CheckInProcessController < BaseOrigamiController
lookup_checkout_time = Lookup.collection_of("checkout_time")
today = Time.now.utc.getlocal
checkout_at = Time.now.utc.getlocal
if !lookup_checkout_time.empty?
lookup_checkout_time.each do |checkout_time|
arr_time = checkout_time[0].split("-")
@@ -26,6 +27,9 @@ class Origami::CheckInProcessController < BaseOrigamiController
@booking = Booking.create({:dining_facility_id => params[:dining_id],:type => "TableBooking",
:checkin_by=>current_login_employee.name,:checkin_at => Time.now.utc,:checkout_at =>checkout_at, :booking_status => "assign", :reserved_at => checkout_at, :reserved_by => current_login_employee.name })
terminal_id = DiningFacility.find_by_id(@booking.dining_facility_id)
terminal = CashierTerminal.find_by_id(terminal_id.zone_id)
if @booking.save!
@dining_facility.status = "occupied"
@dining_facility.save!
@@ -43,7 +47,7 @@ class Origami::CheckInProcessController < BaseOrigamiController
order_queue_printer = Printer::OrderQueuePrinter.new(printer)
if !printer.nil?
order_queue_printer.print_check_in_out(printer, booking, table)
order_queue_printer.print_check_in_out(printer, terminal, booking, table)
end
end
end