sales and orders methods updates

This commit is contained in:
Min Zeya Phyo
2017-04-11 13:51:09 +08:00
parent 225ebdb7ef
commit 5b1bb6f6cd
10 changed files with 150 additions and 9 deletions

View File

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