Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -25,6 +25,7 @@ class Order < ApplicationRecord
|
||||
booking = nil
|
||||
|
||||
if self.new_booking
|
||||
puts "a"
|
||||
booking = Booking.create({:dining_facility_id => self.table_id,:type => "TableBooking",
|
||||
:checkin_at => Time.now.utc, :checkin_by => self.employee_name,
|
||||
:booking_status => "assign" })
|
||||
@@ -32,9 +33,10 @@ class Order < ApplicationRecord
|
||||
table.status = "occupied"
|
||||
table.save
|
||||
else
|
||||
if (self.booking_id.to_i > 0 )
|
||||
puts "b"
|
||||
|
||||
booking = Booking.find(self.booking_id)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
booking.save!
|
||||
|
||||
Reference in New Issue
Block a user