fix for void and float cal: error
This commit is contained in:
@@ -42,12 +42,14 @@ class Origami::VoidController < BaseOrigamiController
|
||||
table_avaliable = true
|
||||
table = sale.bookings[0].dining_facility
|
||||
table.bookings.each do |booking|
|
||||
if booking.sale.sale_status == 'new'
|
||||
table_avaliable = false
|
||||
if !booking.sale.nil?
|
||||
if booking.sale.sale_status == 'new'
|
||||
table_avaliable = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if table_avaliable == true
|
||||
if table_avaliable
|
||||
table.status = 'available'
|
||||
table.save
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user