sale tax order by
This commit is contained in:
@@ -455,12 +455,12 @@ class Sale < ApplicationRecord
|
||||
|
||||
if !arr_tax.empty?
|
||||
if tax_type.nil?
|
||||
tax_profiles = TaxProfile.unscoped.where(:id => arr_tax)
|
||||
tax_profiles = TaxProfile.where(:id => arr_tax)
|
||||
else
|
||||
tax_profiles = TaxProfile.unscoped.where("group_type=?",order_source)
|
||||
tax_profiles = TaxProfile.where("group_type=?",order_source)
|
||||
end
|
||||
else
|
||||
tax_profiles = TaxProfile.unscoped.where("group_type=?",order_source)
|
||||
tax_profiles = TaxProfile.where("group_type=?",order_source)
|
||||
end
|
||||
|
||||
# #Creat new tax records
|
||||
@@ -560,12 +560,12 @@ class Sale < ApplicationRecord
|
||||
|
||||
if !arr_tax.empty?
|
||||
if tax_type.nil?
|
||||
tax_profiles = TaxProfile.unscoped.where(:id => arr_tax)
|
||||
tax_profiles = TaxProfile.where(:id => arr_tax)
|
||||
else
|
||||
tax_profiles = TaxProfile.unscoped.where("group_type=?",order_source)
|
||||
tax_profiles = TaxProfile.where("group_type=?",order_source)
|
||||
end
|
||||
else
|
||||
tax_profiles = TaxProfile.unscoped.where("group_type=?",order_source)
|
||||
tax_profiles = TaxProfile.where("group_type=?",order_source)
|
||||
end
|
||||
#Create new tax records
|
||||
tax_profiles.each do |tax|
|
||||
@@ -2977,7 +2977,7 @@ def self.get_sale_data_for_other_payment_credit(sale_id)
|
||||
end
|
||||
|
||||
def unique_tax_profiles(order_source, customer_id)
|
||||
tax_data = TaxProfile.unscoped.where("group_type='#{order_source}'").pluck(:id)
|
||||
tax_data = TaxProfile.where("group_type='#{order_source}'").pluck(:id)
|
||||
customer_tax_profiles = Customer.find(customer_id).tax_profiles
|
||||
|
||||
arr_data = []
|
||||
|
||||
Reference in New Issue
Block a user