Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0010765Openbravo ERP09. Financial managementpublic2009-09-25 10:292009-10-16 00:00
vmromanos 
rafaroda 
urgentmajoralways
closedfixed 
20Ubuntu 8.04
pi 
2.50MP7 
Core
No
0010765: Wrong sql in C_TAX_ACCT_TRG trigger
The following query is wrong:

SELECT *
      FROM C_AcctSchema_Default d
      WHERE EXISTS
        (
      SELECT 1
      FROM AD_Org_AcctSchema
      WHERE AD_IsOrgIncluded(AD_Org_ID, new.AD_ORG_ID, new.AD_Client_ID)<>-1
      AND IsActive = 'Y'
      AND AD_Org_AcctSchema.C_AcctSchema_ID = d.C_AcctSchema_ID
        )

1- The queries should be filtered by AD_Client_ID
2- The use of the AD_IsOrgIncluded function should be:
AD_IsOrgIncluded(new.AD_ORG_ID, AD_Org_ID, new.AD_Client_ID) because we want to get the acct schema of the organization and its parents
No tags attached.
related to defect 0005863 closed eduardo_Argal Triggers for accounting are wrong 
Issue History
2009-09-25 10:29vmromanosNew Issue
2009-09-25 10:29vmromanosAssigned To => rafaroda
2009-09-25 10:29vmromanosRelationship addedrelated to 0005863
2009-09-29 23:11psarobePrioritynormal => urgent
2009-09-29 23:11psarobeStatusnew => scheduled
2009-10-08 11:01hgbotCheckin
2009-10-08 11:01hgbotNote Added: 0020870
2009-10-08 11:01hgbotStatusscheduled => resolved
2009-10-08 11:01hgbotResolutionopen => fixed
2009-10-08 11:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a9c7272980861e949f096f383d76da5709bb663f [^]
2009-10-15 11:41arunkumarStatusresolved => closed
2009-10-15 11:41arunkumarNote Added: 0021030
2009-10-15 11:41arunkumarFixed in Version => 2.50MP7
2009-10-16 00:00anonymoussf_bug_id0 => 2880177

Notes
(0020870)
hgbot   
2009-10-08 11:01   
Repository: erp/devel/pi
Changeset: a9c7272980861e949f096f383d76da5709bb663f
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Thu Oct 08 11:01:25 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a9c7272980861e949f096f383d76da5709bb663f [^]

Fixes issue 10765: Wrong sql in C_TAX_ACCT_TRG trigger

---
M src-db/database/model/triggers/C_TAX_TRG.xml
---
(0021030)
arunkumar   
2009-10-15 11:41   
Tested & Working fine.