details:   https://code.openbravo.com/erp/devel/pi/rev/6cd7457bee22
changeset: 32034:6cd7457bee22
user:      Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
date:      Fri May 05 11:15:04 2017 +0200
summary:   Backed out changeset 19dbeb49b487

details:   https://code.openbravo.com/erp/devel/pi/rev/8ef5351aa191
changeset: 32035:8ef5351aa191
user:      Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
date:      Fri May 05 11:15:30 2017 +0200
summary:   Backed out changeset 692c7a5ece6b

diffstat:

 src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.java      |  25 
+--------
 src/org/openbravo/erpCommon/ad_reports/ReportProductMovement_data.xsql |   6 
+--
 2 files changed, 4 insertions(+), 27 deletions(-)

diffs (106 lines):

diff -r 19dbeb49b487 -r 8ef5351aa191 
src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.java
--- a/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.java Fri May 
05 09:50:29 2017 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement.java Fri May 
05 11:15:30 2017 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2017 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2014 Openbravo SLU 
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -25,7 +25,6 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.commons.lang.StringUtils;
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.erpCommon.businessUtility.WindowTabs;
@@ -142,23 +141,13 @@
       localStrDateTo = DateTimeData.today(this);
       localStrDateFrom = DateTimeData.weekBefore(this);
     }
-
-    int limit = 0;
     if (vars.commandIn("FIND", "DIRECT")) {
-      limit = Integer.parseInt(Utility.getPreference(vars, "ReportsLimit", 
""));
-      String pgLimit = null, oraLimit = null;
-      if (StringUtils.equals(this.myPool.getRDBMS(), "ORACLE")) {
-        oraLimit = String.valueOf(limit + 1);
-      } else {
-        pgLimit = String.valueOf(limit + 1);
-      }
-
       if (strInout.equals("-1")) {
         data = ReportProductMovementData.select(this, vars.getLanguage(),
             Utility.getContext(this, vars, "#User_Client", 
"ReportProductMovement"),
             Utility.getContext(this, vars, "#AccessibleOrgTree", 
"ReportProductMovement"),
             localStrDateFrom, DateTimeData.nDaysAfter(this, localStrDateTo, 
"1"), strcBpartnerId,
-            strmProductId, strmAttributesetinstanceId, "N", pgLimit, oraLimit);
+            strmProductId, strmAttributesetinstanceId, "N");
         if (data == null || data.length == 0) {
           discard[0] = "selEliminar1";
           data = ReportProductMovementData.set();
@@ -173,7 +162,7 @@
             Utility.getContext(this, vars, "#User_Client", 
"ReportProductMovement"),
             Utility.getContext(this, vars, "#AccessibleOrgTree", 
"ReportProductMovement"),
             localStrDateFrom, DateTimeData.nDaysAfter(this, localStrDateTo, 
"1"), strcBpartnerId,
-            strmProductId, strmAttributesetinstanceId, "Y", pgLimit, oraLimit);
+            strmProductId, strmAttributesetinstanceId, "Y");
         if (data5 == null || data5.length == 0) {
           discard[5] = "selEliminar6";
           data5 = ReportProductMovementData.set();
@@ -279,14 +268,6 @@
     }
     {
       OBError myMessage = vars.getMessage("ReportProductMovement");
-      if (limit > 0 && data.length > limit) {
-        myMessage = new OBError();
-        myMessage.setType("Warning");
-        myMessage.setTitle("");
-        String msgbody = Utility.messageBD(this, "ReportsLimit", 
vars.getLanguage());
-        msgbody = msgbody.replace("@limit@", String.valueOf(limit + 1));
-        myMessage.setMessage(msgbody);
-      }
       vars.removeMessage("ReportProductMovement");
       if (myMessage != null) {
         xmlDocument.setParameter("messageType", myMessage.getType());
diff -r 19dbeb49b487 -r 8ef5351aa191 
src/org/openbravo/erpCommon/ad_reports/ReportProductMovement_data.xsql
--- a/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement_data.xsql    
Fri May 05 09:50:29 2017 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportProductMovement_data.xsql    
Fri May 05 11:15:30 2017 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2017 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2014 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -28,7 +28,6 @@
     <SqlMethodComment></SqlMethodComment>
     <Sql>
     <![CDATA[
-      SELECT B.* FROM (
       SELECT M_PRODUCT.VALUE, M_PRODUCT.NAME, M_TRANSACTION.MOVEMENTDATE, 
C_BPARTNER.NAME AS PARTNERNAME,M_ATTRIBUTESETINSTANCE.DESCRIPTION AS ATTR,
       (CASE M_INOUT.ISSOTRX WHEN 'Y' THEN TO_CHAR(M_WAREHOUSE.NAME) ELSE '-' 
END)AS WA_ORIGIN,
       (CASE M_INOUT.ISSOTRX WHEN 'Y' THEN TO_CHAR(M_LOCATOR.X) ELSE '-' END) 
AS X_ORIGIN, 
@@ -60,7 +59,6 @@
       M_LOCATOR.Z, M_INOUT.ISSOTRX, C_UOM.NAME, M_INOUT.M_INOUT_ID, 
M_INOUT.DOCUMENTNO, M_ATTRIBUTESETINSTANCE.DESCRIPTION,
       M_WAREHOUSE.NAME
       ORDER BY C_BPARTNER.NAME, M_TRANSACTION.MOVEMENTDATE DESC
-      ) B
      ]]></Sql>
     <Parameter name="adLanguage"/>
     <Field name="rownum" value="count"/>
@@ -72,8 +70,6 @@
     <Parameter name="mProductId" optional="true" after="AND 1=1"><![CDATA[ AND 
M_PRODUCT.M_PRODUCT_ID = ?]]></Parameter>
     <Parameter name="parmAttributeSetInstanceId" optional="true" after="AND 
1=1"><![CDATA[AND M_TRANSACTION.M_ATTRIBUTESETINSTANCE_ID = ?]]></Parameter>
     <Parameter name="isReturn" optional="true" after="AND 1=1"><![CDATA[AND 
C_DOCTYPE.ISRETURN = ?]]></Parameter>
-    <Parameter name="pgLimit" type="argument" optional="true" after=") 
B"><![CDATA[LIMIT ]]></Parameter>
-    <Parameter name="oraLimit1" type="argument" optional="true" after=") 
B"><![CDATA[WHERE ROWNUM <= ]]></Parameter>
   </SqlMethod>
 
   <SqlMethod name="selectInventory" type="preparedStatement" return="multiple">

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to