Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027998Openbravo ERP04. Warehouse managementpublic2014-10-28 10:272014-12-30 23:24
aferraz 
umartirena 
normalmajorhave not tried
closedfixed 
30Professional Appliance
 
 
psanjuan
Core
No
0027998: 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 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 Transaction tab, realize that there are 3 records:

- Transaction 1: Trx Original Cost 10,000.00 - Total Cost 10,000.00 - Unit Cost 10,000.00

- Transaction 2: Trx Original Cost 5,000.00 - Total Cost 7,000.00 - Unit Cost -1,000.00

- Transaction 3: Trx Original Cost 4,500.00 - Total Cost 4,500.00 - Unit Cost 4,500.00

This is not correct, correct should be:

- Transaction 1: Trx Original Cost 10,000.00 - Total Cost 10,000.00 - Unit Cost 10,000.00

- Transaction 2: Trx Original Cost 5,000.00 - Total Cost 7,000.00 - Unit Cost 3,000.00

- Transaction 3: Trx Original Cost 4,500.00 - Total Cost 4,500.00 - Unit Cost 4,500.00

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

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

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

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

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

- Cost adjustment 3 line 1: source process Negative Stock Correction, adjusted amount 0.00, inventory transaction points to receipt 10000035.

This is not correct, correct should be:

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

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

- Cost adjustment 2 line 1: source process Negative Stock Correction, adjusted amount 0.00, inventory transaction points to receipt 10000035.
See above
No tags attached.
Issue History
2014-10-28 10:27aferrazNew Issue
2014-10-28 10:27aferrazAssigned To => Sandrahuguet
2014-10-28 10:27aferrazModules => Core
2014-10-28 10:27aferrazTriggers an Emergency Pack => No
2014-11-11 10:01hgbotCheckin
2014-11-11 10:01hgbotNote Added: 0071549
2014-11-11 10:01hgbotStatusnew => resolved
2014-11-11 10:01hgbotResolutionopen => fixed
2014-11-11 10:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4eec717af24079d4365846b5a8bf7085c1c3dda2 [^]
2014-11-12 08:52aferrazAssigned ToSandrahuguet => umartirena
2014-11-12 08:52aferrazStatusresolved => new
2014-11-12 08:52aferrazResolutionfixed => open
2014-11-12 08:54aferrazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7016#r7016
2014-11-12 08:55aferrazStatusnew => scheduled
2014-11-12 08:55aferrazfix_in_branch => pi
2014-11-12 08:55aferrazStatusscheduled => resolved
2014-11-12 08:55aferrazResolutionopen => fixed
2014-11-12 08:57aferrazReview Assigned To => psanjuan
2014-11-12 08:57aferrazNote Added: 0071577
2014-11-12 08:57aferrazStatusresolved => closed
2014-12-30 23:24hudsonbotCheckin
2014-12-30 23:24hudsonbotNote Added: 0073040

Notes
(0071549)
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
---
(0071577)
aferraz   
2014-11-12 08:57   
Verified.
(0073040)
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