Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013434Openbravo ERP09. Financial managementpublic2010-05-25 17:092011-07-20 18:17
ALino 
jonalegriaesarte 
urgentmajoralways
newopen 
5
 
 
Core
No
0013434: "Deductable Rate" field in Tax window is not taken into consideration when posting Invoices
When defining a new Tax Rate, it is possible to fill the Deductable Rate field, which is described in help by: "It is the deductable percentage".

However, if a tax with a rate of 20% and a Deductable rate of 5% is defined, when posting the invoice, the total amount is posted as deductable.

The expected behaviour should be to post only 5% as deductable, being the remaining 15% posted as expense.
Create a new Tax Rate.
Set the Rate to 20.
Set the Deductable Rate to 5.
Create a new Purchase Invoice, add one line, and use this new Tax Rate.
Complete and Post the invoice.
DocTax should have an extra field, deductibleRate (int) (0 by default).

In DocInvoice.java, method loadTaxes() could take the deductibleRate of the tax into consideration.

This variable should be used when creating facts in method createFacts().
If tax is not deductible, don't use the deductibleRate field.
If tax is deductible:
1)multiply the LineNetAmt by the deductibleRate and call the createLine() method with this value only.
2)call the createLine() method once more and use the value of LineNetAmt*(rate - deductableRate) to be posted as an expense.
No tags attached.
diff PATCH_13434.diff (6,010) 2011-01-18 11:31
https://issues.openbravo.com/file_download.php?file_id=3502&type=bug
Issue History
2010-05-25 17:09ALinoNew Issue
2010-05-25 17:09ALinoAssigned To => dalsasua
2010-06-01 14:14vmromanosSeveritycritical => major
2010-06-29 08:48balamuruganAssigned Todalsasua => balamurugan
2011-01-18 11:31dalsasuaNote Added: 0033704
2011-01-18 11:31dalsasuaFile Added: PATCH_13434.diff
2011-01-18 11:32dalsasuaAssigned Tobalamurugan => dalsasua
2011-01-18 11:32psanjuanNote Added: 0033705
2011-01-18 11:33psanjuanNote Edited: 0033705bug_revision_view_page.php?bugnote_id=0033705#r1431
2011-01-18 11:34psanjuanNote Edited: 0033705bug_revision_view_page.php?bugnote_id=0033705#r1432
2011-01-18 11:34psanjuanTypedefect => feature request
2011-07-20 18:17dalsasuaAssigned Todalsasua => jonalegriaesarte

Notes
(0033704)
dalsasua   
2011-01-18 11:31   
This is achievable in the following way:

Create a summary tax rate with two rates bellow: one deductable, and one non-deductable.

For example, for the rate A of 20%, you can make it deductible just in a 25%. Then create:

Tax Rate A (Summary)
|-> Tax Rate A.Deduct. Rate: 5%. IsDeductable='Y'
|-> Tax Rate A.NonDedcut. Rate: 15%. IsDeductable='N'

Nevertheless, to achieve what you mention, you can use the NON TESTED attached patch.
(0033705)
psanjuan   
2011-01-18 11:32   
(edited on: 2011-01-18 11:34)
It is not that easy to manage not 100% VAT deductable.
Before a much more deeper research is made I'd hide "Deductable Rate" field to avoid confusion or to keep as it is but informative, no logic business behind.

Changed to Feature Request.