details:   https://code.openbravo.com/erp/devel/pi/rev/410d00339f44
changeset: 15518:410d00339f44
user:      Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
date:      Thu Feb 16 12:41:10 2012 +0100
summary:   Fixed bug 10488: Sales Order report throwing error while searching 
with Project Type
Removed report's Project Type filter, because it is not used in the ERP
(field declared as not displayed in project configuration windows)

diffstat:

 src-db/database/sourcedata/AD_TEXTINTERFACES.xml                     |  11 --
 src/org/openbravo/erpCommon/ad_reports/OrderEdition_data.xsql        |   4 +-
 src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderFilterJR.html |  16 +--
 src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderFilterJR.xml  |  10 +-
 src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderJR.java       |  51 
+--------
 5 files changed, 16 insertions(+), 76 deletions(-)

diffs (252 lines):

diff -r 5131c929f9ae -r 410d00339f44 
src-db/database/sourcedata/AD_TEXTINTERFACES.xml
--- a/src-db/database/sourcedata/AD_TEXTINTERFACES.xml  Fri Feb 17 10:24:16 
2012 +0100
+++ b/src-db/database/sourcedata/AD_TEXTINTERFACES.xml  Thu Feb 16 12:41:10 
2012 +0100
@@ -9390,17 +9390,6 @@
 <!--809948-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--809948--></AD_TEXTINTERFACES>
 
-<!--809951--><AD_TEXTINTERFACES>
-<!--809951-->  <AD_TEXTINTERFACES_ID><![CDATA[809951]]></AD_TEXTINTERFACES_ID>
-<!--809951-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--809951-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--809951-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--809951-->  <TEXT><![CDATA[Project Type]]></TEXT>
-<!--809951-->  
<FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportSalesOrderFilterJR.html]]></FILENAME>
-<!--809951-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--809951-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--809951--></AD_TEXTINTERFACES>
-
 <!--809954--><AD_TEXTINTERFACES>
 <!--809954-->  <AD_TEXTINTERFACES_ID><![CDATA[809954]]></AD_TEXTINTERFACES_ID>
 <!--809954-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
diff -r 5131c929f9ae -r 410d00339f44 
src/org/openbravo/erpCommon/ad_reports/OrderEdition_data.xsql
--- a/src/org/openbravo/erpCommon/ad_reports/OrderEdition_data.xsql     Fri Feb 
17 10:24:16 2012 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/OrderEdition_data.xsql     Thu Feb 
16 12:41:10 2012 +0100
@@ -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-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2012 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -68,10 +68,8 @@
     <Parameter name="dateTo" optional="true" after="1=1"><![CDATA[ AND 
C_ORDER.DATEORDERED <= TO_DATE(?)]]></Parameter>
     <Parameter name="mWarehouseId" optional="true" after="1=1"><![CDATA[ AND 
C_ORDER.M_WAREHOUSE_ID = ?]]></Parameter>
     <Parameter name="cProjectId" optional="true" after="1=1"><![CDATA[ AND 
C_PROJECT.C_PROJECT_ID = ?]]></Parameter>
-    <Parameter name="projectpublic" optional="true" after="1=1"><![CDATA[ AND 
C_PROJECT.PUBLICPRIVATE = ?]]></Parameter>
     <Parameter name="cRegionId" optional="true" type="argument" after="AND 
1=1"><![CDATA[ AND C_LOCATION.C_REGION_ID IN]]></Parameter>
     <Parameter name="mProductCategoryId" optional="true" type="argument" 
after="AND 1=1"><![CDATA[ AND M_PRODUCT.M_PRODUCT_CATEGORY_ID IN]]></Parameter>
-    <Parameter name="cProjectKind" optional="true" type="argument" after="AND 
1=1"><![CDATA[ AND C_PROJECT.PROJECTKIND IN]]></Parameter>
     <Parameter name="cbPartnerId" optional="true" type="argument" after="AND 
1=1"><![CDATA[ AND C_ORDER.C_BPARTNER_ID IN]]></Parameter>
     <Parameter name="mProductId" optional="true" type="argument" after="AND 
1=1"><![CDATA[ AND M_PRODUCT.M_PRODUCT_ID IN]]></Parameter>
   </SqlMethod>
diff -r 5131c929f9ae -r 410d00339f44 
src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderFilterJR.html
--- a/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderFilterJR.html      
Fri Feb 17 10:24:16 2012 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderFilterJR.html      
Thu Feb 16 12:41:10 2012 +0100
@@ -13,7 +13,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) 2007-2010 Openbravo SLU
+ * All portions are Copyright (C) 2007-2012 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -535,16 +535,8 @@
                </select>
                     </td>
 
-                  </tr>
-               <tr>
-                    <td class="TitleCell"><span class="LabelText">Project 
Type</span></td>
-                    <td class="Dimension_ContentCell" colspan="2">
-                      <select name="inpProjectkind" multiple="" 
id="reportC_PROJECTKIND" class="Dimension_LeftSelect_width 
Dimension_LeftSelect_height">
-                    </td>
-                    <td class="ContentCell"></td>
-                    <td class="ContentCell"></td>
-                    <td class="ContentCell"></td>
-                  </tr><tr>
+                </tr>
+                <tr>
                     <td colspan="6">
 
                       <table class="FieldGroup" cellspacing="0" 
cellpadding="0" border="0">
@@ -561,7 +553,7 @@
                       </tbody>
                       </table>
                     </td>
-                  </tr>
+                </tr>
 
                   <tr>
                     <td class="TitleCell"></td>
diff -r 5131c929f9ae -r 410d00339f44 
src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderFilterJR.xml
--- a/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderFilterJR.xml       
Fri Feb 17 10:24:16 2012 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderFilterJR.xml       
Thu Feb 16 12:41:10 2012 +0100
@@ -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) 2007-2008 Openbravo SLU 
+* All portions are Copyright (C) 2007-2012 Openbravo SLU 
 * All Rights Reserved. 
 * Contributor(s):  ______________________________________.
 ************************************************************************
@@ -34,9 +34,7 @@
   <PARAMETER id="C_Project_ID_D" name="projectName" attribute="value"/>
   <PARAMETER id="paramBPartnerId" name="paramBPartnerId" attribute="value"/>
   <PARAMETER id="paramM_PRODUCTCATEGORY_ID" name="mProductCatId" attribute=""/>
-  <PARAMETER id="paramC_PROJECTKIND" name="cProjectKind" attribute=""/>
   <PARAMETER id="paramC_REGION_ID" name="cRegionId" attribute=""/>
-  <PARAMETER id="paramC_PROJECTPUBLIC" name="cProjectPublic" attribute=""/>
   <PARAMETER id="paramBPartnerDescription" name="paramBPartnerDescription" 
attribute="value"/>
   <PARAMETER id="paramCSS" name="theme" attribute="href" replace="Default"/>
   <PARAMETER id="tdleftTabs" name="leftTabs" default=""/>
@@ -55,15 +53,9 @@
 <SUBREPORT id="reportC_PRODUCTCATREGORY" name="reportC_PRODUCTCATREGORY" 
report="org/openbravo/erpCommon/reference/List">
   <ARGUMENT name="parameterListSelected" withId="paramM_PRODUCTCATEGORY_ID"/>
 </SUBREPORT>
-<SUBREPORT id="reportC_PROJECTKIND" name="reportC_PROJECTKIND" 
report="org/openbravo/erpCommon/reference/List">
-  <ARGUMENT name="parameterListSelected" withId="paramC_PROJECTKIND"/>
-</SUBREPORT>
 <SUBREPORT id="reportC_REGIONID" name="reportC_REGIONID" 
report="org/openbravo/erpCommon/reference/List">
   <ARGUMENT name="parameterListSelected" withId="paramC_REGION_ID"/>
 </SUBREPORT>
-<SUBREPORT id="reportC_PROJECTPUBLIC" name="reportC_PROJECTPUBLIC" 
report="org/openbravo/erpCommon/reference/List">
-  <ARGUMENT name="parameterListSelected" withId="paramC_PROJECTPUBLIC"/>
-</SUBREPORT>
 <SUBREPORT id="reportMProductId_IN" name="reportMProductId_IN" 
report="org/openbravo/erpCommon/reference/List">
   <ARGUMENT name="parameterListSelected" withId="paramVacio"/>
 </SUBREPORT>
diff -r 5131c929f9ae -r 410d00339f44 
src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderJR.java
--- a/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderJR.java    Fri Feb 
17 10:24:16 2012 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderJR.java    Thu Feb 
16 12:41:10 2012 +0100
@@ -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) 2007-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2007-2012 Openbravo SLU 
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -55,12 +55,10 @@
           "ReportSalesOrderJR|projectId", "");
       String strmWarehouseId = vars.getGlobalVariable("inpmWarehouseId",
           "ReportSalesOrderJR|warehouseId", "");
-      String strProjectpublic = vars.getGlobalVariable("inpProjectpublic",
-          "ReportSalesOrderJR|projectpublic", "");
       String strCurrencyId = vars.getGlobalVariable("inpCurrencyId", 
"ReportSalesOrderJR|currency",
           strUserCurrencyId);
       printPageDataSheet(response, vars, strdateFrom, strdateTo, 
strmWarehouseId, strcProjectId,
-          strProjectpublic, strCurrencyId);
+          strCurrencyId);
     } else if (vars.commandIn("EDIT_HTML", "EDIT_PDF")) {
       String strdateFrom = vars.getRequestGlobalVariable("inpDateFrom",
           "ReportSalesOrderJR|dateFrom");
@@ -69,14 +67,10 @@
           "ReportSalesOrderJR|warehouseId");
       String strcProjectId = vars.getRequestGlobalVariable("inpcProjectId",
           "ReportSalesOrderJR|projectId");
-      String strProjectpublic = 
vars.getRequestGlobalVariable("inpProjectpublic",
-          "ReportSalesOrderJR|projectpublic");
       String strcRegionId = vars.getRequestInGlobalVariable("inpcRegionId",
           "ReportSalesOrderJR|regionId", IsIDFilter.instance);
       String strmProductCategoryId = 
vars.getRequestInGlobalVariable("inpmProductCategoryId",
           "ReportSalesOrderJR|productCategoryId", IsIDFilter.instance);
-      String strProjectkind = vars.getRequestInGlobalVariable("inpProjectkind",
-          "ReportSalesOrderJR|projectKind", IsIDFilter.instance);
       String strcBpartnerId = 
vars.getRequestInGlobalVariable("inpcBPartnerId_IN",
           "ReportSalesOrderJR|bpartnerId", IsIDFilter.instance);
       String strmProductId = 
vars.getRequestInGlobalVariable("inpmProductId_IN",
@@ -84,15 +78,15 @@
       String strCurrencyId = vars.getGlobalVariable("inpCurrencyId", 
"ReportSalesOrderJR|currency",
           strUserCurrencyId);
       printPageHtml(request, response, vars, strdateFrom, strdateTo, 
strmWarehouseId,
-          strcProjectId, strProjectpublic, strcRegionId, 
strmProductCategoryId, strProjectkind,
-          strcBpartnerId, strmProductId, strCurrencyId);
+          strcProjectId, strcRegionId, strmProductCategoryId, strcBpartnerId, 
strmProductId,
+          strCurrencyId);
     } else
       pageErrorPopUp(response);
   }
 
   private void printPageDataSheet(HttpServletResponse response, 
VariablesSecureApp vars,
       String strdateFrom, String strdateTo, String strmWarehouseId, String 
strcProjectId,
-      String strProjectpublic, String strCurrencyId) throws IOException, 
ServletException {
+      String strCurrencyId) throws IOException, ServletException {
     if (log4j.isDebugEnabled())
       log4j.debug("Output: dataSheet");
     XmlDocument xmlDocument = null;
@@ -150,7 +144,6 @@
     xmlDocument.setParameter("projectName", 
OrderEditionData.selectProject(this, strcProjectId));
     xmlDocument.setParameter("cProjectKind", "");
     xmlDocument.setParameter("cRegionId", "");
-    xmlDocument.setParameter("cProjectPublic", strProjectpublic);
     xmlDocument.setParameter("mProductCatId", "");
     try {
       ComboTableData comboTableData = new ComboTableData(vars, this, 
"TABLEDIR", "M_Warehouse_ID",
@@ -164,18 +157,6 @@
     }
 
     try {
-      ComboTableData comboTableData = new ComboTableData(vars, this, "LIST", 
"C_Projectkind_ID",
-          "Projectkind", "", Utility.getContext(this, vars, 
"#AccessibleOrgTree",
-              "SalesOrderFilterJR"), Utility.getContext(this, vars, 
"#User_Client",
-              "SalesOrderFilterJR"), 0);
-      Utility.fillSQLParameters(this, vars, null, comboTableData, 
"SalesOrderFilterJR", "");
-      xmlDocument.setData("reportC_PROJECTKIND", "liststructure", 
comboTableData.select(false));
-      comboTableData = null;
-    } catch (Exception ex) {
-      throw new ServletException(ex);
-    }
-
-    try {
       ComboTableData comboTableData = new ComboTableData(vars, this, 
"TABLEDIR", "C_Region_ID", "",
           "C_Region of Country", Utility.getContext(this, vars, 
"#AccessibleOrgTree",
               "SalesOrderFilterJR"), Utility.getContext(this, vars, 
"#User_Client",
@@ -187,18 +168,6 @@
       throw new ServletException(ex);
     }
 
-    try {
-      ComboTableData comboTableData = new ComboTableData(vars, this, "LIST", 
"C_Projectkind_ID",
-          "PublicPrivate", "", Utility.getContext(this, vars, 
"#AccessibleOrgTree",
-              "SalesOrderFilterJR"), Utility.getContext(this, vars, 
"#User_Client",
-              "SalesOrderFilterJR"), 0);
-      Utility.fillSQLParameters(this, vars, null, comboTableData, 
"SalesOrderFilter", "");
-      xmlDocument.setData("reportC_PROJECTKIND", "liststructure", 
comboTableData.select(false));
-      comboTableData = null;
-    } catch (Exception ex) {
-      throw new ServletException(ex);
-    }
-
     xmlDocument.setParameter("ccurrencyid", strCurrencyId);
     try {
       ComboTableData comboTableData = new ComboTableData(vars, this, 
"TABLEDIR", "C_Currency_ID",
@@ -241,9 +210,9 @@
 
   private void printPageHtml(HttpServletRequest request, HttpServletResponse 
response,
       VariablesSecureApp vars, String strdateFrom, String strdateTo, String 
strmWarehouseId,
-      String strcProjectId, String strProjectpublic, String strcRegionId,
-      String strmProductCategoryId, String strProjectkind, String 
strcBpartnerId,
-      String strmProductId, String strCurrencyId) throws IOException, 
ServletException {
+      String strcProjectId, String strcRegionId, String strmProductCategoryId,
+      String strcBpartnerId, String strmProductId, String strCurrencyId) 
throws IOException,
+      ServletException {
     if (log4j.isDebugEnabled())
       log4j.debug("Output: print html");
 
@@ -258,8 +227,8 @@
       data = OrderEditionData.select(this, strCurrencyId,
           Utility.getContext(this, vars, "#AccessibleOrgTree", 
"SalesOrderFilterJR"),
           Utility.getContext(this, vars, "#User_Client", 
"SalesOrderFilterJR"), strdateFrom,
-          strdateTo, strmWarehouseId, strcProjectId, strProjectpublic, 
strcRegionId,
-          strmProductCategoryId, strProjectkind, strcBpartnerId, 
strmProductId);
+          strdateTo, strmWarehouseId, strcProjectId, strcRegionId, 
strmProductCategoryId,
+          strcBpartnerId, strmProductId);
     } catch (ServletException ex) {
       myMessage = Utility.translateError(this, vars, vars.getLanguage(), 
ex.getMessage());
     }

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to