add first bill

This commit is contained in:
Yan
2017-06-29 11:34:13 +06:30
parent d35aa23e34
commit 9991970203
13 changed files with 374 additions and 125 deletions

View File

@@ -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