Openbravo Issue Tracking System - Modules
View Issue Details
0032840ModulesMulti-Dimensional Profit And Losspublic2016-05-03 14:172016-05-20 13:28
ngarcia 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
 
aferraz
OBPS
0032840: Generate Profit and Loss Fact Acct process creates records in obdpl_fact_acct_pl although there are no accounts defined in cube
Generate Profit and Loss Fact Acct process creates records in obdpl_fact_acct_pl although there are no accounts defined in cube. The problem happens when the accountsFilter parameter is empty in the populatePAndLFactAcctTable function of the GenerateProfitAndLossFactAcctTable class. The account filter is not applied in the insert function then.
As system admin role:
   Generate the Cube from 'DPL - P&L Template'
As group admin role:
   Do not configure the Profit and Loss Accounts in 'Cube Definition - ... - Cube Report Dimension Element' tab
   Schedule the Generate Profit and Loss Fact Acct background process
   Go to OB Analytics window, select the DPL cube and add Account dimension in Columns and debitAmount measure in Rows
   Check values are shown and they should not (the report should be empty as only the values for the accounts defined in the Cube Report Dimension Element should be shown)
No tags attached.
related to design defect 0032008 closed Triage Omni OMS Generate Profit And Loss Fact Acct should be incremental 
related to defect 0033020 closed Sanjota Process "Generate Profit and Loss Fact Act" fails in a cube with more than 1000 accounts 
Issue History
2016-05-03 14:17ngarciaNew Issue
2016-05-03 14:17ngarciaAssigned To => Triage Finance
2016-05-03 14:17ngarciaResolution time => 1465509600
2016-05-03 14:17ngarciaOBNetwork customer => Yes
2016-05-03 14:17ngarciaRelationship addedrelated to 0032008
2016-05-09 11:08aferrazAssigned ToTriage Finance => AtulOpenbravo
2016-05-13 15:20AtulOpenbravoAssigned ToAtulOpenbravo => ngarcia
2016-05-13 15:20AtulOpenbravoStatusnew => feedback
2016-05-13 16:59ngarciaStatusfeedback => new
2016-05-13 16:59ngarciaAssigned Tongarcia => AtulOpenbravo
2016-05-13 17:00ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12118#r12118
2016-05-17 11:32ngarciaIssue Monitored: networkb
2016-05-17 15:42AtulOpenbravoStatusnew => scheduled
2016-05-17 15:42AtulOpenbravoNote Added: 0086500
2016-05-17 15:45AtulOpenbravoNote Edited: 0086500bug_revision_view_page.php?bugnote_id=0086500#r12138
2016-05-20 13:26hgbotCheckin
2016-05-20 13:26hgbotNote Added: 0086611
2016-05-20 13:26hgbotStatusscheduled => resolved
2016-05-20 13:26hgbotResolutionopen => fixed
2016-05-20 13:26hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.financial.dimensionalpandlreport/rev/768b92293823bcddeb7ececb7fbe1fd723632c24 [^]
2016-05-20 13:26hgbotCheckin
2016-05-20 13:26hgbotNote Added: 0086612
2016-05-20 13:26hgbotCheckin
2016-05-20 13:26hgbotNote Added: 0086613
2016-05-20 13:28aferrazReview Assigned To => aferraz
2016-05-20 13:28aferrazNote Added: 0086614
2016-05-20 13:28aferrazStatusresolved => closed
2016-05-23 11:27aferrazRelationship addedrelated to 0033020

Notes
(0086500)
AtulOpenbravo   
2016-05-17 15:42   
(edited on: 2016-05-17 15:45)
Test Plan A

- As system admin role:
   Generate the Cube from 'DPL - P&L Template'

- As group admin role:

- Do not configure the Profit and Loss Accounts in 'Cube Definition - ... - Cube Report Dimension Element' tab

- Schedule the Generate Profit and Loss Fact Acct background process

- Check through database there are no records in the obanaly_cube_rep_dim_elem table. This is correct as we don't define them:

  select count(*)
  from obanaly_cube_rep_dim_elem

No records found.

- Check through database there are no record in the obdpl_fact_acct_pl table.

select count(*)
from obdpl_fact_acct_pl

No records found.

Test Plan B

- As system admin role:
   Generate the Cube from 'DPL - P&L Template'

- As group admin role:

- Configure the Profit and Loss Accounts in
    - Cube Definition = "DPL - P&L - F&B International Group US_A_US Dollar"
    - Cube Report = "Multi-Dimensional Profit And Loss Process"
    - Cube Report Dimension = "account - "
    - Cube Report Dimension Elements
      - Add 4005 Revenue, Show as Member and Children
      - Add 4990 Total Revnue, Show as Member

- Schedule the Generate Profit and Loss Fact Acct background process.

- Check through database there are record in the obdpl_fact_acct_pl table.
   select * from obdpl_fact_acct_pl

- Check following query
   select distinct account_id
   from obdpl_fact_acct_pl

2 records found for Revenue and Total Revenue Elements.

(0086611)
hgbot   
2016-05-20 13:26   
Repository: erp/pmods/org.openbravo.financial.dimensionalpandlreport
Changeset: 768b92293823bcddeb7ececb7fbe1fd723632c24
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue May 17 17:58:16 2016 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.financial.dimensionalpandlreport/rev/768b92293823bcddeb7ececb7fbe1fd723632c24 [^]

Fixes issue 32840: Generate PL FactAcct process creates unnecessary records

Generate Profit and Loss Fact Acct process creates records in obdpl_fact_acct_pl although there are no accounts defined in cube
Check accountsfilter is empty or not prior to insert query

---
M src/org/openbravo/financial/dimensionalpandlreport/GenerateProfitAndLossFactAcctTable.java
---
(0086612)
hgbot   
2016-05-20 13:26   
Repository: erp/pmods/org.openbravo.financial.dimensionalpandlreport
Changeset: efc982cba79773e810025b518fbc0647870129ca
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri May 20 13:12:26 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.financial.dimensionalpandlreport/rev/efc982cba79773e810025b518fbc0647870129ca [^]

Related to issue 32840: Code review improvements

---
M src/org/openbravo/financial/dimensionalpandlreport/GenerateProfitAndLossFactAcctTable.java
---
(0086613)
hgbot   
2016-05-20 13:26   
Repository: erp/pmods/org.openbravo.financial.dimensionalpandlreport
Changeset: a48080568eb81e3f851b9f575fe9d384cf6845c3
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri May 20 13:24:16 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.financial.dimensionalpandlreport/rev/a48080568eb81e3f851b9f575fe9d384cf6845c3 [^]

Related to issue 32840: Update module version

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0086614)
aferraz   
2016-05-20 13:28   
Code review + Testing OK