sales and orders methods updates
This commit is contained in:
@@ -30,13 +30,11 @@ class Order < ApplicationRecord
|
||||
end
|
||||
|
||||
booking.save!
|
||||
|
||||
self.default_values
|
||||
|
||||
if self.save!
|
||||
|
||||
self.adding_line_items
|
||||
|
||||
#Add Order Table and Room relation afrer order creation
|
||||
if booking.type = "TableBooking"
|
||||
#add to table_booking_order
|
||||
@@ -60,7 +58,7 @@ class Order < ApplicationRecord
|
||||
end
|
||||
|
||||
def adding_line_items
|
||||
|
||||
|
||||
if self.items
|
||||
#loop to add all items to order
|
||||
self.items.each do |item|
|
||||
|
||||
Reference in New Issue
Block a user