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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0031202
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajorhave not tried2015-10-21 13:192015-11-23 21:17
ReporterpsanjuanView Statuspublic 
Assigned Toaferraz 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision9c12064c0d44
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabaseOracleJava version1.6
OS VersionUbuntu 8.04.1Database version11.1.0.6.0Ant version1.7.0
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0031202: Wrong cost calculation while stocks gets into 0 due to remaining valuation

DescriptionWrong cost calculation while stocks gets into 0 due to remaining valuation
Steps To ReproduceMake sure you have enabled the preference: Enable Negative Stock Corrections for F&B España.

Rest of steps are executed on F&B España, costing rule "Average", Warehouse dimension = NO.

Go to product window and create a new product named "Product Rounding 31202" for instance. Go to price tab and select "Tarifa Bebidas Alegres", enter a unit/list price = 4
Create a purchase order for that product, org F&B España, of 1 unit. Book the order
Create another purchase order for that product, org F&B España, 1 unit. This time change the price to 3.00. Book the order.
Create a third purchase order for that product, org F&B España, 1 unit. This time change the price to 3.00. Book the order.

Go to Goods Receipt window and create 3 different receipts, one for each order. Select the same warehouse in all the 3 for instance Warehouse = España Norte, but a different storage bin each. Complete the 3 receipts and run costing background process.

Go to product window and check that the cost of this product is 3.3333.

Create a shipment of the 3 units so you get into 0 stock. Complete the shipment and run costing background process.

Check also that each shipment transaction, in the transaction tab, has been valued at a cost of 3.33

Create a new purchase order of 1 unit of the product, this time change the price to 7.00
Receipt that unit in España Norte WH in a storage bin. Complete the receipt and run costing background process.

Go to product window and check that the new average cost for the product is 7.01 while it should have been 7.00

Proposed SolutionA negative stock correction cost adjustment needs to be created when the stock gets 0, therefore a 0 stock means 0 value so the remaining cost is removed
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00310693.0PR16Q1 closedaferraz Wrong cost calculation using inventory amount update caused by remaining valuation 

-  Notes
(0081207)
aferraz (manager)
2015-10-22 13:07
edited on: 2015-10-23 09:58

Test plan:

Make sure you have enabled the preference: Enable Negative Stock Corrections for F&B España.

Rest of steps are executed on F&B España, costing rule "Average", Warehouse dimension = NO.

1. Go to product window and create a new product named "Product Rounding 31202" for instance. Go to price tab and select "Tarifa Bebidas Alegres", enter a unit/list price = 4

2. Create a purchase order for that product, org F&B España, of 1 unit. Book the order
Create another purchase order for that product, org F&B España, 1 unit. This time change the price to 3.00. Book the order.
Create a third purchase order for that product, org F&B España, 1 unit. This time change the price to 3.00. Book the order.

3. Go to Goods Receipt window and create 3 different receipts, one for each order. Select the same warehouse in all the 3 for instance Warehouse = España Norte, but a different storage bin each. Complete the 3 receipts and run costing background process.

Go to product window and check that the cost of this product is 3.3333.

4. Create a shipment of the 3 units so you get into 0 stock. Complete the shipment and run costing background process.

Check also that each shipment transaction, in the transaction tab, has been valued at a cost of 3.33

5. Create a new purchase order of 1 unit of the product, this time change the price to 7.00
Receipt that unit in España Norte WH in a storage bin. Complete the receipt and run costing background process.

Go to product window and check that the new average cost for the product is 7.00.

A negative cost adjustment of -0.01 has been created related to this last receipt, therefore Trx Original Cost = 7.00; Total Cost = 6.99 and Unit Cost = 7.00

Create another purchase order of the product for 1 unit at a price = 5.00
Receipt the order and run the costing background process.

New average cost calculated is = 6.00 (7+5)/2 units.

Create a shipment of 3 units, therefore you get into negative stock of -1. Check that Allow negative Stock is allowed at Client level.

Create another purchase order of 3 units at a price of 4.00. Receipt the order and run costing background process.

Check that a new negative stock correction has been created for this last receipt of 2.00
Check that new average cost is 4.00
Negative adjustment amount = [(-1+6.00)+(3*4.00)+X]/2 units = 4.00 (new average cost).

(0081250)
psanjuan (manager)
2015-10-23 09:59

Test Plan above verified.
(0081744)
hgbot (developer)
2015-11-12 11:49

Repository: erp/devel/pi
Changeset: 9c12064c0d44f487f2df11a897a30bb7c344b8c9
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Oct 26 17:00:37 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9c12064c0d44f487f2df11a897a30bb7c344b8c9 [^]

Fixes issue 31202: NSC when you get into 0 stock

Negative Stock Correction adjustment should be created when you get into zero stock (only in case you do not get into zero stock by a Closing Inventory), as it is created when you get into negative stock.

---
M src/org/openbravo/costing/CostingServer.java
M src/org/openbravo/costing/CostingUtils.java
---
(0081745)
hgbot (developer)
2015-11-12 11:49

Repository: erp/devel/pi
Changeset: 6b0630da41f100f3cb6964f23df7696c96496397
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Oct 26 15:07:34 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6b0630da41f100f3cb6964f23df7696c96496397 [^]

Related to issue 31202: Update inventory types created by Costing Rule process

---
M referencedata/sampledata/F_B_International_Group/M_INVENTORY.xml
M referencedata/sampledata/QA_Testing/M_INVENTORY.xml
---
(0081746)
hgbot (developer)
2015-11-12 11:49

Repository: erp/devel/pi
Changeset: 64e4f46536b75e92c85e4bfabc5207151df93650
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Oct 26 16:40:52 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/64e4f46536b75e92c85e4bfabc5207151df93650 [^]

Related to issue 31202: Run Costing Background process for QA Testing client

---
M referencedata/sampledata/QA_Testing/M_COSTING.xml
M referencedata/sampledata/QA_Testing/M_TRANSACTION.xml
M referencedata/sampledata/QA_Testing/M_TRANSACTION_COST.xml
---
(0081747)
hgbot (developer)
2015-11-12 11:49

Repository: erp/devel/pi
Changeset: c7ee4c9a5a1e90b203726bb97a6209a7afa1f0be
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Nov 12 11:48:27 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c7ee4c9a5a1e90b203726bb97a6209a7afa1f0be [^]

Related to Issue 31202. Code Review changes.

While looking for existing Processed Transactions for a Product
it now takes into account costing dimensions, such as Warehouse.

---
M src/org/openbravo/costing/CostingServer.java
M src/org/openbravo/costing/CostingUtils.java
---
(0081748)
dmiguelez (developer)
2015-11-12 11:49

Code Review + Testing Ok
(0081752)
hgbot (developer)
2015-11-12 13:12

Repository: erp/devel/pi
Changeset: 31b64687c6c0522c003c3df3d45723e2b106abe0
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Oct 30 00:43:32 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/31b64687c6c0522c003c3df3d45723e2b106abe0 [^]

Related to issue 31202: Added an automated test in TestCosting

---
M src-test/src/org/openbravo/test/costing/TestCosting.java
---
(0081886)
hgbot (developer)
2015-11-16 14:38

Repository: erp/devel/pi
Changeset: 7971376bb0ad13b930a6a33edc5714151c251664
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Nov 16 11:16:11 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7971376bb0ad13b930a6a33edc5714151c251664 [^]

Related to issue 31202: Fix testCostingE2 test in TestCosting

---
M src-test/src/org/openbravo/test/costing/TestCosting.java
---
(0082205)
hudsonbot (developer)
2015-11-23 21:17

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/7b56bebaaa88 [^]
Maturity status: Test
(0082206)
hudsonbot (developer)
2015-11-23 21:17

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/7b56bebaaa88 [^]
Maturity status: Test
(0082207)
hudsonbot (developer)
2015-11-23 21:17

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/7b56bebaaa88 [^]
Maturity status: Test
(0082208)
hudsonbot (developer)
2015-11-23 21:17

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/7b56bebaaa88 [^]
Maturity status: Test
(0082209)
hudsonbot (developer)
2015-11-23 21:17

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/7b56bebaaa88 [^]
Maturity status: Test
(0082238)
hudsonbot (developer)
2015-11-23 21:17

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/7b56bebaaa88 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-10-21 13:19 psanjuan New Issue
2015-10-21 13:19 psanjuan Assigned To => Triage Finance
2015-10-21 13:19 psanjuan Modules => Core
2015-10-21 13:19 psanjuan Triggers an Emergency Pack => No
2015-10-21 13:19 psanjuan Relationship added related to 0031069
2015-10-21 13:28 psanjuan Note Added: 0081173
2015-10-21 13:29 psanjuan Steps to Reproduce Updated View Revisions
2015-10-21 13:29 psanjuan Proposed Solution updated
2015-10-21 13:29 psanjuan Note Edited: 0081173 View Revisions
2015-10-21 13:41 psanjuan Steps to Reproduce Updated View Revisions
2015-10-21 13:45 psanjuan Steps to Reproduce Updated View Revisions
2015-10-21 15:02 psanjuan Steps to Reproduce Updated View Revisions
2015-10-21 15:03 psanjuan Steps to Reproduce Updated View Revisions
2015-10-21 15:10 psanjuan Steps to Reproduce Updated View Revisions
2015-10-21 15:13 psanjuan Steps to Reproduce Updated View Revisions
2015-10-21 15:15 psanjuan Steps to Reproduce Updated View Revisions
2015-10-21 15:29 psanjuan Steps to Reproduce Updated View Revisions
2015-10-21 15:45 psanjuan Steps to Reproduce Updated View Revisions
2015-10-21 15:46 psanjuan Steps to Reproduce Updated View Revisions
2015-10-21 15:48 psanjuan Steps to Reproduce Updated View Revisions
2015-10-21 15:49 psanjuan Note Added: 0081177
2015-10-21 15:49 psanjuan Steps to Reproduce Updated View Revisions
2015-10-21 15:53 psanjuan Steps to Reproduce Updated View Revisions
2015-10-21 15:53 psanjuan Note Deleted: 0081173
2015-10-22 10:36 psanjuan Steps to Reproduce Updated View Revisions
2015-10-22 10:37 psanjuan Note Deleted: 0081177
2015-10-22 10:38 psanjuan Steps to Reproduce Updated View Revisions
2015-10-22 10:39 aferraz Assigned To Triage Finance => aferraz
2015-10-22 10:39 aferraz Status new => scheduled
2015-10-22 10:45 psanjuan Steps to Reproduce Updated View Revisions
2015-10-22 10:49 aferraz Steps to Reproduce Updated View Revisions
2015-10-22 13:07 aferraz Note Added: 0081207
2015-10-23 09:24 psanjuan Note Edited: 0081207 View Revisions
2015-10-23 09:37 psanjuan Note Edited: 0081207 View Revisions
2015-10-23 09:58 psanjuan Note Edited: 0081207 View Revisions
2015-10-23 09:59 psanjuan Note Added: 0081250
2015-11-12 11:49 hgbot Checkin
2015-11-12 11:49 hgbot Note Added: 0081744
2015-11-12 11:49 hgbot Status scheduled => resolved
2015-11-12 11:49 hgbot Resolution open => fixed
2015-11-12 11:49 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9c12064c0d44f487f2df11a897a30bb7c344b8c9 [^]
2015-11-12 11:49 hgbot Checkin
2015-11-12 11:49 hgbot Note Added: 0081745
2015-11-12 11:49 hgbot Checkin
2015-11-12 11:49 hgbot Note Added: 0081746
2015-11-12 11:49 hgbot Checkin
2015-11-12 11:49 hgbot Note Added: 0081747
2015-11-12 11:49 dmiguelez Review Assigned To => dmiguelez
2015-11-12 11:49 dmiguelez Note Added: 0081748
2015-11-12 11:49 dmiguelez Status resolved => closed
2015-11-12 13:12 hgbot Checkin
2015-11-12 13:12 hgbot Note Added: 0081752
2015-11-16 14:38 hgbot Checkin
2015-11-16 14:38 hgbot Note Added: 0081886
2015-11-23 21:17 hudsonbot Checkin
2015-11-23 21:17 hudsonbot Note Added: 0082205
2015-11-23 21:17 hudsonbot Checkin
2015-11-23 21:17 hudsonbot Note Added: 0082206
2015-11-23 21:17 hudsonbot Checkin
2015-11-23 21:17 hudsonbot Note Added: 0082207
2015-11-23 21:17 hudsonbot Checkin
2015-11-23 21:17 hudsonbot Note Added: 0082208
2015-11-23 21:17 hudsonbot Checkin
2015-11-23 21:17 hudsonbot Note Added: 0082209
2015-11-23 21:17 hudsonbot Checkin
2015-11-23 21:17 hudsonbot Note Added: 0082238


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker