Fixes bug 28401:Initialized All Trx process not uses movement date.
authorUnai Martirena <unai.martirena@openbravo.com>
Wed, 17 Dec 2014 16:22:29 +0100
changeset 25630 dd93c7f18e34
parent 25629 f9cdef4fe593
child 25631 dfdc7b880446
Fixes bug 28401:Initialized All Trx process not uses movement date.

Initialize Old Transaction process inside Validate Costing Rule process should filter by Movement Date of Transactions instead of Transaction Process Date
src/org/openbravo/costing/CostingRuleProcess.java
--- a/src/org/openbravo/costing/CostingRuleProcess.java	Fri Dec 19 15:07:05 2014 +0100
+++ b/src/org/openbravo/costing/CostingRuleProcess.java	Wed Dec 17 16:22:29 2014 +0100
@@ -248,7 +248,7 @@
   private void initializeOldTrx(Set<String> childOrgs, Date date) {
     StringBuffer where = new StringBuffer();
     where.append(" where " + MaterialTransaction.PROPERTY_ORGANIZATION + ".id in (:orgs)");
-    where.append("   and " + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " < :date");
+    where.append("   and " + MaterialTransaction.PROPERTY_MOVEMENTDATE + " < :date");
     OBQuery<MaterialTransaction> trxQry = OBDal.getInstance().createQuery(
         MaterialTransaction.class, where.toString());
     trxQry.setFilterOnReadableOrganization(false);