add first bill
This commit is contained in:
@@ -25,9 +25,8 @@ class Order < ApplicationRecord
|
||||
booking = nil
|
||||
|
||||
if self.new_booking
|
||||
|
||||
booking = Booking.create({:dining_facility_id => self.table_id,:type => "TableBooking",
|
||||
:checkin_at => Time.now.utc.getlocal, :checkin_by => self.employee_name,
|
||||
:checkin_at => Time.now.utc, :checkin_by => self.employee_name,
|
||||
:booking_status => "assign" })
|
||||
table = DiningFacility.find(self.table_id)
|
||||
table.status = "occupied"
|
||||
@@ -55,7 +54,7 @@ class Order < ApplicationRecord
|
||||
|
||||
end
|
||||
|
||||
return false
|
||||
return false, @message = "booking fail"
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user