Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027946Openbravo ERP04. Warehouse managementpublic2014-10-22 12:292014-12-30 23:24
aferraz 
umartirena 
highmajoralways
closedfixed 
30
 
 
Core
No
0027946: Negative Stock Correction cost adjustment is not properly created
Negative Stock Correction cost adjustment is not properly created
In "QA Testing" client:

Create a new Product named "Costing V911" for Spain organization.
Go to Price tab, select "Purchase" price list and enter a unit/list price of 15 €. Go to Costing tab and enter a new line for Spain organization, Average cost type, cost 25, starting date 01-01-2014 date and ending date 31-12-9999

Go to Purchase Invoice window and create a new invoice for Spain organization, product "Costing V911", invoice date 11-10-2014, quantity 500 and price 15.
Complete the invoice and post it. Let's say this is invoice 10000037.
Realize that the value posted to the ledger is 7,500.00 (500 units * 15 €/unit)

Go to Goods Shipment window and create a new shipment dated on 15-10-2014, product "Costing V911", quantity 400, storage bin L01. Complete. Let's say this is shipment 500024.

Navigate to Process Request window and run "Costing Background process".

Go to shipment window and post the shipment 500024.
Realize that the value posted to the ledger is 10,000.00 (400 units * 25 €/unit)

Go to Goods Receipt window and create a new receipt dated on 20-10-2014. Click on Create Lines From, select invoice 10000037, select storage bin L01 and enter 200 units. Complete. Let's say this is receipt 10000034.

Navigate to Process Request window and run "Costing Background process".

Go to receipt window and post the receipt 10000034.
Realize that the value posted to the ledger is 5,000.00 (200 units * 25 €/unit)

Navigate to Process Request window and run "Price Correction Background".

Go to Goods Receipt window and create a new receipt dated on 25-10-2014. Click on Create Lines From, select invoice 10000037, select storage bin L01 and enter 300 units. Complete. Let's say this is receipt 10000035.

Navigate to Process Request window and run "Costing Background process".

Go to receipt window and post the receipt 10000035.
Realize that the value posted to the ledger is 10,500.00 (300 units * 35 €/unit)

This is not correct, correct should be:

Value posted to the ledger: 4,500.00 (300 units * 15 €/unit)

Navigate to Process Request window and run "Price Correction Background".

Navigate to Product window, select "Costing V911" and go to Costing tab, realize that the last record has a cost of -25.

This is not correct, correct should be:

The last record has a cost of 15.

Navigate to Cost Adjustment window, search the two last created records:

- Cost adjustment 1: source process Price Difference Correction, adjusted amount -2,000.00, inventory transaction points to receipt 10000034.

- Cost adjustment 2: source process Price Difference Correction, adjusted amount -6,000.00, inventory transaction points to receipt 10000035.

This is not correct, correct should be:

- Cost adjustment 1: source process Price Difference Correction, adjusted amount -2,000.00, inventory transaction points to receipt 10000034.

- Cost adjustment 2: source process Negative Stock Correction, adjusted amount 4,000.00, inventory transaction points to receipt 10000034.

- Cost adjustment 3: source process Negative Stock Correction, adjusted amount 0.00, inventory transaction points to receipt 10000035.
See above
No tags attached.
Issue History
2014-10-22 12:29aferrazNew Issue
2014-10-22 12:29aferrazAssigned To => umartirena
2014-10-22 12:29aferrazModules => Core
2014-10-22 12:29aferrazTriggers an Emergency Pack => No
2014-10-23 11:00umartirenaStatusnew => scheduled
2014-10-23 11:00umartirenafix_in_branch => pi
2014-10-23 18:38hgbotCheckin
2014-10-23 18:38hgbotNote Added: 0071147
2014-10-23 18:38hgbotStatusscheduled => resolved
2014-10-23 18:38hgbotResolutionopen => fixed
2014-10-23 18:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/917e6c1d5d08a325c194f117ba522f284aeb953e [^]
2014-10-28 10:50psanjuanNote Added: 0071214
2014-10-28 10:50psanjuanStatusresolved => closed
2014-10-28 10:50psanjuanfix_in_branchpi =>
2014-11-11 10:01hgbotCheckin
2014-11-11 10:01hgbotNote Added: 0071548
2014-12-30 23:23hudsonbotCheckin
2014-12-30 23:23hudsonbotNote Added: 0072980
2014-12-30 23:24hudsonbotCheckin
2014-12-30 23:24hudsonbotNote Added: 0073041

Notes
(0071147)
hgbot   
2014-10-23 18:38   
Repository: erp/devel/pi
Changeset: 917e6c1d5d08a325c194f117ba522f284aeb953e
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Thu Oct 23 18:36:05 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/917e6c1d5d08a325c194f117ba522f284aeb953e [^]

Fixed issue 27946.Add negative correction for basetrx when needed.

In some cases like Price Difference Correction it is possible to have a base
trx that also requires a negative stock correction adjustment. A check is
added to insert an aditional negative correction line for the base transaction
when needed.

---
M src/org/openbravo/costing/AverageCostAdjustment.java
---
(0071214)
psanjuan   
2014-10-28 10:50   
Verified.
(0071548)
hgbot   
2014-11-11 10:01   
Repository: erp/devel/pi
Changeset: 4eec717af24079d4365846b5a8bf7085c1c3dda2
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Tue Nov 11 10:00:36 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4eec717af24079d4365846b5a8bf7085c1c3dda2 [^]

Fixes Bug 27998: Negative Stock Correction adjustments now are properly created

Due to Issue 27946, each time that an adjustment is created it is checked if a Negative Stock Correction adjustment is needed, and if so, it is created. So now, in Costing Server, before creating any Negative Stock Correction it is checked if another Cost Adjustment has been created, and if it is, this step is skipped.

---
M src/org/openbravo/costing/CostingServer.java
M src/org/openbravo/costing/LandedCostProcess.java
M src/org/openbravo/costing/PriceDifferenceProcess.java
---
(0072980)
hudsonbot   
2014-12-30 23:23   
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/6525fe229e06 [^]
Maturity status: Test
(0073041)
hudsonbot   
2014-12-30 23:24   
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/6525fe229e06 [^]
Maturity status: Test