Fixed BUG-44535: Included update and updated columns to take into account on the incremental criteria
authorprakash-1040 <prakash@qualiantech.com>
Wed, 15 Jul 2020 17:36:22 +0530
changeset 37495 adf4b4ee2ad5
parent 37494 1b15032514dc
child 37496 48ebda2c4c42
Fixed BUG 44535: Included update and updated columns to take into account on the incremental criteria
modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/ImportBPSet.java
modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/ImportProductInDiscount.java
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/ImportBPSet.java	Tue Jul 14 14:24:01 2020 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/ImportBPSet.java	Wed Jul 15 17:36:22 2020 +0530
@@ -31,6 +31,7 @@
 import org.hibernate.Session;
 import org.hibernate.query.NativeQuery;
 import org.openbravo.base.provider.OBProvider;
+import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.dal.service.OBQuery;
 import org.openbravo.erpCommon.utility.OBMessageUtils;
@@ -48,7 +49,9 @@
     @SuppressWarnings("unchecked")
     NativeQuery<String> qry = OBDal.getInstance()
         .getSession()
-        .createNativeQuery("update c_bp_set_line set isactive='N' where c_bp_set_id = :c_bp_set_id");
+        .createNativeQuery(
+            "update c_bp_set_line set updated=now(), updatedby=:userId, isactive='N' where c_bp_set_id = :c_bp_set_id");
+    qry.setParameter("userId", OBContext.getOBContext().getUser().getId());
     qry.setParameter("c_bp_set_id", ownerId);
     qry.executeUpdate();
   }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/ImportProductInDiscount.java	Tue Jul 14 14:24:01 2020 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/ImportProductInDiscount.java	Wed Jul 15 17:36:22 2020 +0530
@@ -29,6 +29,7 @@
 import org.hibernate.Session;
 import org.hibernate.query.NativeQuery;
 import org.openbravo.base.provider.OBProvider;
+import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.dal.service.OBQuery;
 import org.openbravo.erpCommon.utility.OBMessageUtils;
@@ -43,7 +44,9 @@
     @SuppressWarnings("unchecked")
     NativeQuery<String> qry = OBDal.getInstance()
         .getSession()
-        .createNativeQuery("update m_offer_product set isactive='N' where m_offer_id = :m_offer_id");
+        .createNativeQuery(
+            "update m_offer_product set updated=now(), updatedby=:userId, isactive='N' where m_offer_id = :m_offer_id");
+    qry.setParameter("userId", OBContext.getOBContext().getUser().getId());
     qry.setParameter("m_offer_id", ownerId);
     qry.executeUpdate();
   }