prevent order append to previous sale
This commit is contained in:
@@ -57,13 +57,12 @@ class Order < ApplicationRecord
|
||||
if self.is_extra_time
|
||||
if !booking.checkout_at.nil?
|
||||
new_time = booking.checkout_at + self.extra_time.to_i
|
||||
booking.update_attributes(checkout_at: new_time)
|
||||
booking.update(checkout_at: new_time)
|
||||
end
|
||||
end
|
||||
#end extra time
|
||||
end
|
||||
|
||||
booking.save!
|
||||
self.default_values
|
||||
|
||||
# cashier already opened?
|
||||
@@ -211,7 +210,6 @@ class Order < ApplicationRecord
|
||||
self.customer = Customer.find(1) if self.customer_id.nil?
|
||||
self.source = "emenu" if self.source.nil?
|
||||
self.order_type = "dine-in" if self.order_type.nil?
|
||||
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
Reference in New Issue
Block a user