shift sale

This commit is contained in:
Nweni
2017-07-01 09:46:14 +06:30
parent 18094f5a71
commit c589f11758
6 changed files with 29 additions and 17 deletions

View File

@@ -345,8 +345,8 @@ class Sale < ApplicationRecord
else
## up to 100
value = 100 - get_last_no.to_f
num += value
puts 'up to 100'
num += value
puts 'up to 100'
end
end
end
@@ -479,11 +479,12 @@ end
def get_commerical_tax
tax = 0.0
self.sale_taxes.each do |tax|
if tax.tax_name == "Commerical Tax"
tax += tax.tax_payable_amount
self.sale_taxes.each do |taxobj|
if taxobj.tax_name == "Commerical Tax"
tax += taxobj.tax_payable_amount
end
end
return tax
end