Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023815Openbravo ERP09. Financial managementpublic2013-05-14 12:432013-06-03 12:58
jonalegriaesarte 
ioritzCia 
normalmajorhave not tried
closedfixed 
5
pi 
3.0MP243.0MP24 
jonalegriaesarte
Core
No
0023815: When updating a subaccount the system is activating all the valid combinations associated
When updating a subaccount the system is activating all the valid combinations associated
- With valid combinations inactive, update an account. All the valid combinations are activated due to this trigger:

C_ELEMENTVALUE_TRG:

     IF(:new.elementlevel = 'S') THEN
        SELECT COUNT(*)
        INTO v_Count
        FROM C_VALIDCOMBINATION
        WHERE Account_ID=:new.C_ElementValue_ID;
                                if(v_Count>0) THEN
                            UPDATE C_ValidCombination
                              SET Updated=now(), isactive = 'Y'
                              WHERE Account_ID=:new.C_ElementValue_ID;
                          ELSE
                            FOR cur_AcctSchema IN
                                (SELECT C_AcctSchema_ID
                                FROM C_AcctSchema_Element
                                WHERE C_AcctSchema_Element.C_Element_ID = :new.C_Element_ID
                                )
                              LOOP
                                                  INSERT INTO C_VALIDCOMBINATION
                                                          (C_VALIDCOMBINATION_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY,
                                                           UPDATED, UPDATEDBY, ALIAS, COMBINATION, DESCRIPTION, ISFULLYQUALIFIED,
                                                           C_ACCTSCHEMA_ID, ACCOUNT_ID, M_PRODUCT_ID, C_BPARTNER_ID, AD_ORGTRX_ID, C_LOCFROM_ID,
                                                           C_LOCTO_ID, C_SALESREGION_ID, C_PROJECT_ID, C_CAMPAIGN_ID, C_ACTIVITY_ID, USER1_ID,
                                                           USER2_ID)
                                                        VALUES (
                                                           GET_UUID(), :new.AD_Client_ID, :new.AD_Org_ID, :new.IsActive, :new.Created, :new.CreatedBy,
                                                           :new.Updated, :new.UpdatedBy, :new.value, :new.value, '', 'Y',
                                                           cur_AcctSchema.C_AcctSchema_ID, :new.C_ElementValue_ID, null, null, null, null,
                                                           null, null, null, null, null, null,
                                                           null);
                                                END LOOP;
                    END IF;
     END IF;
No tags attached.
Issue History
2013-05-14 12:43jonalegriaesarteNew Issue
2013-05-14 12:43jonalegriaesarteAssigned To => jonalegriaesarte
2013-05-14 12:43jonalegriaesarteModules => Core
2013-05-14 12:43jonalegriaesarteTriggers an Emergency Pack => No
2013-05-20 16:33jonalegriaesarteAssigned Tojonalegriaesarte => ioritzCia
2013-05-22 17:25ioritzCiaStatusnew => scheduled
2013-05-22 17:25ioritzCiafix_in_branch => pi
2013-05-23 12:04hgbotCheckin
2013-05-23 12:04hgbotNote Added: 0058898
2013-05-23 12:04hgbotStatusscheduled => resolved
2013-05-23 12:04hgbotResolutionopen => fixed
2013-05-23 12:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/291741e7259e5223c83374283af6051a67916894 [^]
2013-05-24 01:19hudsonbotCheckin
2013-05-24 01:19hudsonbotNote Added: 0058920
2013-06-03 12:58jonalegriaesarteReview Assigned To => jonalegriaesarte
2013-06-03 12:58jonalegriaesarteNote Added: 0059127
2013-06-03 12:58jonalegriaesarteStatusresolved => closed
2013-06-03 12:58jonalegriaesarteFixed in Version => 3.0MP24

Notes
(0058898)
hgbot   
2013-05-23 12:04   
Repository: erp/devel/pi
Changeset: 291741e7259e5223c83374283af6051a67916894
Author: Ioritz Cia <ioritz.cia <at> openbravo.com>
Date: Wed May 22 17:22:04 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/291741e7259e5223c83374283af6051a67916894 [^]

Fixes issue 23815: When updating a subaccount the system is activating
all the valid combinations associated.

---
M src-db/database/model/triggers/C_ELEMENTVALUE_TRG.xml
---
(0058920)
hudsonbot   
2013-05-24 01:19   
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/758b27652865 [^]

Maturity status: Test
(0059127)
jonalegriaesarte   
2013-06-03 12:58   
Verified, now the account combinations of the inactive accounting schemas are not updated.