fix for void and float cal: error

This commit is contained in:
phyusin
2017-12-29 15:08:48 +06:30
parent 2a7eb7a12a
commit 23422aa5a7
2 changed files with 7 additions and 5 deletions

View File

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