Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into crm

This commit is contained in:
Aung Myo
2017-06-18 20:18:12 +06:30
53 changed files with 906 additions and 207 deletions

View File

@@ -23,6 +23,8 @@ class Sale < ApplicationRecord
if (booking)
Rails.logger.debug "Booking -> Booking Order Count -> " + booking.booking_orders.count.to_s
#get all order attached to this booking and combine into 1 invoice
puts booking.booking_orders.length
booking.booking_orders.each do |order|
if booking.sale_id
status, sale_id = generate_invoice_from_order(order.order_id, nil, booking, requested_by)
@@ -199,7 +201,7 @@ class Sale < ApplicationRecord
#tax_profile - list by order_by
tax_profiles = TaxProfile.all.order("order_by asc")
#Creat new tax records
# #Creat new tax records
tax_profiles.each do |tax|
sale_tax = SaleTax.new(:sale => self)
sale_tax.tax_name = tax.name