Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0026823Openbravo ERP04. Warehouse managementpublic2014-06-10 14:592014-06-13 14:13
VictorVillar 
rafaroda 
immediatemajoralways
closedfixed 
5
pi 
3.0PR14Q33.0PR14Q3 
ngarcia
Core
No
0026823: the transaction cost of the Valued Stock report should be filtered regarding the movement date
The cost of each transaction should be taken into account regarding the movement date not the transaction process date

This report is currently using date parameter to filter the query in 2 places.

For one side it is filtering the transactions by the movement date. It only considers transactions with movement date equal or before the given date. The stock quantity is the sum of the movement quantities of these transactions. This is correct.

For another side this given date is also used to filter the available cost calculations for each transaction. Filtering them by the date they were calculated. So if a transcation cost was calculated on a date after the movement date its cost won't be available on the report if this is filtered by the transaction's movement date. This is incorrect.
1 Launch the report on 1st of current month. for US East Coast, Alcoholic product category and USD currency.
2. Take note of the Stock, cost and valuation of Ale Beer. In my case:
149100.00 Unit 1.36 202,776.00
3. Create a shipment of Ale Beer with movement date on previous month.
4. Launch the report again. If the cost of the shipment is not yet calculated a warning appears and a new line for Ale Beer appears without any cost or valuation.
5. Ensure that the costing background is run and that the transaction is calculated by checking in the transaction tab of Product.
6. Launch again the report. The warning dissapears and the line without cost or valuation as well. The line of Ale beer is updated so the quantity is considering our shipment, but the valuation amount remains the same as it is not including the cost of the shipment.
These are the values I get after a shipment of 10000 units of Ale beer:
139100.00 Unit 1.46 202,776.00

Note the quantity is now 193100 but the valuation is still 202776. This makes the average cost to change from 1.36 to 1.46.

The report should take into account all the costs related for each transactions. Without considering the date they were calculated.

The filter by the transaction date of the M_Transaction_Cost table in the query has to be removed.
No tags attached.
related to feature request 0024483 closed jonalegriaesarte The transactions accounting date should be the one used to find the transaction cost in the Valued Stock Report 
Issue History
2014-06-10 14:59VictorVillarNew Issue
2014-06-10 14:59VictorVillarAssigned To => dmiguelez
2014-06-10 14:59VictorVillarModules => Core
2014-06-10 14:59VictorVillarTriggers an Emergency Pack => No
2014-06-10 14:59VictorVillarAssigned Todmiguelez => dmitry_mezentsev
2014-06-10 14:59VictorVillarIssue Monitored: networkb
2014-06-10 15:03VictorVillarRelationship addedrelated to 0024483
2014-06-10 15:32ngarciaIssue Monitored: ngarcia
2014-06-10 16:39gorkaionDescription Updatedbug_revision_view_page.php?rev_id=5942#r5942
2014-06-10 16:39gorkaionSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=5944#r5944
2014-06-10 16:39gorkaionProposed Solution updated
2014-06-10 16:39gorkaionSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=5945#r5945
2014-06-10 16:52dmitry_mezentsevAssigned Todmitry_mezentsev => rafaroda
2014-06-10 17:33rafarodaStatusnew => scheduled
2014-06-12 10:31rafarodaNote Added: 0067935
2014-06-12 11:30hgbotCheckin
2014-06-12 11:30hgbotNote Added: 0067939
2014-06-12 11:30hgbotStatusscheduled => resolved
2014-06-12 11:30hgbotResolutionopen => fixed
2014-06-12 11:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e861ed85d4965ad83fbb1faa3a8c4cc547307efa [^]
2014-06-13 13:13hudsonbotCheckin
2014-06-13 13:13hudsonbotNote Added: 0068001
2014-06-13 14:13ngarciaReview Assigned To => ngarcia
2014-06-13 14:13ngarciaStatusresolved => closed
2014-06-13 14:13ngarciaFixed in Version => PR14Q3

Notes
(0067935)
rafaroda   
2014-06-12 10:31   
Following the steps above, Stock Valuation Report fixed should display:

A) Before 10.000 shipment:
* Quantity = 149.100
* Average Cost = 1,36
* Total cost = 202.776 (149.100 x 1,36)

B) After 10.000 shipment:
* Quantity = 139.100
* Average Cost = 1,36
* Total cost = 189.176 (139.100 x 1,36)

See the images in https://drive.google.com/folderview?id=0B649lz4ZYJcHVjE5XzNWWmM2Ulk&usp=sharing [^]
(0067939)
hgbot   
2014-06-12 11:30   
Repository: erp/devel/pi
Changeset: e861ed85d4965ad83fbb1faa3a8c4cc547307efa
Author: Rafa Roda Palacios <rafa.roda <at> ubiquads.com>
Date: Tue Jun 10 21:31:49 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e861ed85d4965ad83fbb1faa3a8c4cc547307efa [^]

Fixes issue 26823 Cost Date of M_TRANSACTION_COST removed when filtering Stock Valuation Report

---
M src/org/openbravo/erpCommon/ad_reports/ReportValuationStock_data.xsql
---
(0068001)
hudsonbot   
2014-06-13 13:13   
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/32a1b3e93024 [^]
Maturity status: Test