Merge branch 'staging' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
class Booking < ApplicationRecord
|
||||
self.primary_key = "booking_id"
|
||||
|
||||
@@ -14,6 +13,7 @@ class Booking < ApplicationRecord
|
||||
def self.update_dining_facility(booking_arr, newd, old)
|
||||
table = DiningFacility.find(newd)
|
||||
exist = table.get_booking
|
||||
|
||||
if exist
|
||||
# order exists
|
||||
booking_arr.each do |booking|
|
||||
|
||||
@@ -321,10 +321,14 @@ class SalePayment < ApplicationRecord
|
||||
bookings = table.bookings
|
||||
bookings.each do |tablebooking|
|
||||
if tablebooking.booking_status != 'moved'
|
||||
if tablebooking.sale.sale_status != 'completed' && tablebooking.sale.sale_status != 'void'
|
||||
if tablebooking.sale_id
|
||||
if tablebooking.sale.sale_status != 'completed' && tablebooking.sale.sale_status != 'void'
|
||||
status = false
|
||||
end
|
||||
else
|
||||
status = false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if status
|
||||
table.status = "available"
|
||||
|
||||
Reference in New Issue
Block a user