update total tax when other charges

This commit is contained in:
Aung Myo
2017-08-02 16:58:34 +06:30
parent da5dfa1853
commit 6a6b7eae29
3 changed files with 24 additions and 3 deletions

View File

@@ -232,7 +232,6 @@ class Sale < ApplicationRecord
end
#compute rounding adjustment
# adjust_rounding
sale.save!
end
@@ -315,7 +314,7 @@ class Sale < ApplicationRecord
total_tax_amount = 0
#tax_profile - list by order_by
tax_profiles = TaxProfile.all.order("order_by asc")
# #Creat new tax records
tax_profiles.each do |tax|
sale_tax = SaleTax.new(:sale => self)