Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031265Openbravo ERP09. Financial managementpublic2015-10-27 12:192015-11-27 02:55
maite 
aferraz 
urgentmajoralways
closedfixed 
5
 
3.0PR16Q1 
vmromanos
Core
No
0031265: Acct Server Background process should only consider check "Disable for background" option for valid General Ledgers
At the moment, "selectAcctTable" method is not filtering by General Ledger Configuration so in order to disable a specific table for background it is necessary to disable it in all existent general ledgers (although they could not apply to affected organization)
1. Access General Ledger Configuration "F&B International Group US/A/US Dollar" and set "FIN_Finacc_Transaction" table as "Disabled for background"
2. Access Financial Account "Bank - Account 1" and unpost one transaction
3. Access Process Request window and create new register for "F&B US, Inc." organization, "Acct Server Process" process and "Run Immediately" option. Schedule it
4. Access previous transaction and realize that it has been posted

Note: if you also define "FIN_Finacc_Transaction" table as "Disabled for background" for "F&B España, S.A. US/A/Euro" general ledger and repeat the steps you will obtain desired behaviour
In AcctServerProcess.java, in line 121 following query is executed

data = AcctServerProcessData.selectAcctTable(connection, ctx.getClient());

It should consider only General Ledgers that apply to organization being considered by Acct Server background process.

In case more than one general ledger apply to an specific organization (for example in case of España organization) and one of them is defined as "disable for background" then no accounting should be generated for any of defined general ledgers
No tags attached.
related to defect 00248763.0PR14Q2 closed AtulOpenbravo Accounting background process does not take into consideration the organization used to define it 
related to design defect 0031606 new Triage Omni OMS Acct Server Background process and context organization 
Issue History
2015-10-27 12:19maiteNew Issue
2015-10-27 12:19maiteAssigned To => Triage Finance
2015-10-27 12:19maiteModules => Core
2015-10-27 12:19maiteResolution time => 1448924400
2015-10-27 12:19maiteTriggers an Emergency Pack => No
2015-10-27 12:20maiteIssue Monitored: networkb
2015-11-24 11:37aferrazAssigned ToTriage Finance => aferraz
2015-11-24 11:37aferrazStatusnew => scheduled
2015-11-25 14:31aferrazNote Added: 0082325
2015-11-25 17:49aferrazRelationship addedrelated to 0024876
2015-11-26 18:17vmromanosRelationship addedrelated to 0031606
2015-11-26 18:21hgbotCheckin
2015-11-26 18:21hgbotNote Added: 0082383
2015-11-26 18:21hgbotStatusscheduled => resolved
2015-11-26 18:21hgbotResolutionopen => fixed
2015-11-26 18:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5fd88ad2aa0f60b5b45bac0734faf982097531d8 [^]
2015-11-26 18:21vmromanosReview Assigned To => vmromanos
2015-11-26 18:21vmromanosNote Added: 0082384
2015-11-26 18:21vmromanosStatusresolved => closed
2015-11-27 02:55hudsonbotCheckin
2015-11-27 02:55hudsonbotNote Added: 0082390

Notes
(0082325)
aferraz   
2015-11-25 14:31   
Test plan:

As System Admin:

- Activate General Ledgers tab for Organziation window.

As F&B Admin:

- Unschedule Acct Server Process scheduled process request
- Create a process request for F&B International Group organization, Acct Server Process and run immediately timing.
- Create a process request for F&B España, S.A organization, Acct Server Process and run immediately timing.
- Create a process request for F&B US, Inc. organization, Acct Server Process and run immediately timing.

- Access General Ledger Configuration "F&B España, S.A. US/A/Euro" and set "FIN_Finacc_Transaction" table as "Disabled for background" = false
- Access General Ledger Configuration "F&B International Group US/A/US Dollar" and set "FIN_Finacc_Transaction" table as "Disabled for background" = true

- Access Financial Account "Bank - Account 1" and unpost one transaction
- Access Financial Account "Cuenta de Banco" and unpost one transaction

- Schedule Acct Server Process process request for F&B International Group organization.
  Realize both transactions still unposted (as both euro and dollar general ledgers apply to International Group organization or its children and any of them has the table disabled for background).

- Schedule Acct Server Process process request for F&B España organization.
  Realize both transactions still unposted (as both euro and dollar general ledgers apply to España organization or its children and any of them has the table disabled for background).

- Schedule Acct Server Process process request for F&B US organization.
  Realize Bank - Account 1 transaction still unposted (as only dollar general ledger applies to US organization or its children and it has the table disabled for background).
  Realize Cuenta de Banco transaction still unposted as we haven't run Acct Server Process for its organization.

- Access General Ledger Configuration "F&B España, S.A. US/A/Euro" and set "FIN_Finacc_Transaction" table as "Disabled for background" = true
- Access General Ledger Configuration "F&B International Group US/A/US Dollar" and set "FIN_Finacc_Transaction" table as "Disabled for background" = false

- Schedule Acct Server Process process request for F&B International Group organization.
  Realize both transactions still unposted (as both euro and dollar general ledgers apply to International Group organization or its children and any of them has the table disabled for background).

- Schedule Acct Server Process process request for F&B España organization.
  Realize both transactions still unposted (as both euro and dollar general ledgers apply to España organization or its children and any of them has the table disabled for background).

- Schedule Acct Server Process process request for F&B US organization.
  Realize Bank - Account 1 transaction has been posted (as only dollar general ledger applies to US organization or its children and it has the table enabled for background).
  Unpost it.
  Realize Cuenta de Banco transaction still unposted as we haven't run Acct Server Process for its organization.

- Access F&B International Group organization and change general ledger from F&B International Group US/A/US Dollar to F&B España, S.A. US/A/Euro.
  Realize a record is created in General Ledgers tab for F&B International Group organization and F&B España, S.A. US/A/Euro general ledger.
  Realize record for F&B International Group US/A/US Dollar general ledger in General Ledgers tab is deactivated. Activate it.
  Realize now both euro and dollar general ledgers apply to International Group organization and its children.
  
- Schedule Acct Server Process process request for F&B US organization.
  Realize Bank - Account 1 transaction still unposted (as both euro and dollar general ledgers apply to US organization or its children and any of them has the table disabled for background).
  Realize Cuenta de Banco transaction still unposted as we haven't run Acct Server Process for its organization.

- Access General Ledger Configuration "F&B España, S.A. US/A/Euro" and set "FIN_Finacc_Transaction" table as "Disabled for background" = false
- Access General Ledger Configuration "F&B International Group US/A/US Dollar" and set "FIN_Finacc_Transaction" table as "Disabled for background" = false

- Schedule Acct Server Process process request for F&B International Group organization.
  Realize both transactions are posted.
(0082383)
hgbot   
2015-11-26 18:21   
Repository: erp/devel/pi
Changeset: 5fd88ad2aa0f60b5b45bac0734faf982097531d8
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Nov 25 14:35:30 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/5fd88ad2aa0f60b5b45bac0734faf982097531d8 [^]

Fixes bug 31265:AcctServer background should only consider valid GeneralLedgers

When Acct Server Process is executed from a process request for a organization different than *, tables to be posted will only be taken from General Ledgers which apply to organization being considered by Acct Server background process.
To be considered, these tables should also be as disable for background = 'N' in every general ledger that apply to organization being considered by Acct Server background process.

---
M src/org/openbravo/erpCommon/ad_process/AcctServerProcess.java
M src/org/openbravo/erpCommon/ad_process/AcctServerProcess_data.xsql
---
(0082384)
vmromanos   
2015-11-26 18:21   
Code review + testing OK
(0082390)
hudsonbot   
2015-11-27 02:55   
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/39adcac68310 [^]
Maturity status: Test