Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0027998
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajorhave not tried2014-10-28 10:272014-12-30 23:24
ReporteraferrazView Statuspublic 
Assigned Toumartirena 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revision4eec717af240
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionProfessional ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Review Assigned Topsanjuan
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0027998: Negative Stock Correction cost adjustment is not properly created

DescriptionNegative Stock Correction cost adjustment is not properly created
Steps To ReproduceIn "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.
Proposed SolutionSee above
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0071549)
hgbot (developer)
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 (manager)
2014-11-12 08:57

Verified.
(0073040)
hudsonbot (developer)
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

- Issue History
Date Modified Username Field Change
2014-10-28 10:27 aferraz New Issue
2014-10-28 10:27 aferraz Assigned To => Sandrahuguet
2014-10-28 10:27 aferraz Modules => Core
2014-10-28 10:27 aferraz Triggers an Emergency Pack => No
2014-11-11 10:01 hgbot Checkin
2014-11-11 10:01 hgbot Note Added: 0071549
2014-11-11 10:01 hgbot Status new => resolved
2014-11-11 10:01 hgbot Resolution open => fixed
2014-11-11 10:01 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4eec717af24079d4365846b5a8bf7085c1c3dda2 [^]
2014-11-12 08:52 aferraz Assigned To Sandrahuguet => umartirena
2014-11-12 08:52 aferraz Status resolved => new
2014-11-12 08:52 aferraz Resolution fixed => open
2014-11-12 08:54 aferraz Steps to Reproduce Updated View Revisions
2014-11-12 08:55 aferraz Status new => scheduled
2014-11-12 08:55 aferraz fix_in_branch => pi
2014-11-12 08:55 aferraz Status scheduled => resolved
2014-11-12 08:55 aferraz Resolution open => fixed
2014-11-12 08:57 aferraz Review Assigned To => psanjuan
2014-11-12 08:57 aferraz Note Added: 0071577
2014-11-12 08:57 aferraz Status resolved => closed
2014-12-30 23:24 hudsonbot Checkin
2014-12-30 23:24 hudsonbot Note Added: 0073040


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker