[FIX] Bug 369902 : Tax Calculation for Price methods(inclusive,exclusive) corrected(ref:SSH)
bzr revid: jvo@tinyerp.com-20090526115430-x3hs2o2o75d5jwfa
This commit is contained in:
parent
bbee65e5f8
commit
30660ef590
|
@ -1392,13 +1392,17 @@ class account_tax(osv.osv):
|
||||||
|
|
||||||
res = []
|
res = []
|
||||||
taxes.reverse()
|
taxes.reverse()
|
||||||
cur_price_unit=price_unit
|
cur_price_unit = price_unit
|
||||||
|
|
||||||
tax_parent_tot = 0.0
|
tax_parent_tot = 0.0
|
||||||
for tax in taxes:
|
for tax in taxes:
|
||||||
if (tax.type=='percent') and not tax.include_base_amount:
|
if (tax.type=='percent') and not tax.include_base_amount:
|
||||||
tax_parent_tot+=tax.amount
|
tax_parent_tot += tax.amount
|
||||||
|
|
||||||
|
for tax in taxes:
|
||||||
|
if (tax.type=='fixed') and not tax.include_base_amount:
|
||||||
|
cur_price_unit -= tax.amount
|
||||||
|
|
||||||
for tax in taxes:
|
for tax in taxes:
|
||||||
if tax.type=='percent':
|
if tax.type=='percent':
|
||||||
if tax.include_base_amount:
|
if tax.include_base_amount:
|
||||||
|
|
Loading…
Reference in New Issue