Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011217Openbravo ERP09. Financial managementpublic2009-11-02 18:022009-11-18 00:00
gorkaion 
eduardo_Argal 
normalmajoralways
closedfixed 
20
2.50MP1 
2.50MP102.50MP9 
Core
No
0011217: Reset accounting does not unpost correctly documents without fact_acct entries
The 'Reset Accounting' process does not set as not posted the documents that doesn't have any entry in the fact_acct
1. Create a manual settlement with the direct posting flag not checked.
2. Process and post it. Notice that the settlement is in status posted but no journal entry is created.
3. Run the 'Reset Accounting' process for the 'Manual Settlement - Settlement' table.
4. Go back to the manual settlement and notice that the settlement is still in posted status.
Fix the FACT_ACCT_RESET procedure. When the 'Reset Accounting' process is called the Record_ID is 0 and not NULL.

        v_Cmd:='UPDATE ' || Cur_Tables.TableName || ' SET Posted=''N'', Processing=''N'' WHERE AD_Client_ID=''' || Cur_Clients.AD_Client_ID
        || ''' AND (Posted=''Y'' OR Processing<>''N'' OR Processing IS NULL) AND NOT EXISTS (SELECT 1 FROM FACT_ACCT WHERE AD_TABLE_ID =''' || Cur_Tables.AD_Table_ID ||
        ''' AND RECORD_ID = ' || Cur_Tables.TableName || '_ID AND AD_CLIENT_ID =''' || Cur_Clients.AD_Client_ID || ''') AND ('
        || Cur_Tables.TableName || '_ID = ''' || v_Record_ID || ''' OR ''' || UPPER(v_Record_ID) ||''' = ''0'')';
No tags attached.
Issue History
2009-11-02 18:02gorkaionNew Issue
2009-11-02 18:02gorkaionAssigned To => rafaroda
2009-11-02 18:03gorkaionversion => 2.50MP1
2009-11-02 18:03gorkaionTarget Version => 2.50MP10
2009-11-02 18:05eduardo_ArgalStatusnew => scheduled
2009-11-02 18:05eduardo_ArgalAssigned Torafaroda => eduardo_Argal
2009-11-02 18:05eduardo_Argalfix_in_branch => pi
2009-11-02 19:40hgbotCheckin
2009-11-02 19:40hgbotNote Added: 0021520
2009-11-02 19:40hgbotStatusscheduled => resolved
2009-11-02 19:40hgbotResolutionopen => fixed
2009-11-02 19:40hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/cc27edfb352ee93c6b5c3c7d6be16ac58f66cc2c [^]
2009-11-16 17:36hgbotCheckin
2009-11-16 17:36hgbotNote Added: 0021881
2009-11-16 17:36hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/cc27edfb352ee93c6b5c3c7d6be16ac58f66cc2c [^] => http://code.openbravo.com/erp/devel/pi/rev/deb8f40cbb9d6589ba4ada7658eade8f3cb3bc65 [^]
2009-11-17 12:25psarobeNote Added: 0021916
2009-11-17 12:25psarobeStatusresolved => closed
2009-11-17 12:25psarobeFixed in Version => 2.50MP9
2009-11-18 00:00anonymoussf_bug_id0 => 2899461

Notes
(0021520)
hgbot   
2009-11-02 19:40   
Repository: erp/devel/pi
Changeset: cc27edfb352ee93c6b5c3c7d6be16ac58f66cc2c
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Mon Nov 02 19:39:07 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/cc27edfb352ee93c6b5c3c7d6be16ac58f66cc2c [^]

Fixes bug 0011217: Reset accounting does not...

---
M src-db/database/model/functions/FACT_ACCT_RESET.xml
---
(0021881)
hgbot   
2009-11-16 17:36   
Repository: erp/devel/pi
Changeset: deb8f40cbb9d6589ba4ada7658eade8f3cb3bc65
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Mon Nov 16 17:12:50 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/deb8f40cbb9d6589ba4ada7658eade8f3cb3bc65 [^]

Fixes issue 0011217: Reset accounting does not unpost correctly documents without fact_acct entries

---
M src/org/openbravo/erpCommon/ad_forms/AcctServer.java
M src/org/openbravo/erpCommon/ad_forms/AcctServer_data.xsql
---
(0021916)
psarobe   
2009-11-17 12:25   
Tested working fine. Now it's not possible to post a manual settlement if direct posting is not marked (the document is marked then as an error) so to be able to reproduce the error we have to post the document (an error comes and the posted column has the value E=error). Then you delete the accounting and the value will be posted=N