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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036757
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2017-08-31 12:172017-09-21 16:49
ReporterngarciaView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityurgentResolutionfixedFixed in Version3.0PR17Q4
StatusclosedFix in branchFixed in SCM revision2873be0d1b66
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036757: Negative Stock Correction for remaining stock valuation not done in closing inventory lines (when validating a costing rule)

DescriptionNegative Stock Correction for remaining stock valuation not done in closing inventory lines (when validating a costing rule)

The problem is that in CostingRuleProcess.updateInventoriesCostAndProcessInitInventories function the transactions related to inventory closing lines are not ordered (getInventoryLineTransactions). Then, when checking the current stock in CostingServer.checkCostAdjustments function by CostAdjustmentUtils.getStockOnTransactionDate function, only the transactions with higher movementqty are taken into account and the currentstock could never be 0
Steps To ReproduceAs group admin role:
   Having a product with stock in different warehouses and a current average cost different from the current cost of costing tab (in order to have a remaining value after closing inventories)
   Having a costing rule already validated with Warehouse Dimension = 'N'

   Go to Costing Rule window and validate a new rule for the same organization but with Warehouse Dimension = 'Y'

   Check no Negative Stock Correction is done for that product (it is not required to have the preference to enable it)
Proposed SolutionAdd following order by to CostingRuleProcess.getInventoryLineTransactions():
where.append(" order by trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " desc");
where.append(" , trx." + MaterialTransaction.PROPERTY_ID);
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks design defect 0036758 newTriage Omni WMS After validating a costing rule with warehouse dimension, remaining stock valuation could exist on each warehouse but not global 

-  Notes
(0098784)
AtulOpenbravo (developer)
2017-09-04 08:21

- Login as F&B International Group Admin
- Navigate to Product window, add product
  Search Key: test costing 36757
  Name: test costing 36757
  Product Category: Others
  Product Type:Item
  Save record
- Add Prices information.
  1. Price List Version: Tarifa Bebidas Alegres, Unit Price:8.00, List Price:8.00
  2. Price List Version: Tarifa de ventas, Unit Price:10.00, List Price:10.00
- Navigate to Purchase Order, create a record for "Bebidas Alegres, S.L." in F&B Espana organization.
- Add line for product "test costing 36757", quantity 100, complete it.
- Create goods receipt for above order in F&B Espana Organization.
- Add two lines for purchase order line for product "test costing 36757" using Create Lines From process as
  1. Quantity = 50, Storage Bin = Rn-0-0-0
  2. Quantity = 50, Storage Bin = Rs-0-0-0
- Complete goods receipt.
- Generate invoice from receipt and Navigate to Purchase Invoice selecting the invoice previously created.
- Update the Invoice Line unit price to 9.00
- Complete the invoice.
- Make sure that costing background process is executed.
- In Process request, schedule Price Correction Background process with timing Run Immediately.
- Navigate to Costing Rules add record,
  Organization: F&BEspana
  Costing Algorithm: Average
  Starting Date: Today's Date
  Warehouse Dimension = Yes
- Validate costing rule and Navigate to Cost Adjustment window
- Realize that several records with Negative Stock Correction as Source process appears and there exists a record for product "test costing 36757".
(0098809)
hgbot (developer)
2017-09-04 14:21

Repository: erp/devel/pi
Changeset: 2873be0d1b66505d00e85de1ec705aa2500a7874
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Sep 04 14:03:39 2017 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/2873be0d1b66505d00e85de1ec705aa2500a7874 [^]

Fixes issue 36757: Negative Stock Correction for remaining stock valuation
not done in closing inventory lines (when validating a costing rule)

Add order by clause to sort movement qty desc, material transaction id

---
M src/org/openbravo/costing/CostingRuleProcess.java
---
(0098810)
aferraz (manager)
2017-09-04 14:21

Code review + Testing OK
(0099356)
hudsonbot (developer)
2017-09-21 16:49

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

- Issue History
Date Modified Username Field Change
2017-08-31 12:17 ngarcia New Issue
2017-08-31 12:17 ngarcia Assigned To => Triage Finance
2017-08-31 12:17 ngarcia Modules => Core
2017-08-31 12:17 ngarcia Triggers an Emergency Pack => No
2017-08-31 12:17 ngarcia Issue Monitored: networkb
2017-08-31 12:18 ngarcia Resolution time => 1505944800
2017-08-31 12:30 ngarcia Relationship added blocks 0036642
2017-08-31 12:31 ngarcia Relationship deleted blocks 0036642
2017-08-31 12:31 ngarcia Relationship added blocks 0036758
2017-08-31 13:26 ngarcia Steps to Reproduce Updated View Revisions
2017-08-31 13:55 aferraz Proposed Solution updated
2017-08-31 13:56 aferraz Assigned To Triage Finance => AtulOpenbravo
2017-09-04 08:21 AtulOpenbravo Note Added: 0098784
2017-09-04 14:21 hgbot Checkin
2017-09-04 14:21 hgbot Note Added: 0098809
2017-09-04 14:21 hgbot Status new => resolved
2017-09-04 14:21 hgbot Resolution open => fixed
2017-09-04 14:21 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2873be0d1b66505d00e85de1ec705aa2500a7874 [^]
2017-09-04 14:21 aferraz Review Assigned To => aferraz
2017-09-04 14:21 aferraz Note Added: 0098810
2017-09-04 14:21 aferraz Status resolved => closed
2017-09-04 14:21 aferraz Fixed in Version => 3.0PR17Q4
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099356


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker