Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033968Openbravo ERP09. Financial managementpublic2016-09-13 12:562016-12-16 18:38
dmiguelez 
dmiguelez 
urgentcriticalalways
closedfixed 
20Community Appliance
 
3.0PR17Q13.0PR17Q1 
aferraz
Core
Production - QA Approved
2016-04-20
3.0PR16Q3
https://code.openbravo.com/erp/devel/pi/rev/5406f70dad91 [^]
No
0033968: Wrong costs calculated with Backdated Transactions
After the fix done to improve performance, in case of Backdated transactions, it is possible to calculate wrong cost values.

Now, the accumulated stock and accumulated valuation are persisted in the m_costing table. Due to backdated cost adjustments, this values can differ from the original ones and they create further problems.
This problem has been found with SuperdoƱa's data.
It can be reproduced using their environment.
No tags attached.
related to defect 00334113.0PR17Q1 closed dmiguelez Bad performance Costing Background process using 3 types of adjustments 
related to defect 00333913.0PR16Q4 closed dmiguelez Not possible to launch the costing background process because manual costing registers 
related to defect 00320123.0PR16Q2 closed aferraz Not possible to either validate a costing rule or create an inventory amount update under some circumstancies 
related to defect 0033302 closed Sanjota Costing engine is not taking into account that purchase price list can be setup to include taxes. 
depends on backport 00339693.0PR16Q3.3 closed dmiguelez Wrong costs calculated with Backdated Transactions 
depends on defect 0034184 closed dmiguelez API Change Request. Add parameters in CostingUtils and CostAdjustmentUtils methods 
depends on backport 00341903.0PR16Q4 closed dmiguelez Wrong costs calculated with Backdated Transactions 
caused by defect 00325043.0PR16Q3 closed aferraz Huge performance problem in the costing background process and using the Negative stock correction too 
related to defect 0036831 closed AtulOpenbravo Wrong average cost after negative stock correction: Total Stock Valuation of Costing tab is not updated 
Issue History
2016-09-13 12:56dmiguelezNew Issue
2016-09-13 12:56dmiguelezAssigned To => dmiguelez
2016-09-13 12:56dmiguelezModules => Core
2016-09-13 12:56dmiguelezRegression level => Production - Confirmed Stable
2016-09-13 12:56dmiguelezRegression date => 2016-04-18
2016-09-13 12:56dmiguelezRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/5406f70dad91 [^]
2016-09-13 12:56dmiguelezTriggers an Emergency Pack => No
2016-09-13 12:57dmiguelezStatusnew => scheduled
2016-09-14 11:02aferrazRegression date2016-04-18 => 2016-04-20
2016-09-14 11:02aferrazRegression introduced in release => 3.0PR16Q3
2016-09-16 13:32aferrazRelationship addedcaused by 0032504
2016-09-16 13:34aferrazRelationship addedrelated to 0033411
2016-09-16 13:41aferrazRelationship addedrelated to 0033391
2016-09-16 13:42aferrazRelationship addedrelated to 0032012
2016-09-16 14:12maiteIssue Monitored: ngarcia
2016-09-19 10:12aferrazRelationship addedrelated to 0033302
2016-10-11 09:56aferrazRelationship addeddepends on 0034184
2016-10-11 12:51aferrazTarget Version => 3.0PR16Q4
2016-10-11 18:17aferrazTarget Version3.0PR16Q4 => 3.0PR17Q1
2016-10-11 18:24aferrazStatusscheduled => acknowledged
2016-10-11 18:25aferrazStatusacknowledged => scheduled
2016-10-25 13:57aferrazRegression levelProduction - Confirmed Stable => Production - QA Approved
2016-10-26 11:52hgbotCheckin
2016-10-26 11:52hgbotNote Added: 0090892
2016-10-26 11:52hgbotStatusscheduled => resolved
2016-10-26 11:52hgbotResolutionopen => fixed
2016-10-26 11:52hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d66d2a4148987acab6ef1f586ee019097ef1d1e9 [^]
2016-10-26 11:52hgbotCheckin
2016-10-26 11:52hgbotNote Added: 0090893
2016-10-26 11:52hgbotCheckin
2016-10-26 11:52hgbotNote Added: 0090894
2016-10-26 11:52hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/d66d2a4148987acab6ef1f586ee019097ef1d1e9 [^] => http://code.openbravo.com/erp/devel/pi/rev/5f40df94e94e554aabc270a079a6a3eb50d86a39 [^]
2016-10-26 11:53hgbotCheckin
2016-10-26 11:53hgbotNote Added: 0090895
2016-10-26 11:53hgbotCheckin
2016-10-26 11:53hgbotNote Added: 0090896
2016-10-26 11:53hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/5f40df94e94e554aabc270a079a6a3eb50d86a39 [^] => http://code.openbravo.com/erp/devel/pi/rev/deff2af561180f6db2fd0d6de8b0eae8472f4a23 [^]
2016-10-26 11:53hgbotCheckin
2016-10-26 11:53hgbotNote Added: 0090897
2016-10-26 11:53hgbotCheckin
2016-10-26 11:53hgbotNote Added: 0090898
2016-10-26 11:53hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/deff2af561180f6db2fd0d6de8b0eae8472f4a23 [^] => http://code.openbravo.com/erp/devel/pi/rev/b6192a72cbba54782546d51450fa4d59125d55cb [^]
2016-10-26 11:53hgbotCheckin
2016-10-26 11:53hgbotNote Added: 0090899
2016-10-26 11:53hgbotCheckin
2016-10-26 11:53hgbotNote Added: 0090900
2016-10-26 11:53hgbotCheckin
2016-10-26 11:53hgbotNote Added: 0090901
2016-10-26 11:53hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/b6192a72cbba54782546d51450fa4d59125d55cb [^] => http://code.openbravo.com/erp/devel/pi/rev/61f70f49b80946bb3985d8d8a9e06ad2a063caa0 [^]
2016-10-26 11:53hgbotCheckin
2016-10-26 11:53hgbotNote Added: 0090902
2016-10-26 11:54hgbotCheckin
2016-10-26 11:54hgbotNote Added: 0090903
2016-10-26 11:54hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/61f70f49b80946bb3985d8d8a9e06ad2a063caa0 [^] => http://code.openbravo.com/erp/devel/pi/rev/353d8721b32b0be15d0ac87ff51757c0b81112b2 [^]
2016-10-26 11:54hgbotCheckin
2016-10-26 11:54hgbotNote Added: 0090904
2016-10-26 11:54hgbotCheckin
2016-10-26 11:54hgbotNote Added: 0090905
2016-10-26 11:54hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/353d8721b32b0be15d0ac87ff51757c0b81112b2 [^] => http://code.openbravo.com/erp/devel/pi/rev/742ee19c4ecd213930dda39033c6d6df769f9e7f [^]
2016-10-26 11:54hgbotCheckin
2016-10-26 11:54hgbotNote Added: 0090906
2016-10-26 11:54hgbotCheckin
2016-10-26 11:54hgbotNote Added: 0090907
2016-10-26 11:54hgbotCheckin
2016-10-26 11:54hgbotNote Added: 0090908
2016-10-26 11:54hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/742ee19c4ecd213930dda39033c6d6df769f9e7f [^] => http://code.openbravo.com/erp/devel/pi/rev/d7a06320f6d930fa56b42d871401c3cd853de156 [^]
2016-10-26 11:54hgbotCheckin
2016-10-26 11:54hgbotNote Added: 0090909
2016-10-26 11:54hgbotCheckin
2016-10-26 11:54hgbotNote Added: 0090910
2016-10-26 11:54hgbotCheckin
2016-10-26 11:54hgbotNote Added: 0090911
2016-10-26 11:55hgbotCheckin
2016-10-26 11:55hgbotNote Added: 0090912
2016-10-26 11:55hgbotCheckin
2016-10-26 11:55hgbotNote Added: 0090913
2016-10-26 11:55hgbotCheckin
2016-10-26 11:55hgbotNote Added: 0090914
2016-10-26 11:58hgbotCheckin
2016-10-26 11:58hgbotNote Added: 0090915
2016-10-26 12:49hgbotCheckin
2016-10-26 12:49hgbotNote Added: 0090918
2016-10-26 12:49hgbotCheckin
2016-10-26 12:49hgbotNote Added: 0090919
2016-11-03 15:21ngarciaResolution time => 1479942000
2016-11-03 17:56aferrazReview Assigned To => aferraz
2016-11-03 17:56aferrazNote Added: 0091086
2016-11-03 17:56aferrazStatusresolved => closed
2016-11-03 17:56aferrazFixed in Version => 3.0PR17Q1
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092556
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092557
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092558
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092559
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092560
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092561
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092562
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092563
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092564
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092565
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092566
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092567
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092568
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092569
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092570
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092571
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092572
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092573
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092574
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092575
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092576
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092577
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092578
2017-09-12 14:50aferrazRelationship addedrelated to 0036831

Notes
(0090892)
hgbot   
2016-10-26 11:52   
Repository: erp/devel/pi
Changeset: d66d2a4148987acab6ef1f586ee019097ef1d1e9
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Mon Sep 19 13:55:25 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d66d2a4148987acab6ef1f586ee019097ef1d1e9 [^]

Fixes issue 33968: Wrong costs calculated with Backdated Transactions

CumStock and CumCost will not be calculated in case there is a cost adjustment.

---
M src/org/openbravo/costing/AverageCostAdjustment.java
---
(0090893)
hgbot   
2016-10-26 11:52   
Repository: erp/devel/pi
Changeset: 65be458e7d27f26420809ccc6d2ecbd3f304fc3f
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Sep 19 14:53:39 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/65be458e7d27f26420809ccc6d2ecbd3f304fc3f [^]

Related to issue 33968: Code review improvements

---
M src/org/openbravo/costing/AverageCostAdjustment.java
---
(0090894)
hgbot   
2016-10-26 11:52   
Repository: erp/devel/pi
Changeset: 5f40df94e94e554aabc270a079a6a3eb50d86a39
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Mon Sep 19 13:55:25 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5f40df94e94e554aabc270a079a6a3eb50d86a39 [^]

Fixes issue 33968: Filter by costing transaction instead of current transaction

Filter by costing transaction instead of current transaction when existsCumulatedStockOnTrxDate or existsCumulatedValuationOnTrxDate in CostAdjustmentUtils.getStockOnTransactionDate and CostAdjustmentUtils.getValuedStockOnTransactionDate.

---
M src/org/openbravo/costing/CostAdjustmentUtils.java
---
(0090895)
hgbot   
2016-10-26 11:53   
Repository: erp/devel/pi
Changeset: 2cd8d93344f8f42c5e75a197e81e5459a5d1e27a
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Sep 19 14:53:39 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2cd8d93344f8f42c5e75a197e81e5459a5d1e27a [^]

Related to issue 33968: Retrieve costing transaction only once

Retrieve costing transaction only once in CostAdjustmentUtils.getStockOnTransactionDate, CostAdjustmentUtils.getValuedStockOnTransactionDate, CostingUtils.getCurrentStock and CostingUtils.getCurrentValuedStock.

---
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingUtils.java
---
(0090896)
hgbot   
2016-10-26 11:53   
Repository: erp/devel/pi
Changeset: deff2af561180f6db2fd0d6de8b0eae8472f4a23
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Mon Sep 19 13:55:25 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/deff2af561180f6db2fd0d6de8b0eae8472f4a23 [^]

Fixes issue 33968: Add movementdate filter in CostAdjustmentUtils in case BDT

Add movementdate filter in case costing rule allows backdated transactions in CostAdjustmentUtils.getStockOnTransactionDate and CostAdjustmentUtils.getValuedStockOnTransactionDate.

---
M src/org/openbravo/costing/CostAdjustmentUtils.java
---
(0090897)
hgbot   
2016-10-26 11:53   
Repository: erp/devel/pi
Changeset: ca6556a420720a7389ce15383cfc299dba71fec9
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Sep 19 14:53:39 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ca6556a420720a7389ce15383cfc299dba71fec9 [^]

Related to issue 33968: Rename movementdate and dateFrom parameters

Rename movementdate and dateFrom parameters to cmvtdate and ctrxdate and use costing transaction trxprocessdate instead of costing starting date in CostAdjustmentUtils.getStockOnTransactionDate and CostAdjustmentUtils.getValuedStockOnTransactionDate.

---
M src/org/openbravo/costing/CostAdjustmentUtils.java
---
(0090898)
hgbot   
2016-10-26 11:53   
Repository: erp/devel/pi
Changeset: b6192a72cbba54782546d51450fa4d59125d55cb
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Sep 20 18:27:30 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b6192a72cbba54782546d51450fa4d59125d55cb [^]

Fixes issue 33968: Use getLastCumulatedCosting instead of getProductCost

Use AverageAlgorithm.getLastCumulatedCosting instead of AverageAlgorithm.getProductCost to retrieve last costing entry with cumulated values in CostAdjustmentUtils.getStockOnTransactionDate, CostingUtils.getCurrentStock and CostingUtils.getCurrentValuedStock.

---
M src/org/openbravo/costing/AverageAlgorithm.java
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingUtils.java
---
(0090899)
hgbot   
2016-10-26 11:53   
Repository: erp/devel/pi
Changeset: e711b068ea90a2d0ce0dab98b0584103d3d7ecbf
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Sep 20 19:01:51 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e711b068ea90a2d0ce0dab98b0584103d3d7ecbf [^]

Related to issue 33968: Avoid API change

Add cumcost not null restriction and retrieve unique result in AverageAlgorithm.getLastCumulatedCosting.
Avoid API change by calculating correct date outside the method and removing unneeded transaction parameter in CostingUtils.getCurrentStock and CostingUtils.getCurrentValuedStock.
Use AverageAlgorithm.getLastCumulatedCosting also in CostAdjustmentUtils.getValuedStockOnTransactionDate.
Call to AverageAlgorithm.getLastCumulatedCosting with movementdate or trxprocessdate depending on areBackdatedTrxFixed in CostAdjustmentUtils.getStockOnTransactionDate and CostAdjustmentUtils.getValuedStockOnTransactionDate.

---
M src/org/openbravo/costing/AverageAlgorithm.java
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingUtils.java
---
(0090900)
hgbot   
2016-10-26 11:53   
Repository: erp/devel/pi
Changeset: 05a2c5a0d1275bb5e913ac541f39a8b2c195844f
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Sep 20 19:40:33 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/05a2c5a0d1275bb5e913ac541f39a8b2c195844f [^]

Related to issue 33968: Return costing cumulated values if trx is costing trx

Return costing cumulated values if trx is costing trx in CostAdjustmentUtils.getStockOnTransactionDate and CostAdjustmentUtils.getValuedStockOnTransactionDate.

---
M src/org/openbravo/costing/CostAdjustmentUtils.java
---
(0090901)
hgbot   
2016-10-26 11:53   
Repository: erp/devel/pi
Changeset: 61f70f49b80946bb3985d8d8a9e06ad2a063caa0
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Sep 20 19:49:10 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/61f70f49b80946bb3985d8d8a9e06ad2a063caa0 [^]

Fixes issue 33968: Truncate costing rule fix backdated from date

Truncate costing rule fix backdated from date when compering it with transaction movement date in CostingServer.java.

---
M src/org/openbravo/costing/CostingServer.java
---
(0090902)
hgbot   
2016-10-26 11:53   
Repository: erp/devel/pi
Changeset: 528ed62798daf0f90915760b595ab67766387417
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Sep 20 20:05:45 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/528ed62798daf0f90915760b595ab67766387417 [^]

Related to issue 33968: Truncate also transaction movement date

Truncate also transaction movement date when compering it with costing rule fix backdated from date in CostingServer.java.
Truncate also transaction movement date and costing rule fix backdated from date for costing rules with standard algorithm.

---
M src/org/openbravo/costing/CostingServer.java
---
(0090903)
hgbot   
2016-10-26 11:54   
Repository: erp/devel/pi
Changeset: 353d8721b32b0be15d0ac87ff51757c0b81112b2
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Sep 20 20:59:27 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/353d8721b32b0be15d0ac87ff51757c0b81112b2 [^]

Fixes issue 33968: Revert negative adjustment if needed by BDT

Revert negative adjustment when a backdated transaction turns negative stock into positive stock.

---
M src/org/openbravo/costing/AverageCostAdjustment.java
---
(0090904)
hgbot   
2016-10-26 11:54   
Repository: erp/devel/pi
Changeset: 35bfe769e1e67db563f889a5e538020a29279273
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Sep 20 21:05:21 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/35bfe769e1e67db563f889a5e538020a29279273 [^]

Related to issue 33968: Move getNegativeStockAdjustments method

Move AverageCostAdjustment.getNegativeStockAdjustments method to the end of the file and add documentation.

---
M src/org/openbravo/costing/AverageCostAdjustment.java
---
(0090905)
hgbot   
2016-10-26 11:54   
Repository: erp/devel/pi
Changeset: 742ee19c4ecd213930dda39033c6d6df769f9e7f
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Sep 20 20:29:15 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/742ee19c4ecd213930dda39033c6d6df769f9e7f [^]

Fixes issue 33968: Fix rounding issue when cumulate stock has many decimals

Round cumcost and cumstock to currency cost precision before divide them to calculate cost to avoid rounding issues in CostAdjustmentUtils.getStockOnTransactionDate, CostAdjustmentUtils.getValuedStockOnTransactionDate, CostingUtils.getCurrentStock and CostingUtils.getCurrentValuedStock.

---
M src/org/openbravo/costing/AverageAlgorithm.java
M src/org/openbravo/costing/AverageCostAdjustment.java
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingServer.java
M src/org/openbravo/costing/CostingUtils.java
---
(0090906)
hgbot   
2016-10-26 11:54   
Repository: erp/devel/pi
Changeset: cd566f557bd63ab0acf520dd2b03d8b3582a24ff
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Sep 20 20:53:11 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/cd566f557bd63ab0acf520dd2b03d8b3582a24ff [^]

Related to issue 33968: Send parameters in order

Send parameters in order, first currency and then costing, to CostAdjustmentUtils.getStockOnTransactionDate and CostingUtils.getCurrentStock.
Round also cumstock and cumcost when transaction is the costing transaction.

---
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingUtils.java
---
(0090907)
hgbot   
2016-10-26 11:54   
Repository: erp/devel/pi
Changeset: 14bc76dba26df0ffe3cc99857c362c7f0d5d3f16
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Sep 20 22:20:32 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/14bc76dba26df0ffe3cc99857c362c7f0d5d3f16 [^]

Related to issue 33968: Avoid another API change

Use client or organization currency to round cumstock and cumcost, to avoid send currency to CostAdjustmentUtils.getStockOnTransactionDate and CostingUtils.getCurrentStock and avoid the API change.

---
M src/org/openbravo/costing/AverageAlgorithm.java
M src/org/openbravo/costing/AverageCostAdjustment.java
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingServer.java
M src/org/openbravo/costing/CostingUtils.java
---
(0090908)
hgbot   
2016-10-26 11:54   
Repository: erp/devel/pi
Changeset: d7a06320f6d930fa56b42d871401c3cd853de156
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Sep 20 21:06:34 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d7a06320f6d930fa56b42d871401c3cd853de156 [^]

Fixes issue 33968: Avoid errors with Goods Movements

---
M src/org/openbravo/costing/CostingUtils.java
---
(0090909)
hgbot   
2016-10-26 11:54   
Repository: erp/devel/pi
Changeset: b11822652ce5d76ca59a8625d6d59800f076dcd6
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Sep 27 13:24:12 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b11822652ce5d76ca59a8625d6d59800f076dcd6 [^]

Related to issue 33968: Use cumulated values when movement date is the same

Use also cumulated values in CostAdjustmentUtils.getStockOnTransactionDate and CostAdjustmentUtils.getValuedStockOnTransactionDate methods when trx and ctrx movementdate is the same.
Also, truncate movementdate before comparing it.

---
M src/org/openbravo/costing/CostAdjustmentUtils.java
---
(0090910)
hgbot   
2016-10-26 11:54   
Repository: erp/devel/pi
Changeset: 4da571921aeb57f0e774481789c0df663b35c689
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Sep 20 22:21:54 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4da571921aeb57f0e774481789c0df663b35c689 [^]

Related to issue 33968: Remove cumstock and cumcost assert in TestCosting

---
M src-test/src/org/openbravo/test/costing/TestCosting.java
---
(0090911)
hgbot   
2016-10-26 11:54   
Repository: erp/devel/pi
Changeset: 12db641af792d46852af547b4bdf758b8d56bdac
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Sep 28 13:57:03 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/12db641af792d46852af547b4bdf758b8d56bdac [^]

Related to issue 33968: Make an API change

Add MaterialTransaction trx parameter to CostingUtils.getCurrentStock and CostingUtils.getCurrentValuedStock methods.
Also, remove product and date unneeded parameters and add areBackdatedTrxFixed parameter to avoid get again the costingRule.

---
M src/org/openbravo/costing/AverageAlgorithm.java
M src/org/openbravo/costing/CostingUtils.java
---
(0090912)
hgbot   
2016-10-26 11:55   
Repository: erp/devel/pi
Changeset: 45f2a306bf715a5bbc8f53aa1107374fed25078f
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Sep 28 14:12:00 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/45f2a306bf715a5bbc8f53aa1107374fed25078f [^]

Related to issue 33968: Make another API change

Send currency to CostAdjustmentUtils.getStockOnTransactionDate and CostingUtils.getCurrentStock.

---
M src/org/openbravo/costing/AverageAlgorithm.java
M src/org/openbravo/costing/AverageCostAdjustment.java
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingServer.java
M src/org/openbravo/costing/CostingUtils.java
---
(0090913)
hgbot   
2016-10-26 11:55   
Repository: erp/devel/pi
Changeset: ff578582c72c0fd2c9be588f3d984086c19e5679
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Sep 28 14:16:44 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ff578582c72c0fd2c9be588f3d984086c19e5679 [^]

Related to issue 33968: Exclude M+ in case M- also in CostAdjustmentUtils

Exclude M+ in case M- also in CostAdjustmentUtils.getStockOnTransactionDate and CostAdjustmentUtils.getValuedStockOnTransactionDate as it is done in CostingUtils.getCurrentStock and CostingUtils.getCurrentValuedStock.

---
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingUtils.java
---
(0090914)
hgbot   
2016-10-26 11:55   
Repository: erp/devel/pi
Changeset: 96cab7afad17ad2914fbfa3f43e442f43e51e9ff
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Oct 11 17:41:03 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/96cab7afad17ad2914fbfa3f43e442f43e51e9ff [^]

Related to issue 33968: Add comments

---
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingUtils.java
---
(0090915)
hgbot   
2016-10-26 11:58   
Repository: erp/devel/api-checks
Changeset: 8f4a7d1ab044aeb563737cd5a09e2d8fba688e84
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Oct 26 11:57:46 2016 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/8f4a7d1ab044aeb563737cd5a09e2d8fba688e84 [^]

Fixes issue 34184: API change for issue 33968

---
M java/reference/java.japi.gz
---
(0090918)
hgbot   
2016-10-26 12:49   
Repository: erp/devel/api-checks
Changeset: 3f253b825c760e8ed28065281cc578884ec264e7
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Oct 26 12:47:31 2016 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/3f253b825c760e8ed28065281cc578884ec264e7 [^]

Related to issue 34184: Backed out changeset 8f4a7d1ab044

Backout wrong API change for issue 33968.

---
M java/reference/java.japi.gz
---
(0090919)
hgbot   
2016-10-26 12:49   
Repository: erp/devel/api-checks
Changeset: 961adc88383573f8289715fbd4276c280eaf84e5
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Oct 26 12:48:21 2016 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/961adc88383573f8289715fbd4276c280eaf84e5 [^]

Fixes issue 34184: Correct API change for issue 33968

---
M java/reference/java.japi.gz
---
(0091086)
aferraz   
2016-11-03 17:56   
Code review + Testing OK
(0092556)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092557)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092558)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092559)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092560)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092561)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092562)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092563)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092564)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092565)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092566)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092567)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092568)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092569)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092570)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092571)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092572)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092573)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092574)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092575)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092576)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092577)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test
(0092578)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test