fix for tax inclusive

This commit is contained in:
Yan
2017-08-10 14:49:00 +06:30
parent 02c71f1961
commit edf213d6d6
3 changed files with 9 additions and 9 deletions

View File

@@ -290,14 +290,13 @@ class Sale < ApplicationRecord
sale_tax.tax_payable_amount = total_tax / 21
else
sale_tax.tax_payable_amount = total_tax * tax.rate / 100
total_tax_amount = total_tax_amount + sale_tax.tax_payable_amount
end
#new taxable amount is standard rule for step by step
# total_taxable = total_taxable + sale_tax.tax_payable_amount
sale_tax.inclusive = tax.inclusive
sale_tax.save
total_tax_amount = total_tax_amount + sale_tax.tax_payable_amount
sale_tax.save
end
end
end
@@ -334,15 +333,14 @@ class Sale < ApplicationRecord
sale_tax.tax_payable_amount = total_tax / 21
else
sale_tax.tax_payable_amount = total_tax * tax.rate / 100
total_tax_amount = total_tax_amount + sale_tax.tax_payable_amount
end
#new taxable amount is standard rule for step by step
# total_taxable = total_taxable + sale_tax.tax_payable_amount
sale_tax.inclusive = tax.inclusive
sale_tax.save
total_tax_amount = total_tax_amount + sale_tax.tax_payable_amount
sale_tax.save
end
end
end