remove puts in sale
This commit is contained in:
@@ -274,14 +274,10 @@ class Sale < ApplicationRecord
|
|||||||
#tax_profile - list by order_by
|
#tax_profile - list by order_by
|
||||||
tax_profiles = TaxProfile.all.order("order_by asc")
|
tax_profiles = TaxProfile.all.order("order_by asc")
|
||||||
customer = Customer.find(sale.customer_id)
|
customer = Customer.find(sale.customer_id)
|
||||||
puts customer.tax_profiles
|
|
||||||
# #Creat new tax records
|
# #Creat new tax records
|
||||||
tax_profiles.each do |tax|
|
tax_profiles.each do |tax|
|
||||||
customer.tax_profiles.each do |cus_tax|
|
customer.tax_profiles.each do |cus_tax|
|
||||||
puts tax
|
|
||||||
puts cus_tax
|
|
||||||
if cus_tax.to_i == tax.id
|
if cus_tax.to_i == tax.id
|
||||||
puts "WALSS"
|
|
||||||
sale_tax = SaleTax.new(:sale => sale)
|
sale_tax = SaleTax.new(:sale => sale)
|
||||||
sale_tax.tax_name = tax.name
|
sale_tax.tax_name = tax.name
|
||||||
sale_tax.tax_rate = tax.rate
|
sale_tax.tax_rate = tax.rate
|
||||||
@@ -322,14 +318,10 @@ puts "WALSS"
|
|||||||
tax_profiles = TaxProfile.all.order("order_by asc")
|
tax_profiles = TaxProfile.all.order("order_by asc")
|
||||||
|
|
||||||
customer = Customer.find(self.customer_id)
|
customer = Customer.find(self.customer_id)
|
||||||
puts customer.tax_profiles
|
|
||||||
# #Create new tax records
|
# #Create new tax records
|
||||||
tax_profiles.each do |tax|
|
tax_profiles.each do |tax|
|
||||||
customer.tax_profiles.each do |cus_tax|
|
customer.tax_profiles.each do |cus_tax|
|
||||||
puts tax
|
|
||||||
puts cus_tax
|
|
||||||
if cus_tax.to_i == tax.id
|
if cus_tax.to_i == tax.id
|
||||||
puts "WALSS"
|
|
||||||
sale_tax = SaleTax.new(:sale => self)
|
sale_tax = SaleTax.new(:sale => self)
|
||||||
sale_tax.tax_name = tax.name
|
sale_tax.tax_name = tax.name
|
||||||
sale_tax.tax_rate = tax.rate
|
sale_tax.tax_rate = tax.rate
|
||||||
|
|||||||
Reference in New Issue
Block a user