Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033007Openbravo ERP04. Warehouse managementpublic2016-05-19 16:322016-05-20 13:31
ngarcia 
aferraz 
immediatemajoralways
closedfixed 
5
 
3.0PR16Q1.2 
dmiguelez
Core
No
0033007: Stock available previous to the validation of the costing rule is not shown in Valued Stock Report
Stock available previous to the validation of the costing rule is not shown in Valued Stock Report. The starting date (timestamp) is truncated to date with the to_date function. Example:

to_date('02-07-2015 20:36:35') -> '2015-07-02 00:00:00'
As group admin role:
   Check there is stock of a product
   Validate a costing rule for the organization the stock belongs to
   Create a goods receipt for that product
   Launch the Costing Background Process and check it finishes successfully
   Launch the Valued Stock Report with tomorrow's date and check only the stock received in the goods receipt is shown
No tags attached.
blocks defect 00330023.0PR16Q3 closed aferraz Stock available previous to the validation of the costing rule is not shown in Valued Stock Report 
Issue History
2016-05-20 09:30aferrazTypedefect => backport
2016-05-20 09:30aferrazTarget Version => 3.0PR16Q1.2
2016-05-20 10:11aferrazAssigned ToTriage Finance => aferraz
2016-05-20 13:28hgbotCheckin
2016-05-20 13:28hgbotNote Added: 0086616
2016-05-20 13:28hgbotStatusscheduled => resolved
2016-05-20 13:28hgbotResolutionopen => fixed
2016-05-20 13:28hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR16Q1.2/rev/43e2d443e6c922425000203753b2bc297ea9e9a0 [^]
2016-05-20 13:31dmiguelezReview Assigned To => dmiguelez
2016-05-20 13:31dmiguelezNote Added: 0086618
2016-05-20 13:31dmiguelezStatusresolved => closed

Notes
(0086616)
hgbot   
2016-05-20 13:28   
Repository: erp/backports/3.0PR16Q1.2
Changeset: 43e2d443e6c922425000203753b2bc297ea9e9a0
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri May 20 10:08:11 2016 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR16Q1.2/rev/43e2d443e6c922425000203753b2bc297ea9e9a0 [^]

Fixes issue 33007: Stock before costing rule not shown in Valued Stock Report

Convert current costing rule starting date with to_timestamp instead of with to_date function to avoid date truncation.
Before, current costing rule starting date was truncated and closing and opening inventories created by costing rule validation were taken, so stock was zero.
Now, current costing rule starting date will not be truncated and only opening inventory created by costing rule validation will be taken, then stock will be the same as before the costing rule.

---
M src/org/openbravo/erpCommon/ad_reports/ReportValuationStock.java
M src/org/openbravo/erpCommon/ad_reports/ReportValuationStock_data.xsql
---
(0086618)
dmiguelez   
2016-05-20 13:31   
Code Review + Testing Ok