details:   https://code.openbravo.com/erp/devel/pi/rev/6c3e95c4b2af
changeset: 30698:6c3e95c4b2af
user:      Sanjota <sanjota.nelagi <at> promantia.com>
date:      Thu Dec 01 16:28:49 2016 +0530
summary:   Fixes issue 34662: Error due to date and time comparision

Resolved issue with Costing Migration process.
"PeriodClosedForMMI" error due to date comparision on last day of month fixed.

details:   https://code.openbravo.com/erp/devel/pi/rev/d8bca1491fa6
changeset: 30699:d8bca1491fa6
user:      Sanjota <sanjota.nelagi <at> promantia.com>
date:      Fri Nov 25 17:37:41 2016 +0530
summary:   Fixes issue 34563: NPE issue in Costing Migration Process

Resolved "Index: 0, Size: 0" error when launching Costing Migration process.

details:   https://code.openbravo.com/erp/devel/pi/rev/a87d9652fd86
changeset: 30700:a87d9652fd86
user:      Sanjota <sanjota.nelagi <at> promantia.com>
date:      Tue Nov 29 15:10:55 2016 +0530
summary:   Fixes issue 34564: Duplicated transaction cost in Costing Migration 
Process

Resolved duplicated records in m_transaction_cost table after launching the 
Costing Migration process.

diffstat:

 src/org/openbravo/costing/CostingMigrationProcess.java |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (40 lines):

diff -r 50698b513147 -r a87d9652fd86 
src/org/openbravo/costing/CostingMigrationProcess.java
--- a/src/org/openbravo/costing/CostingMigrationProcess.java    Fri Nov 25 
14:06:04 2016 +0100
+++ b/src/org/openbravo/costing/CostingMigrationProcess.java    Tue Nov 29 
15:10:55 2016 +0530
@@ -21,6 +21,7 @@
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -270,7 +271,7 @@
             phqlWhere.toString());
         phql.setFilterOnReadableClients(false);
         phql.setFilterOnReadableOrganization(false);
-        phql.setNamedParameter("date", new Date());
+        phql.setNamedParameter("date", DateUtils.truncate(new Date(), 
Calendar.DATE));
         phql.setNamedParameter("org", organization);
         phql.setMaxResult(1);
         PeriodControl period = phql.uniqueResult();
@@ -511,6 +512,7 @@
     try {
       while (icls.next()) {
         InventoryCountLine icl = (InventoryCountLine) icls.get(0);
+        OBDal.getInstance().refresh(icl);
         if (!productId.equals(icl.getProduct().getId())) {
           productId = icl.getProduct().getId();
           HashMap<String, BigDecimal> stock = getCurrentValuedStock(productId, 
curId, orgs, orgId);
@@ -872,9 +874,11 @@
       insert.append(", coalesce(io." + ShipmentInOut.PROPERTY_ACCOUNTINGDATE + 
", t."
           + MaterialTransaction.PROPERTY_MOVEMENTDATE + ")");
       insert.append(" from " + MaterialTransaction.ENTITY_NAME + " as t");
+      insert.append(" left join t." + 
MaterialTransaction.PROPERTY_TRANSACTIONCOSTLIST + " as tc");
       insert.append(" left join t." + 
MaterialTransaction.PROPERTY_GOODSSHIPMENTLINE + " as iol");
       insert.append(" left join iol." + 
ShipmentInOutLine.PROPERTY_SHIPMENTRECEIPT + " as io");
       insert.append(" where t." + MaterialTransaction.PROPERTY_TRANSACTIONCOST 
+ " is not null");
+      insert.append(" and tc." + TransactionCost.PROPERTY_ID + " is null");
 
       Query queryInsert = 
OBDal.getInstance().getSession().createQuery(insert.toString());
       queryInsert.executeUpdate();

------------------------------------------------------------------------------
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to