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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0042515
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2019-12-11 12:152020-03-20 17:54
ReportergorkaionView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityhighResolutionfixedFixed in Version3.0PR20Q2
StatusclosedFix in branchFixed in SCM revision7443fbd2b224
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
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

0042515: Wrong cost calculated for backdated goods movements

DescriptionWhen a backdated goods movement is processed the cost is wrongly calculated.

The M- transaction is correctly adjusted, but the M+ is not. This results that the transactions have different total cost which is wrong.

When the cost of the M+ transaction is calculated it should be 20 instead of 25 as it should consider all the adjustments done to the M- transaction.
Steps To Reproduce1. Login as F&B International
2. Create a New Costing Rules : Organization : F&B US, Inc, Average, Fix BackDate : Y
3. Create New Product : Product A, Organization : F&B US, Inc. , Type : Item, Stocked = Yes
4. Create Physical Inventory :Date : Today, Product A, Qty 100, Cost: USD1 , warehouse : US East Cost
5. Create Physical Inventory : Date : Tomorrow, Product A, Qty : 200, Cost USD1.5 , Warehouse : US East Cost
6. Product A Total Stock : 200, Avg Cost USD1.25
7. Goods Movement : Date : Today, Product A, Qty 20, From Us East Cost To US West Cost (back date transaction)
8. Execute Costing Process
9. Go to Window Product, select Product A, go to tab transaction, there are 4 transaction there,
10. Check the total cost for M+ & M-.
 * M- is 20 (correct)
 * M+ is 25 (wrong)
11. Check average costs:
 * M+ avg is 1.05 -> it should be 1
 * 2nd Inv. Avg is 1.28 -> it should be 1.25
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0116683)
AtulOpenbravo (developer)
2020-01-08 09:43

Test Plan

1. Login as F&B International
2. Create a New Costing Rule
   Organization : F&B US, Inc,
   Costing Algorithm: Average
   Fix BackDate : Y
3. Create New Product : Product A, Organization : F&B US, Inc. , Type : Item, Stocked = Yes
4. Create Physical Inventory (1st)
   Movement Date : Today,
   Product A, Qty 100, Cost: USD 1
   Warehouse : US East Cost
5. Create another Physical Inventory (2nd)
   Movement Date : Today +1,
   Product A, Qty : 200, Cost USD 1.5
   Warehouse : US East Cost
6. Schedule Costing Background process in Process Request.
7. Check that Product A has Total Stock : 200, Avg Cost USD 1.25
8. Create a Goods Movement
   Movement Date : Today,
   Product A, Qty 20,
   From Us East Cost To US West Cost
9. Execute Costing Background Process
10. Go to Window Product, select Product A, go to tab transaction, there are 4 transaction there,
11. Check the total cost for M+ & M-.
 * M- is 20 (This is correct)
 * M+ is 20 (This is correct)
12. Check average costs:
 * M+ avg is 1
 * 2nd Inv. Avg is 1.25
This is correct.
(0116714)
hgbot (developer)
2020-01-09 08:12

Repository: erp/devel/pi
Changeset: 7443fbd2b22481ddf912d350cf01420359d0d393
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Jan 07 18:37:21 2020 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/7443fbd2b22481ddf912d350cf01420359d0d393 [^]

Fixes BUG-42515:Wrong cost calculated for backdated goods movements

**Implement a method to get cost adjustment amount from related
Movement From Transaction to consider it into the outgoing
Movement To Transaction

---
M src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java
---
(0116715)
hgbot (developer)
2020-01-09 08:12

Repository: erp/devel/pi
Changeset: a7b87d4144703b58dbf34ad346a29a56b2aee72f
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Wed Jan 08 18:36:44 2020 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a7b87d4144703b58dbf34ad346a29a56b2aee72f [^]

Related to Issue 42515: Code Review changes

* Added final modifiers to variables and parameters
* Combined logic of if clauses into one and extracted the condition
  into a different method
* Use a query to retrieve the TransactionCosts instead of looping
  throught the generated .getList method and then filter the results.

---
M src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java
---
(0116716)
dmiguelez (developer)
2020-01-09 08:13

Code Review + Testing Ok
(0118724)
hudsonbot (developer)
2020-03-20 17:54

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

- Issue History
Date Modified Username Field Change
2019-12-11 12:15 gorkaion New Issue
2019-12-11 12:15 gorkaion Assigned To => Triage Finance
2019-12-11 12:15 gorkaion Modules => Core
2019-12-11 12:15 gorkaion Resolution time => 1577833200
2019-12-11 12:15 gorkaion Triggers an Emergency Pack => No
2019-12-12 08:37 dmiguelez Assigned To Triage Finance => AtulOpenbravo
2019-12-20 12:43 AtulOpenbravo Status new => scheduled
2020-01-08 09:43 AtulOpenbravo Note Added: 0116683
2020-01-09 08:12 hgbot Checkin
2020-01-09 08:12 hgbot Note Added: 0116714
2020-01-09 08:12 hgbot Status scheduled => resolved
2020-01-09 08:12 hgbot Resolution open => fixed
2020-01-09 08:12 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7443fbd2b22481ddf912d350cf01420359d0d393 [^]
2020-01-09 08:12 hgbot Checkin
2020-01-09 08:12 hgbot Note Added: 0116715
2020-01-09 08:13 dmiguelez Review Assigned To => dmiguelez
2020-01-09 08:13 dmiguelez Note Added: 0116716
2020-01-09 08:13 dmiguelez Status resolved => closed
2020-01-09 08:13 dmiguelez Fixed in Version => 3.0PR20Q2
2020-03-20 17:54 hudsonbot Checkin
2020-03-20 17:54 hudsonbot Note Added: 0118724


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker