Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0037302 | Openbravo ERP | 09. Financial management | public | 2017-11-16 09:41 | 2018-01-03 12:39 |
|
Reporter | dmiguelez | |
Assigned To | nonofrancisco | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR18Q1 | |
Merge Request Status | |
Review Assigned To | dmiguelez |
OBNetwork customer | OBPS |
Web browser | |
Modules | Core |
Support ticket | 48861 |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0037302: Process Price Difference Correction fails with n.p.e. or create wrong Cost Adjustment Documents when it works |
Description | Process Price Difference Correction has two related problems:
* It throws an n.p.e. error when launched for * Organization
* It can create wrong Cost Adjustment Documents if launched for any other Organization (it mixes transactions from different legal entities in the same document) |
Steps To Reproduce | Steps to reproduce
1. Create a Purchase Order - Goods Receipt - Purchase Invoice for España
1.1. Create a Purchase Order
Go to Purchase Order Window and create a new record with:
* Organization: España
* Business Partner: Bebidas Alegres
Move to lines and create a new record with:
* Product: Cerveza Ale
* Ordered Quantity: 1
Book the Purchase Order
1.2. Create a related Goods Receipt
Go to Goods Receipt window and create a new record with:
* Organization: España
* Business Partner: Bebidas Alegres
Click on Create Lines From button and select the previously created Purchase Order
Complete the Goods Receipt
1.3. Schedule Costing Background Process
Go to Process Request Window and create a new record with:
* Organization: *
* Process: Costing Background Process
Schedule the process
1.4. Create a related Purchase Invoice with different price
Go to Purchase Invoice Window and create a new record with:
* Organization: España
* Business Partner: Bebidas Alegres
Click on Create Lines From button and select the previously created Goods Receipt
Select the created line and change its Net Unit Price to 10.00
Complete the Purchase Invoice
2. Create a Purchase Order - Goods Receipt - Purchase Invoice for US
2.1. Create a Purchase Order
Go to Purchase Order Window and create a new record with:
* Organization: US
* Business Partner: Be Soft Drinker
Move to lines and create a new record with:
* Product: Cherry Cola
* Ordered Quantity: 1
Book the Purchase Order
2.2. Create a related Goods Receipt
Go to Goods Receipt window and create a new record with:
* Organization: US
* Business Partner: Be Soft Drinker
Click on Create Lines From button and select the previously created Purchase Order
Complete the Goods Receipt
2.3. Schedule Costing Background Process
Go to Process Request Window and reschedule the previously created Costing Background Process entry
2.4. Create a related Purchase Invoice with different price
Go to Purchase Invoice Window and create a new record with:
* Organization: US
* Business Partner: Be Soft Drinker
Click on Create Lines From button and select the previously created Goods Receipt
Select the created line and change its Net Unit Price to 10.00
Complete the Purchase Invoice
3. Check Process Price Difference Errors
3.1. Check n.p.e. error
Go to Process Price Difference Adjustment Window and set:
* Organization: *
* Movement Date: 1 month previous to Today
An error is thrown (due to a null pointer exception)
3.2. Check document's Organizations errors
Reload the Window and set:
* Organization: US
* Movement Date: 1 month previous to Today
Move to Cost Adjustment window and check that there is a new record created.
This record has Organization España, however, it has transactions for both España and US.
This process should create records in the Cost Adjustmen Window per legal entity.
If launched for US or it's children Organizations, one record for US that contains only transactions from US or it's children Organizations
If lauched for * it should create records for España and US, each one with their transactions |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0037412 | | closed | dmiguelez | API Change request |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2017-11-16 09:41 | dmiguelez | New Issue | |
2017-11-16 09:41 | dmiguelez | Assigned To | => Triage Finance |
2017-11-16 09:41 | dmiguelez | OBNetwork customer | => Yes |
2017-11-16 09:41 | dmiguelez | Modules | => Core |
2017-11-16 09:41 | dmiguelez | Triggers an Emergency Pack | => No |
2017-11-16 09:43 | dmiguelez | Assigned To | Triage Finance => nonofrancisco |
2017-11-16 10:11 | maite | Support ticket | => 48861 |
2017-11-16 10:11 | maite | Resolution time | => 1512342000 |
2017-11-16 11:48 | dmiguelez | Status | new => scheduled |
2017-11-17 14:37 | nonofrancisco | Note Added: 0100589 | |
2017-11-30 09:12 | hgbot | Checkin | |
2017-11-30 09:12 | hgbot | Note Added: 0100820 | |
2017-11-30 09:12 | hgbot | Status | scheduled => resolved |
2017-11-30 09:12 | hgbot | Resolution | open => fixed |
2017-11-30 09:12 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/7ce264deda382f46c21f0fb12937ece94d1f9d0e [^] |
2017-11-30 09:12 | hgbot | Checkin | |
2017-11-30 09:12 | hgbot | Note Added: 0100821 | |
2017-11-30 09:13 | hgbot | Checkin | |
2017-11-30 09:13 | hgbot | Note Added: 0100822 | |
2017-11-30 09:21 | dmiguelez | Review Assigned To | => dmiguelez |
2017-11-30 09:21 | dmiguelez | Note Added: 0100825 | |
2017-11-30 09:21 | dmiguelez | Status | resolved => closed |
2017-11-30 09:21 | dmiguelez | Fixed in Version | => 3.0PR18Q1 |
2017-12-29 09:47 | ngarcia | Relationship added | related to 0037412 |
2017-12-29 13:46 | hgbot | Checkin | |
2017-12-29 13:46 | hgbot | Note Added: 0101289 | |
2018-01-03 12:39 | hudsonbot | Checkin | |
2018-01-03 12:39 | hudsonbot | Note Added: 0101500 | |
2018-01-03 12:39 | hudsonbot | Checkin | |
2018-01-03 12:39 | hudsonbot | Note Added: 0101501 | |
Notes |
|
|
Test Plan #1. Price Difference Adjustment for organization "*"
1. Create a Purchase Order - Goods Receipt - Purchase Invoice for España
1.1. Create a Purchase Order
Go to Purchase Order Window and create a new record with:
* Organization: España
* Business Partner: Bebidas Alegres
Move to lines and create a new record with:
* Product: Cerveza Ale
* Ordered Quantity: 1
Book the Purchase Order
1.2. Create a related Goods Receipt
Go to Goods Receipt window and create a new record with:
* Organization: España
* Business Partner: Bebidas Alegres
Click on Create Lines From button and select the previously created Purchase Order
Complete the Goods Receipt
1.3. Schedule Costing Background Process
Go to Process Request Window and create a new record with:
* Organization: *
* Process: Costing Background Process
Schedule the process
1.4. Create a related Purchase Invoice with different price
Go to Purchase Invoice Window and create a new record with:
* Organization: España
* Business Partner: Bebidas Alegres
Click on Create Lines From button and select the previously created Goods Receipt
Select the created line and change its Net Unit Price to 10.00
Complete the Purchase Invoice
2. Create a Purchase Order - Goods Receipt - Purchase Invoice for US
2.1. Create a Purchase Order
Go to Purchase Order Window and create a new record with:
* Organization: US
* Business Partner: Be Soft Drinker
Move to lines and create a new record with:
* Product: Cherry Cola
* Ordered Quantity: 1
Book the Purchase Order
2.2. Create a related Goods Receipt
Go to Goods Receipt window and create a new record with:
* Organization: US
* Business Partner: Be Soft Drinker
Click on Create Lines From button and select the previously created Purchase Order
Complete the Goods Receipt
2.3. Schedule Costing Background Process
Go to Process Request Window and reschedule the previously created Costing Background Process entry
2.4. Create a related Purchase Invoice with different price
Go to Purchase Invoice Window and create a new record with:
* Organization: US
* Business Partner: Be Soft Drinker
Click on Create Lines From button and select the previously created Goods Receipt
Select the created line and change its Net Unit Price to 10.00
Complete the Purchase Invoice
3. Process Price Difference Adjustment
3.1 Go to Process Price Difference Adjustment
* Organization: *
* Date: Today
Run the process
Verify a success message is shown indicating 2 transactions have been adjusted
3.2 Go to Cost Adjustment window
Verify two new records have been created:
* With F&B España SA as organization in the header and a line for "Cerveza Ale" Goods Receipt transaction
* With F&B US Inc as organization in header and a line for "Cherry Cola" Goods Receipt transaction
Test Plan #2. Price Difference Adjustment for non legal organization
1. Create a Purchase Order - Goods Receipt - Purchase Invoice for España - Region Norte
1.1. Create a Purchase Order
Go to Purchase Order Window and create a new record with:
* Organization: F&B España - Region Norte
* Business Partner: Bebidas Alegres
Move to lines and create a new record with:
* Product: Cerveza Ale
* Ordered Quantity: 1
Book the Purchase Order
1.2. Create a related Goods Receipt
Go to Goods Receipt window and create a new record with:
* Organization: F&B España - Region Norte
* Business Partner: Bebidas Alegres
Click on Create Lines From button and select the previously created Purchase Order
Complete the Goods Receipt
1.3. Schedule Costing Background Process
Go to Process Request Window and reschedule the previously created Costing Background Process entry
1.4. Create a related Purchase Invoice with different price
Go to Purchase Invoice Window and create a new record with:
* Organization: F&B España - Region Norte
* Business Partner: Bebidas Alegres
Click on Create Lines From button and select the previously created Goods Receipt
Select the created line and change its Net Unit Price to 10.00
Complete the Purchase Invoice
2. Create a Purchase Order - Goods Receipt - Purchase Invoice for España - Region Sur
2.1. Create a Purchase Order
Go to Purchase Order Window and create a new record with:
* Organization: F&B España - Region Sur
* Business Partner: Bebidas Alegres
Move to lines and create a new record with:
* Product: Cerveza Lager
* Ordered Quantity: 1
Book the Purchase Order
2.2. Create a related Goods Receipt
Go to Goods Receipt window and create a new record with:
* Organization: F&B España - Region Sur
* Business Partner: Bebidas Alegres
Click on Create Lines From button and select the previously created Purchase Order
Complete the Goods Receipt
2.3. Schedule Costing Background Process
Go to Process Request Window and reschedule the previously created Costing Background Process entry
2.4. Create a related Purchase Invoice with different price
Go to Purchase Invoice Window and create a new record with:
* Organization: F&B España - Region Sur
* Business Partner: Bebidas Alegres
Click on Create Lines From button and select the previously created Goods Receipt
Select the created line and change its Net Unit Price to 10.00
Complete the Purchase Invoice
3. Process Price Difference Adjustment
3.1 Go to Process Price Difference Adjustment
* Organization: F&B España - Region Norte
* Date: Today
Run the process
Verify a success message is shown indicating 2 transactions have been adjusted
3.2 Go to Cost Adjustment window
Verify a new record have been created with F&B España SA as organization in the header and two lines:
* With "Cerveza Ale" Goods Receipt transaction
* With "Cerveza Lager" Goods Receipt transaction
Test Plan #3. Price Difference Adjustment from Costing Background Process
1. Create a Purchase Order - Goods Receipt - Purchase Invoice for España - Region Norte
1.1. Create a Purchase Order
Go to Purchase Order Window and create a new record with:
* Organization: F&B España - Region Norte
* Business Partner: Bebidas Alegres
Move to lines and create a new record with:
* Product: Cerveza Ale
* Ordered Quantity: 1
Book the Purchase Order
1.2. Create a related Goods Receipt
Go to Goods Receipt window and create a new record with:
* Organization: F&B España - Region Norte
* Business Partner: Bebidas Alegres
Click on Create Lines From button and select the previously created Purchase Order
Complete the Goods Receipt
1.3. Create a related Purchase Invoice with different price
Go to Purchase Invoice Window and create a new record with:
* Organization: F&B España - Region Norte
* Business Partner: Bebidas Alegres
Click on Create Lines From button and select the previously created Goods Receipt
Select the created line and change its Net Unit Price to 10.00
Complete the Purchase Invoice
2. Create a Purchase Order - Goods Receipt - Purchase Invoice for España - Region Sur
2.1. Create a Purchase Order
Go to Purchase Order Window and create a new record with:
* Organization: F&B España - Region Sur
* Business Partner: Bebidas Alegres
Move to lines and create a new record with:
* Product: Cerveza Lager
* Ordered Quantity: 1
Book the Purchase Order
2.2. Create a related Goods Receipt
Go to Goods Receipt window and create a new record with:
* Organization: F&B España - Region Sur
* Business Partner: Bebidas Alegres
Click on Create Lines From button and select the previously created Purchase Order
Complete the Goods Receipt
2.3. Create a related Purchase Invoice with different price
Go to Purchase Invoice Window and create a new record with:
* Organization: F&B España - Region Sur
* Business Partner: Bebidas Alegres
Click on Create Lines From button and select the previously created Goods Receipt
Select the created line and change its Net Unit Price to 10.00
Complete the Purchase Invoice
3. Process Price Difference Adjustment
3.1 Set "Enable automatic Price Difference Corrections" preference for organization "*"
3.2 Schedule Costing Background Process
3.2 Go to Cost Adjustment window
Verify two new records have been created:
* With F&B España SA as organization in the header and a line for "Cerveza Ale" Goods Receipt transaction
* With F&B España SA as organization in header and a line for "Cerveza Lager" Goods Receipt transaction |
|
|
(0100820)
|
hgbot
|
2017-11-30 09:12
|
|
Repository: erp/devel/pi
Changeset: 7ce264deda382f46c21f0fb12937ece94d1f9d0e
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Tue Nov 28 18:05:00 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7ce264deda382f46c21f0fb12937ece94d1f9d0e [^]
Fixes issue 37302: Process Price Difference Correction fails with n.p.e. or
create wrong Cost Adjustment Documents when it works
Price Difference Adjustment process is invoked for legal organizations.
When invoked from manual process, the legal organization(s) of selected
organization is retrieved, the process is invoked for that legal organization
in order to the Cost Adjustment Document be created with the legal organization
in the header, and lines for transaction belonging to organizations under it.
When invoked from the background process, the process is invoked for legal
organizations under organization "*".
When invoked from the Costing Background process, the legal organization of the
transaction organization is retrieved, and is used to invoke the process.
---
M src/org/openbravo/costing/PriceDifferenceBackground.java
M src/org/openbravo/costing/PriceDifferenceByDateProcess.java
M src/org/openbravo/costing/PriceDifferenceProcess.java
A src/org/openbravo/costing/PriceDifferenceUtil.java
---
|
|
|
(0100821)
|
hgbot
|
2017-11-30 09:12
|
|
|
|
(0100822)
|
hgbot
|
2017-11-30 09:13
|
|
|
|
|
|
|
(0101289)
|
hgbot
|
2017-12-29 13:46
|
|
|
|
|
|
|
|
|