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

View Revisions: Issue #24022 All Revisions ] Back to Issue ]
Summary 0024022: Wrong Transaction cost calculated for legacy transaction cost under some circunstancies
Revision 2013-06-07 11:34 by VictorVillar
Steps To Reproduce Wrong 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.
Revision 2013-06-07 11:33 by VictorVillar
Steps To Reproduce Wrong 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 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.


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker