Openbravo Issue Tracking System - Localization Pack: Spain
View Issue Details
0020460Localization Pack: SpainTaxespublic2012-05-09 18:502012-07-26 02:42
VictorVillar 
ioritzCia 
highminoralways
closedfixed 
5
 
 
0020460: wrong definition of some taxes in the dataset
we can see after execute the following query [1] of the DB function c_gettax, that we obtain more than one register, and this is not correct because the only tax that should be appear is 'Ventas exentas', the only one that should be checked as istaxexempt.

SELECT t.C_Tax_ID, T.NAME
          FROM C_Tax t
          INNER JOIN AD_Org o
            ON(t.AD_Client_ID = o.AD_Client_ID)
          WHERE t.ISTAXEXEMPT = 'Y'
          and t.sopotype ='S'
            AND o.AD_Org_ID = p_org_id
            AND t.ValidFrom <= shipdate
            AND t.isActive = 'Y'
          ORDER BY t.VALIDFROM DESC
We have realised about this behaviour if you configure one Business partner as Exempt and you are doing a sales transaction.

Also, this query is not correct because it is necessary to have a where clause with t.sopotype ='S' and t.sopotype ='B' in order to search only the tax sales transactions created by user
As group admin role,

Configure a BP as exempt and then create a sales order with that BP, in combo taxes we can see more than one register.
The only tax which should be appear is "Ventas exentas"
only check as taxexempt "Ventas exentas" in the dataset.
Review the query indicated in the Description, add some kind of restriction about sales transaction.
No tags attached.
Issue History
2012-05-09 18:50VictorVillarNew Issue
2012-05-09 18:50VictorVillarAssigned To => jonalegriaesarte
2012-05-09 18:53VictorVillarIssue Monitored: networkb
2012-05-09 19:18VictorVillarDescription Updatedbug_revision_view_page.php?rev_id=3441#r3441
2012-06-07 12:34jonalegriaesarteAssigned Tojonalegriaesarte => ioritzCia
2012-06-11 13:08ioritzCiaAssigned ToioritzCia => caristu
2012-07-06 11:13caristuAssigned Tocaristu => VictorVillar
2012-07-06 11:14caristuAssigned ToVictorVillar => ioritzCia
2012-07-16 18:34ioritzCiaStatusnew => scheduled
2012-07-16 18:34ioritzCiafix_in_branch => pi
2012-07-18 09:31hgbotCheckin
2012-07-18 09:31hgbotNote Added: 0050709
2012-07-18 09:31hgbotStatusscheduled => resolved
2012-07-18 09:31hgbotResolutionopen => fixed
2012-07-18 09:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5b8d7382e4da67658d62bd854188a42dabbcc992 [^]
2012-07-20 15:08VictorVillarNote Added: 0050784
2012-07-20 15:08VictorVillarStatusresolved => closed
2012-07-26 02:42hudsonbotCheckin
2012-07-26 02:42hudsonbotNote Added: 0050848

Notes
(0050709)
hgbot   
2012-07-18 09:31   
Repository: erp/devel/pi
Changeset: 5b8d7382e4da67658d62bd854188a42dabbcc992
Author: Ioritz Cia <ioritz.cia <at> openbravo.com>
Date: Thu Jul 12 17:40:35 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5b8d7382e4da67658d62bd854188a42dabbcc992 [^]

Fixes issue 20460: C_GetTax function results restricted for exempt taxes.

---
M src-db/database/model/functions/C_GETTAX.xml
---
(0050784)
VictorVillar   
2012-07-20 15:08   
Verified
(0050848)
hudsonbot   
2012-07-26 02:42   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5edf203d5780 [^]

Maturity status: Test