Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035926Openbravo ERP09. Financial managementpublic2017-05-04 11:092017-05-29 17:43
maite 
collazoandy4 
urgentmajoralways
closedfixed 
5
 
3.0PR17Q3 
aferraz
Core
No
0035926: "Business Partner Category" and "Product Category" not properly considered by UpdateActuals process in "Export Budget to Excel"
Specific "Business Partner Category" and "Product Category" dimensions set in Budget Lines are not used correctly when calculating "Actual Amount" for this budget line. However, "Project" dimension is properly considered
1. Create new Budget header for "España" organization and 2017 year. Set "Export Actual Data"=YES
2. Add Budget Line for "España" general ledger, "60000 - Compras de mercaderías" account, "May-17" period, Amount=150, "Alcoholic" product category
3. Add another Budget Line for "España" general ledger, "60000 - Compras de mercaderías" account, "May-17" period, Amount=150, "Bio" product category
4. Register Purchase Invoice for "España" organization, "Bebidas Alegres" business partner, Accounting date=04-05-2017. Add purchase invoice line for "Cerveza Ale 0,5L" and set price=100. Process and Post invoice
5. Register Purchase Invoice for "España" organization, "La Fruta es la Vida, S.L." business partner, Accounting date=04-05-2017. Add purchase invoice line for "Zumo de Naranja Bio 0,33L" and set price=1. Process and Post invoice
6. Run "Export Budget to Excel" process from Budget window and realize that "Actual Amount"calculated for both lines is 122,21 (sum of invoices) instead of 121 and 1.21
UpdateActuals.java process should filter by products/business partners belonging to specific categories instead of just checking existence of any record belonging to this category (and exists (select 1 from Product p where productCategory.id in (''))
No tags attached.
Issue History
2017-05-04 11:09maiteNew Issue
2017-05-04 11:09maiteAssigned To => Triage Finance
2017-05-04 11:09maiteModules => Core
2017-05-04 11:09maiteResolution time => 1495663200
2017-05-04 11:09maiteTriggers an Emergency Pack => No
2017-05-04 11:09maiteIssue Monitored: networkb
2017-05-04 16:39aferrazAssigned ToTriage Finance => collazoandy4
2017-05-08 15:22collazoandy4Statusnew => scheduled
2017-05-08 22:40collazoandy4Note Added: 0096465
2017-05-11 19:46hgbotCheckin
2017-05-11 19:46hgbotNote Added: 0096539
2017-05-11 19:46hgbotStatusscheduled => resolved
2017-05-11 19:46hgbotResolutionopen => fixed
2017-05-11 19:46hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/da49163317af6b5f2fa93beabe00db93687a2ff6 [^]
2017-05-11 19:46hgbotCheckin
2017-05-11 19:46hgbotNote Added: 0096540
2017-05-11 19:49aferrazReview Assigned To => aferraz
2017-05-11 19:49aferrazNote Added: 0096542
2017-05-11 19:49aferrazStatusresolved => closed
2017-05-11 19:49aferrazFixed in Version => 3.0PR17Q3
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096960
2017-05-29 17:43hudsonbotCheckin
2017-05-29 17:43hudsonbotNote Added: 0096961

Notes
(0096465)
collazoandy4   
2017-05-08 22:40   
Test Plan
  Go to Bugdet window and create a new record:
    Organization: F&B España, S.A
    Name: Budget
    Year: 2017
    Check Export Actual Data option
    Create a new record in Lines tab:
      General Ledger: F&B España, S.A. US/A/Euro
      Account Element: 60000 - Compras de mercaderías
      Period: May-17
      Amount: 150
      Product category: Alcoholic
    Create a new record in Lines tab:
      General Ledger: F&B España, S.A. US/A/Euro
      Account Element: 60000 - Compras de mercaderías
      Period: May-17
      Amount: 150
      Product category: Bio
    Create a new record in Lines tab:
      General Ledger: F&B España, S.A. US/A/Euro
      Account Element: 62100 - Arrendamientos y cánones
      Period: May-17
      Amount: 300
      Business Partner Category: Supplier Services
    Create a new record in Lines tab:
      General Ledger: F&B España, S.A. US/A/Euro
      Account Element: 60000 - Compras de mercaderías
      Period: May-17
      Amount: 250
      Business Partner Category: Supplier
  Go to Purchase Invoice window and create a new record:
    Organization: F&B España, S.A
    Business Partner: Bebidas Alegres, S.L.
    Accounting date=05-05-2017
    Create a new record in Lines tab:
      Product: Cerveza Ale 0,5L
      Invoiced Quantity: 1
      Price: 100
    Process and post the invoice
  In Purchase Invoice window create another record:
    Organization: F&B España, S.A
    Business Partner: Servicios Inmobiliarios Los mejores, SA
    Accounting date=05-05-2017
    Create a new record in Lines tab:
      Product: Alquiler de oficina
      Invoiced Quantity: 1
      Price: 150
   In Purchase Invoice window create another record:
    Organization: F&B España, S.A
    Accounting date=05-05-2017
    Business Partner: La Fruta es la Vida, S.L.
    Create a new record in Lines tab:
      Product: Zumo de Naranja Bio 0,33L
      Invoiced Quantity: 1
      Price: 1
   Go to Budget window and select previous budget created and run Export Budget to Excel process and check in the excel file:
     One record with:
       Amount: 250
       Actual: -101
       BP Group: Supplier
       Account: 60000 - Compras de mercaderías
     Another record with:
       Amount: 150
       Actual: -100
       Prod Category: Alcoholic
       Account: 60000 - Compras de mercaderías
     Another record with:
       Amount: 150
       Actual: -1
       Prod Category: Bio
       Account: 60000 - Compras de mercaderías
     Another record with:
       Amount: 300
       Actual: -150
       BP Group: Supplier Services
       Account: 62100 - Arrendamientos y cánones
(0096539)
hgbot   
2017-05-11 19:46   
Repository: erp/devel/pi
Changeset: da49163317af6b5f2fa93beabe00db93687a2ff6
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Mon May 08 16:55:51 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/da49163317af6b5f2fa93beabe00db93687a2ff6 [^]

Fixes issue 35926: BP and Product Categories dimensions are not used correctly

When specific Business Partner Category and Product Category dimensions set in
Budget Lines are not used correctly when calculating Actual Amount for this budget
line because the UpdateActuals process doesn't filter by products/business partners belonging
to specific categories, just check the existence of any record belonging to those categories

Now the UpdateActuals process filter by product and business partner categories

---
M src/org/openbravo/erpCommon/ad_process/UpdateActuals.java
---
(0096540)
hgbot   
2017-05-11 19:46   
Repository: erp/devel/pi
Changeset: 70fd32d0bf5b9c0e7c1c6ae484d12744b9a84e76
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu May 11 19:39:12 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/70fd32d0bf5b9c0e7c1c6ae484d12744b9a84e76 [^]

Related to issue 35926: Code review improvements

---
M src/org/openbravo/erpCommon/ad_process/UpdateActuals.java
---
(0096542)
aferraz   
2017-05-11 19:49   
Code review + Testing OK
(0096960)
hudsonbot   
2017-05-29 17:43   
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/1ee70113bdc4 [^]
Maturity status: Test
(0096961)
hudsonbot   
2017-05-29 17:43   
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/1ee70113bdc4 [^]
Maturity status: Test