|View Issue Details|
|Type||Category||Severity||Reproducibility||Date Submitted||Last Update|
|defect||[Openbravo ERP] 04. Warehouse management||major||always||2014-12-31 13:45||2015-02-04 20:33|
|Priority||urgent||Resolution||fixed||Fixed in Version||3.0PR15Q2|
|Status||closed||Fix in branch||Fixed in SCM revision||5d9b7b151669|
|OS Version||Database version||Ant version|
|Product Version||SCM revision|
|Review Assigned To||Sandrahuguet|
|Regression introduced in release|
|Regression introduced by commit|
|Triggers an Emergency Pack||No|
0028509: [Costing] Inventory Amount Update fails when the stock is negative
|Description||Inventory 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 Reproduce||As 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 Solution||In 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.|
|Tags||No tags attached.|
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.
|Verified it is now possible to create a negative inventory amount update that properly manages opening/closing inventories.|
|Code review done|
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
|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||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||Note Added: 0074098|
|Copyright © 2000 - 2009 MantisBT Group|