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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0024022
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2013-06-07 11:322013-07-23 18:25
ReporterVictorVillarView Statuspublic 
Assigned Tojecharri 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision5444242cd48c
ProjectionnoneETAnoneTarget Version3.0MP26
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned ToVictorVillar
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0024022: Wrong Transaction cost calculated for legacy transaction cost under some circunstancies

DescriptionWrong Transaction cost calculated for legacy transaction cost under some circunstancies.

Old cost engine introduced the Starting date and Ending date in the m_costing table, as DATE, without hours, minutes and seconds.

But the CostingMigrationProcess.java -- method updateLegacyCosts() --statement
 legacyCosts = getLegacyCostScroll(clientId, naturalTree);

is searching data, between the data range:

 where.append(" and trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " >= c."
        + Costing.PROPERTY_STARTINGDATE);
    where.append(" and trx." + MaterialTransaction.PROPERTY_PRODUCT + " = c."
        + Costing.PROPERTY_PRODUCT);
    where.append(" and trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " < c."
        + Costing.PROPERTY_ENDINGDATE);

but the problem is the movementdate parameter because is with hours, minutes and seconds. As a result of that if you have registers in the m_costing, introduced with the same date, the transaction cost will be wrong calculated, because this query does not find the correct m_costing register for the transaction movement date.
Steps To ReproduceWrong Transaction cost calculated for legacy transaction cost under some circunstancies.

Old cost engine introduced the Starting date and Ending date in the m_costing table, as DATE, without hours, minutes and seconds.

But the CostingMigrationProcess.java -- method updateLegacyCosts() --statement
 legacyCosts = getLegacyCostScroll(clientId, naturalTree);

is searching data, between the data range:

 where.append(" and trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " >= c."
        + Costing.PROPERTY_STARTINGDATE);
    where.append(" and trx." + MaterialTransaction.PROPERTY_PRODUCT + " = c."
        + Costing.PROPERTY_PRODUCT);
    where.append(" and trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " < c."
        + Costing.PROPERTY_ENDINGDATE);

but the problem is the movementdate parameter because is with hours, minutes and seconds. As a result of that if you have registers in the m_costing, introduced with the same date, the transaction cost will be wrong calculated, because this query does not find the correct m_costing register for the transaction movement date.
Proposed SolutionThe solution could be to truncate the movement date
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0059799)
hgbot (developer)
2013-07-02 01:32

Repository: erp/devel/pi
Changeset: 5444242cd48cb455535e4f7b9f63fc1b72f951b1
Author: Javier Etxarri <javier.echarri <at> openbravo.com>
Date: Tue Jul 02 01:32:45 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5444242cd48cb455535e4f7b9f63fc1b72f951b1 [^]

Fixes issue 24022: Wrong Transaction cost
calculated for legacy transaction cost under some circunstancies

---
M src/org/openbravo/costing/CostingMigrationProcess.java
---
(0060007)
hudsonbot (developer)
2013-07-16 14:26

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/9a5d5983399f [^]

Maturity status: Test
(0060200)
VictorVillar (developer)
2013-07-23 18:25

Verified

- Issue History
Date Modified Username Field Change
2013-06-07 11:32 VictorVillar New Issue
2013-06-07 11:32 VictorVillar Assigned To => dmiguelez
2013-06-07 11:32 VictorVillar Modules => Core
2013-06-07 11:32 VictorVillar Resolution time => 1372629600
2013-06-07 11:32 VictorVillar Triggers an Emergency Pack => No
2013-06-07 11:33 VictorVillar Issue Monitored: networkb
2013-06-07 11:34 VictorVillar Description Updated View Revisions
2013-06-07 11:34 VictorVillar Steps to Reproduce Updated View Revisions
2013-06-07 14:45 dmiguelez Assigned To dmiguelez => jonalegriaesarte
2013-06-07 16:10 VictorVillar Proposed Solution updated
2013-06-21 12:29 jonalegriaesarte Assigned To jonalegriaesarte => jecharri
2013-06-28 14:12 jonalegriaesarte Target Version 3.0MP25 => 3.0MP26
2013-07-02 01:32 hgbot Checkin
2013-07-02 01:32 hgbot Note Added: 0059799
2013-07-02 01:32 hgbot Status new => resolved
2013-07-02 01:32 hgbot Resolution open => fixed
2013-07-02 01:32 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5444242cd48cb455535e4f7b9f63fc1b72f951b1 [^]
2013-07-16 14:26 hudsonbot Checkin
2013-07-16 14:26 hudsonbot Note Added: 0060007
2013-07-23 18:25 VictorVillar Review Assigned To => VictorVillar
2013-07-23 18:25 VictorVillar Note Added: 0060200
2013-07-23 18:25 VictorVillar Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker