For a Tax if "Included in base amount" is ticked. The tax amount for this tax as well as for the child taxes should be added to the base amount for next taxes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Account - Invoicing |
New
|
Undecided
|
Unassigned |
Bug Description
For a Tax if "Included in base amount" is ticked, the tax amount for this tax as well as for the child taxes should be added to the base amount for next taxes.
For example assume a product costing 1000 USD
Assuming the following taxes which are applicable on a product:
1. Main Tax One @ 10.3 % applicable on the (Product Value)
2. Main Tax Two @ 2 % applicable on the (Product value + the Main Tax One)
Main Tax One is defined as a Tax of 10% on the Product Value with two children of 1% and 2% applicable on the parent tax
To enable Main Tax Two to be applicable on (Product value + Main Tax One value) we tick the "included in base amount" option for te Main Tax One.
Correct Calculation would be
Base Amount : 1000
Main Tax One (10% of 1000) : 100
Child 1 on Main Tax One (1% of 100) : 1
Child 2 on Main Tax One (2% of 100) : 2
Main Tax Two (2% of 1000+100+1+2) : 22.06
Currenlty in Openerp 7, the child tax values are not included in the base amount passed on by the parent tax.
This leads to wrong calculation as follows:
Main Tax two (2% of 1000 + 100) : 22
Tax amount of Child 1 and Child 2 of Main Tax One are not included in the base amount that is passed on to the Main Tax Two. This is an error.
Turning on the 'included in base amount' for the child taxes is not an option as this leads to error in calculation for the next child item.
I suggest the following patch to account/account.py
--- account.py.original 2013-06-08 04:40:47.000000000 +0530
+++ account.py 2013-07-03 13:27:02.354660013 +0530
@@ -2088,11 +2088,14 @@
+ child_amount_
if tax.child_ids:
if tax.child_depend:
+ for ct in child_tax:
+ child_amount_
if tax.child_depend:
@@ -2110,6 +2113,7 @@
if tax.include_
+ cur_price_
return res
def compute_all(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, force_excluded=
I have already read Bug No. 667920. This seems similar but is not same.
--- account.py.original 2013-06-08 04:40:47.000000000 +0530
data[ 'balance' ] = cur_price_unit
+++ account.py 2013-07-03 13:27:02.354660013 +0530
@@ -2088,11 +2088,14 @@
+ child_amount_
if tax.child_ids:
if tax.child_depend:
+ for ct in child_tax:
+ child_amount_
if tax.child_depend:
@@ -2110,6 +2113,7 @@
if tax.include_
+ cur_price_
return res
def compute_all(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, force_excluded= False):