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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028509
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2014-12-31 13:452015-02-04 20:33
ReporterumartirenaView Statuspublic 
Assigned Toumartirena 
PriorityurgentResolutionfixedFixed in Version3.0PR15Q2
StatusclosedFix in branchFixed in SCM revision5d9b7b151669
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToSandrahuguet
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028509: [Costing] Inventory Amount Update fails when the stock is negative

DescriptionInventory Amount Update fails when the total amount of the transactions that is going to change the cost, is negative. The problem is that is trying to create a Physical Inventory with a Qty Count negative, and this is not allowed, so the process fails
Steps To ReproduceAs QA Testing Admin:
 * Create a new Product for Spain org and add a Costing record with cost 10.
 * Create a Shipment for that product of qty 10. Complete it.
 * Run Costing Background Process.
 * Create an Inventory Amount update.
 * Create a Line and put as Unit Cost 15. Process the Inventory Amount Update.
 * Realize that an error is displayed.
Proposed SolutionIn this case revert the Qty Count and Qty Book in the Physical Inventory Lines and negate them to make them positive, maintaining the difference between them to create the same transaction quantity.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0073296)
hgbot (developer)
2015-01-02 15:46

Repository: erp/devel/pi
Changeset: 5d9b7b1516694312013db585f8b8bc86e7bd1e7c
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Wed Dec 31 13:50:58 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/5d9b7b1516694312013db585f8b8bc86e7bd1e7c [^]

Fixes bug 28509: Inventory Amt Update now works with negative stock.

In this case the Qty Count and Qty Book have been reverted in the Physical Inventory Lines and negate them to make them positive, maintaining the difference between them to create the same transaction quantity.

Also getInventoryClosingCost function in AverageAlgorithm has been changed to negate the cost obtained from an inventory closing when the movement qty is positive (closing from negative to 0), because the cost obtained was negative, and this is wrong.

---
M src/org/openbravo/costing/AverageAlgorithm.java
M src/org/openbravo/costing/InventoryAmountUpdateProcess.java
---
(0073359)
psanjuan (manager)
2015-01-08 12:30

Verified it is now possible to create a negative inventory amount update that properly manages opening/closing inventories.
(0073364)
Sandrahuguet (developer)
2015-01-08 13:33

Code review done
(0074098)
hudsonbot (developer)
2015-02-04 20:33

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

- Issue History
Date Modified Username Field Change
2014-12-31 13:45 umartirena New Issue
2014-12-31 13:45 umartirena Assigned To => dmiguelez
2014-12-31 13:45 umartirena Modules => Core
2014-12-31 13:45 umartirena Triggers an Emergency Pack => No
2014-12-31 13:53 umartirena Assigned To dmiguelez => umartirena
2015-01-02 15:46 hgbot Checkin
2015-01-02 15:46 hgbot Note Added: 0073296
2015-01-02 15:46 hgbot Status new => resolved
2015-01-02 15:46 hgbot Resolution open => fixed
2015-01-02 15:46 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5d9b7b1516694312013db585f8b8bc86e7bd1e7c [^]
2015-01-08 12:30 psanjuan Note Added: 0073359
2015-01-08 13:33 Sandrahuguet Review Assigned To => Sandrahuguet
2015-01-08 13:33 Sandrahuguet Note Added: 0073364
2015-01-08 13:33 Sandrahuguet Status resolved => closed
2015-01-08 13:33 Sandrahuguet Fixed in Version => 3.0PR15Q2
2015-02-04 20:33 hudsonbot Checkin
2015-02-04 20:33 hudsonbot Note Added: 0074098


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker