fixed bug 9495: added combo reloads to action buttons to support validation rules in parameters
authorAsier Lostalé <asier.lostale@openbravo.com>
Fri, 19 Jun 2009 09:42:30 +0200
changeset 4044 d7b7924ec0c6
parent 4043 e513eade11c2 (current diff)
parent 4038 da2e7a5269c6 (diff)
child 4045 fdf9075c78e4
fixed bug 9495: added combo reloads to action buttons to support validation rules in parameters
--- a/src-core/src/org/openbravo/data/Parameter.java	Fri Jun 19 09:41:25 2009 +0200
+++ b/src-core/src/org/openbravo/data/Parameter.java	Fri Jun 19 09:42:30 2009 +0200
@@ -1,6 +1,6 @@
 /*
  ************************************************************************************
- * Copyright (C) 2001-2006 Openbravo S.L.
+ * Copyright (C) 2001-2009 Openbravo S.L.
  * Licensed under the Apache Software License version 2.0
  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to  in writing,  software  distributed
@@ -21,10 +21,11 @@
   String strValue;
   String strAfter;
   String strText;
+  String strIgnoreValue;
   boolean boolOptional = false;
 
   public Parameter(boolean sequence, String strName, String strDefault, String strInOut,
-      String strOptional, String strAfter, String strText) {
+      String strOptional, String strAfter, String strText, String strIgnoreValue) {
     boolSequence = sequence;
     this.strName = strName;
     this.strDefault = strDefault;
@@ -34,6 +35,7 @@
     type = java.sql.Types.VARCHAR;
     this.strAfter = strAfter;
     this.strText = strText;
+    this.strIgnoreValue = strIgnoreValue;
   }
 
 }
--- a/src-core/src/org/openbravo/data/Sql.java	Fri Jun 19 09:41:25 2009 +0200
+++ b/src-core/src/org/openbravo/data/Sql.java	Fri Jun 19 09:42:30 2009 +0200
@@ -1,6 +1,6 @@
 /*
  ************************************************************************************
- * Copyright (C) 2001-2006 Openbravo S.L.
+ * Copyright (C) 2001-2009 Openbravo S.L.
  * Licensed under the Apache Software License version 2.0
  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to  in writing,  software  distributed
@@ -41,7 +41,7 @@
   }
 
   public Parameter addParameter(boolean sequence, String strName, String strDefault,
-      String strInOut, String strOptional, String strAfter, String strText) {
+      String strInOut, String strOptional, String strAfter, String strText, String strIgnoreValue) {
     if (log4j.isDebugEnabled())
       log4j.debug("addParameter sequence: " + sequence + " name: " + strName);
     if (strOptional != null)
@@ -49,7 +49,7 @@
     if (log4j.isDebugEnabled())
       log4j.debug("previous new Parameter");
     Parameter parameterNew = new Parameter(sequence, strName, strDefault, strInOut, strOptional,
-        strAfter, strText);
+        strAfter, strText, strIgnoreValue);
     if (log4j.isDebugEnabled())
       log4j.debug("called new Parameter");
     for (Enumeration<Parameter> e = vecParameter.elements(); e.hasMoreElements();) {
--- a/src-core/src/org/openbravo/data/Sqlc.java	Fri Jun 19 09:41:25 2009 +0200
+++ b/src-core/src/org/openbravo/data/Sqlc.java	Fri Jun 19 09:42:30 2009 +0200
@@ -445,6 +445,7 @@
       String strOptional = null;
       String strAfter = null;
       String strText = null;
+      String strIgnoreValue = null;
       final int size = amap.getLength();
       for (int i = 0; i < size; i++) {
         if (amap.getQName(i).equals("name")) {
@@ -459,12 +460,14 @@
           strAfter = amap.getValue(i);
         } else if (amap.getQName(i).equals("text")) {
           strText = amap.getValue(i);
+        } else if (amap.getQName(i).equals("ignoreValue")) {
+          strIgnoreValue = amap.getValue(i);
         }
       }
       if (log4j.isDebugEnabled())
         log4j.debug("Configuration: call to addParameter ");
       parameterSql = sql.addParameter(false, strName, strDefault, strInOut, strOptional, strAfter,
-          strText);
+          strText, strIgnoreValue);
     } else if (name.equals("Field")) {
       FieldAdded field = null;
       final int size = amap.getLength();
@@ -483,7 +486,8 @@
           sql.strSequenceName = amap.getValue(i);
         }
       }
-      parameterSql = sql.addParameter(true, sql.strSequenceName, null, null, null, null, null);
+      parameterSql = sql
+          .addParameter(true, sql.strSequenceName, null, null, null, null, null, null);
     }
   }
 
@@ -848,14 +852,29 @@
                   + parameter.strName + "\"))?\" " + parameter.strText + " \":\"\");\n");
             } else if (parameter.strInOut.equals("argument")) {
               out2.append("    strSql = strSql + ((" + parameter.strName + "==null || "
-                  + parameter.strName + ".equals(\"\"))?\"\":\" " + parameter.strText + "\" + "
-                  + parameter.strName + ");\n");
+                  + parameter.strName + ".equals(\"\")");
+              if (parameter.strIgnoreValue != null) {
+                out2.append(" || " + parameter.strName + ".equals(\"" + parameter.strIgnoreValue
+                    + "\") ");
+              }
+              out2.append(")?\"\":\" " + parameter.strText + "\" + " + parameter.strName + ");\n");
             } else if (parameter.strInOut.equals("replace")) {
               out2.append("    strSql = strSql + ((" + parameter.strName + "==null || "
-                  + parameter.strName + ".equals(\"\"))?\"\":" + parameter.strName + ");\n");
+                  + parameter.strName + ".equals(\"\")");
+              if (parameter.strIgnoreValue != null) {
+                out2.append(" || " + parameter.strName + ".equals(\"" + parameter.strIgnoreValue
+                    + "\") ");
+              }
+              out2.append(")?\"\":" + parameter.strName + ");\n");
+
             } else {
               out2.append("    strSql = strSql + ((" + parameter.strName + "==null || "
-                  + parameter.strName + ".equals(\"\"))?\"\":\" " + parameter.strText + " \");\n");
+                  + parameter.strName + ".equals(\"\")");
+              if (parameter.strIgnoreValue != null) {
+                out2.append(" || " + parameter.strName + ".equals(\"" + parameter.strIgnoreValue
+                    + "\") ");
+              }
+              out2.append(")?\"\":\" " + parameter.strText + " \");\n");
             }
           } else if (parameter.strInOut.equals("replace")) {
             posFinalAfter = 0;
@@ -956,7 +975,12 @@
         }
         if (parameter.boolOptional) {
           aux.append("      if (" + parameter.strName + " != null && !(" + parameter.strName
-              + ".equals(\"\"))) {\n");
+              + ".equals(\"\"))");
+          if (parameter.strIgnoreValue != null) {
+            aux.append(" && !(" + parameter.strName + ".equals(\"" + parameter.strIgnoreValue
+                + "\"))");
+          }
+          aux.append(") {\n");
           aux.append("  ");
         }
         if (parameter.strInOut.equals("in") || parameter.strInOut.equals("inOut")) {
--- a/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java	Fri Jun 19 09:42:30 2009 +0200
@@ -1004,7 +1004,7 @@
           jasperPrint = JasperFillManager.fillReport(jasperReport, designParameters, con);
         }
       } catch (final Exception e) {
-        throw new ServletException(e.getCause().getMessage());
+        throw new ServletException(e.getMessage(), e);
       } finally {
         releaseRollbackConnection(con);
       }
@@ -1041,7 +1041,7 @@
       }
     } catch (final JRException e) {
       log4j.error("JR: Error: ", e);
-      throw new ServletException(e.getMessage());
+      throw new ServletException(e.getMessage(), e);
     } catch (IOException ioe) {
       try {
         FileUtility f = new FileUtility(globalParameters.strFTPDirectory, strFileName + "-"
--- a/src/org/openbravo/dal/core/OBContext.java	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/dal/core/OBContext.java	Fri Jun 19 09:42:30 2009 +0200
@@ -137,7 +137,7 @@
    *          the context which will be stored in the session
    */
   public static void setOBContextInSession(HttpServletRequest request, OBContext context) {
-    request.getSession().setAttribute(CONTEXT_PARAM, getOBContext());
+    request.getSession().setAttribute(CONTEXT_PARAM, context);
   }
 
   /**
--- a/src/org/openbravo/erpCommon/ad_process/CopyFromGLJournal_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_process/CopyFromGLJournal_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -80,7 +80,7 @@
     </Sql>
     <Field name="position" value="count"/>
     <Parameter name="description" optional="true" after="AND 1=1"><![CDATA[ AND UPPER(COALESCE(TO_CHAR(G.DESCRIPTION),' ')) LIKE UPPER(?) ]]></Parameter>
-    <Parameter name="documentNo" optional="true" after="AND 1=1"><![CDATA[ AND UPPER(G.DOCUMENTNO) LIKE UPPER(?) ]]></Parameter>
+    <Parameter name="documentNo" ignoreValue="%" optional="true" after="AND 1=1"><![CDATA[ AND UPPER(G.DOCUMENTNO) LIKE UPPER(?) ]]></Parameter>
     <Parameter name="adUserClient" type="replace" optional="true" after="G.AD_CLIENT_ID IN('" text="1"/>
     <Parameter name="adOrgClient" type="replace" optional="true" after="G.AD_ORG_ID IN(" text="'1'"/>
   </SqlMethod>
--- a/src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/MInOutTraceReports_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -87,7 +87,7 @@
      AND	T.M_ATTRIBUTESETINSTANCE_ID  = ?
      AND	T.M_PRODUCT_ID  = ?
      AND	T.M_LOCATOR_ID  = ?
-     AND	1  = 1
+     AND 1=1
     ORDER BY T.MOVEMENTDATE,
        T.CREATED 
      ]]></Sql>
@@ -102,8 +102,8 @@
      <Parameter name="mAttributesetinstanceId"/>
      <Parameter name="mProductId"/>
      <Parameter name="mLocatorId"/>
-     <Parameter name="plusQty" optional="true" type="none" after="AND 1=1"><![CDATA[ AND (T.MOVEMENTTYPE <> 'P+' OR  T.MOVEMENTQTY < 0) ]]></Parameter>
-     <Parameter name="minusQty" optional="true" type="none" after="AND 1=1"><![CDATA[ AND (T.MOVEMENTTYPE <> 'P+' OR  T.MOVEMENTQTY > 0) ]]></Parameter>
+     <Parameter name="plusQty" optional="true" type="none" after="1=1" ><![CDATA[ AND (T.MOVEMENTTYPE <> 'P+' AND  T.MOVEMENTQTY > 0)]]></Parameter>
+     <Parameter name="minusQty" optional="true" type="none" after="1=1" ><![CDATA[ AND (T.MOVEMENTTYPE <> 'P+' AND  T.MOVEMENTQTY < 0)]]></Parameter>
   </SqlMethod>
   <SqlMethod name="selectProductionOut" type="preparedStatement" return="multiple">
     <SqlMethodComment></SqlMethodComment>
--- a/src/org/openbravo/erpCommon/info/Account.java	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/Account.java	Fri Jun 19 09:42:30 2009 +0200
@@ -344,9 +344,6 @@
         // build sql orderBy clause
         String strOrderBy = SelectorUtility.buildOrderByClause(strOrderCols, strOrderDirs);
 
-        strAcctSchema = (strAcctSchema.equals("%") ? "" : strAcctSchema);
-        strAlias = (strAlias.equals("%") ? "" : strAlias);
-        strCombination = (strCombination.equals("%") ? "" : strCombination);
         if (strNewFilter.equals("1") || strNewFilter.equals("")) { // New
           // filter
           // or
--- a/src/org/openbravo/erpCommon/info/AccountElementValue.java	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/AccountElementValue.java	Fri Jun 19 09:42:30 2009 +0200
@@ -284,9 +284,6 @@
         // build sql orderBy clause
         String strOrderBy = SelectorUtility.buildOrderByClause(strOrderCols, strOrderDirs);
 
-        strAcctSchema = (strAcctSchema.equals("%") ? "" : strAcctSchema);
-        strValue = (strValue.equals("%") ? "" : strValue);
-        strName = (strName.equals("%") ? "" : strName);
         if (strNewFilter.equals("1") || strNewFilter.equals("")) { // New
           // filter
           // or
--- a/src/org/openbravo/erpCommon/info/AccountElementValue_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/AccountElementValue_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -49,7 +49,7 @@
         <Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
         <Parameter name="acctschema" optional="true" after="AND 1=1"><![CDATA[ AND C_ACCTSCHEMA_ID = ?]]></Parameter>
         <Parameter name="value" optional="true" after="AND 2=2"><![CDATA[ AND (C.VALUE IS NULL  OR UPPER(C.VALUE) LIKE UPPER(?)) ]]></Parameter>
-        <Parameter name="name" optional="true" after="AND 2=2"><![CDATA[ AND UPPER(C.NAME) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="AND 2=2"><![CDATA[ AND UPPER(C.NAME) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="organization" optional="true" after="AND 2=2"><![CDATA[ AND C.AD_ORG_ID = ? ]]></Parameter>
         <Parameter name="elementValue" optional="true" after="AND 2=2"><![CDATA[ AND C.C_ELEMENTVALUE_ID = ? ]]></Parameter>
         <Parameter name="adUserClient" type="replace" optional="true" after="C.AD_Client_ID IN (" text="'1'"/>
@@ -84,7 +84,7 @@
       ]]></Sql>
         <Parameter name="acctschema" optional="true" after="AND 1=1"><![CDATA[ AND C_ACCTSCHEMA_ID = ?]]></Parameter>
         <Parameter name="value" optional="true" after="AND 2=2"><![CDATA[ AND (C.VALUE IS NULL  OR UPPER(C.VALUE) LIKE UPPER(?)) ]]></Parameter>
-        <Parameter name="name" optional="true" after="AND 2=2"><![CDATA[ AND UPPER(C.NAME) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="AND 2=2"><![CDATA[ AND UPPER(C.NAME) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="organization" optional="true" after="AND 2=2"><![CDATA[ AND C.AD_ORG_ID = ? ]]></Parameter>
         <Parameter name="elementValue" optional="true" after="AND 2=2"><![CDATA[ AND C.C_ELEMENTVALUE_ID = ? ]]></Parameter>
         <Parameter name="adUserClient" type="replace" optional="true" after="C.AD_Client_ID IN (" text="'1'"/>
--- a/src/org/openbravo/erpCommon/info/Account_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/Account_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2008 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -52,7 +52,7 @@
         <Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
         <Parameter name="acctschema" optional="true" after="WHERE "><![CDATA[ C.C_ACCTSCHEMA_ID = ? AND ]]></Parameter>
         <Parameter name="alias" optional="true" after="WHERE "><![CDATA[ (C.ALIAS IS NULL  OR UPPER(C.ALIAS) LIKE UPPER(?)) AND ]]></Parameter>
-        <Parameter name="combination" optional="true" after="WHERE "><![CDATA[ UPPER(C.COMBINATION) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="combination" ignoreValue="%" optional="true" after="WHERE "><![CDATA[ UPPER(C.COMBINATION) LIKE UPPER(?) AND ]]></Parameter>
         <Parameter name="organization" optional="true" after="WHERE "><![CDATA[ C.AD_ORG_ID = ? AND ]]></Parameter>
         <Parameter name="account" optional="true" after="WHERE "><![CDATA[ C.ACCOUNT_ID = ? AND ]]></Parameter>
         <Parameter name="product" optional="true" after="WHERE "><![CDATA[ C.M_PRODUCT_ID = ? AND ]]></Parameter>
@@ -91,7 +91,7 @@
       ]]></Sql>
         <Parameter name="acctschema" optional="true" after="WHERE "><![CDATA[ C.C_ACCTSCHEMA_ID = ? AND ]]></Parameter>
         <Parameter name="alias" optional="true" after="WHERE "><![CDATA[ (C.ALIAS IS NULL  OR UPPER(C.ALIAS) LIKE UPPER(?)) AND ]]></Parameter>
-        <Parameter name="combination" optional="true" after="WHERE "><![CDATA[ UPPER(C.COMBINATION) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="combination" ignoreValue="%" optional="true" after="WHERE "><![CDATA[ UPPER(C.COMBINATION) LIKE UPPER(?) AND ]]></Parameter>
         <Parameter name="organization" optional="true" after="WHERE "><![CDATA[ C.AD_ORG_ID = ? AND ]]></Parameter>
         <Parameter name="account" optional="true" after="WHERE "><![CDATA[ C.ACCOUNT_ID = ? AND ]]></Parameter>
         <Parameter name="product" optional="true" after="WHERE "><![CDATA[ C.M_PRODUCT_ID = ? AND ]]></Parameter>
--- a/src/org/openbravo/erpCommon/info/BusinessPartner.java	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/BusinessPartner.java	Fri Jun 19 09:42:30 2009 +0200
@@ -284,13 +284,6 @@
     int offset = Integer.valueOf(strOffset).intValue();
     int pageSize = Integer.valueOf(strPageSize).intValue();
 
-    final String locKey = strKey.equals("%") ? "" : strKey;
-    final String locName = strName.equals("%") ? "" : strName;
-    final String locContact = strContact.equals("%") ? "" : strContact;
-    final String locZIP = strZIP.equals("%") ? "" : strZIP;
-    final String locProvince = strProvincia.equals("%") ? "" : strProvincia;
-    final String locCity = strCity.equals("%") ? "" : strCity;
-
     if (headers != null) {
       try {
         // build sql orderBy clause
@@ -300,9 +293,9 @@
         if (strNewFilter.equals("1") || strNewFilter.equals("")) {
           strNumRows = BusinessPartnerData.countRows(this, Utility.getContext(this, vars,
               "#User_Client", "BusinessPartner"), Utility.getSelectorOrgs(this, vars, strOrg),
-              locKey, locName, locContact, locZIP, locProvince,
+              strKey, strName, strContact, strZIP, strProvincia,
               (strBpartners.equals("customer") ? "clients" : ""),
-              (strBpartners.equals("vendor") ? "vendors" : ""), locCity);
+              (strBpartners.equals("vendor") ? "vendors" : ""), strCity);
           vars.setSessionValue("BusinessPartnerInfo.numrows", strNumRows);
         } else {
           strNumRows = vars.getSessionValue("BusinessPartnerInfo.numrows");
@@ -313,16 +306,16 @@
           final String oraLimit = (offset + 1) + " AND " + String.valueOf(offset + pageSize);
           data = BusinessPartnerData.select(this, "ROWNUM", Utility.getContext(this, vars,
               "#User_Client", "BusinessPartner"), Utility.getSelectorOrgs(this, vars, strOrg),
-              locKey, locName, locContact, locZIP, locProvince,
+              strKey, strName, strContact, strZIP, strProvincia,
               (strBpartners.equals("customer") ? "clients" : ""),
-              (strBpartners.equals("vendor") ? "vendors" : ""), locCity, strOrderBy, oraLimit, "");
+              (strBpartners.equals("vendor") ? "vendors" : ""), strCity, strOrderBy, oraLimit, "");
         } else {
           final String pgLimit = pageSize + " OFFSET " + offset;
           data = BusinessPartnerData.select(this, "1", Utility.getContext(this, vars,
               "#User_Client", "BusinessPartner"), Utility.getSelectorOrgs(this, vars, strOrg),
-              locKey, locName, locContact, locZIP, locProvince,
+              strKey, strName, strContact, strZIP, strProvincia,
               (strBpartners.equals("customer") ? "clients" : ""),
-              (strBpartners.equals("vendor") ? "vendors" : ""), locCity, strOrderBy, "", pgLimit);
+              (strBpartners.equals("vendor") ? "vendors" : ""), strCity, strOrderBy, "", pgLimit);
         }
       } catch (final ServletException e) {
         log4j.error("Error in print page data: " + e);
--- a/src/org/openbravo/erpCommon/info/BusinessPartnerMultiple_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/BusinessPartnerMultiple_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -51,14 +51,14 @@
         <Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
         <Parameter name="adUserClient" type="replace" optional="true" after="bp.AD_Client_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="bp.AD_Org_ID IN (" text="'1'"/>
-        <Parameter name="key" optional="true" after="AND COALESCE(l.IsActive, 'Y')='Y'"><![CDATA[AND UPPER(bp.Value) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="name" optional="true" after="AND COALESCE(l.IsActive, 'Y')='Y'"><![CDATA[AND UPPER(bp.Name) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="contact" optional="true" after="AND COALESCE(l.IsActive, 'Y')='Y'"><![CDATA[AND UPPER(c.Name) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="codigoPostal" optional="true" after="AND COALESCE(l.IsActive, 'Y')='Y'"><![CDATA[AND UPPER(a.Postal) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="provincia" optional="true" after="AND COALESCE(l.IsActive, 'Y')='Y'"><![CDATA[AND UPPER(C_REGION.NAME) LIKE UPPER(?)]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="AND COALESCE(l.IsActive, 'Y')='Y'"><![CDATA[AND UPPER(bp.Value) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="AND COALESCE(l.IsActive, 'Y')='Y'"><![CDATA[AND UPPER(bp.Name) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="contact" ignoreValue="%" optional="true" after="AND COALESCE(l.IsActive, 'Y')='Y'"><![CDATA[AND UPPER(c.Name) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="codigoPostal" ignoreValue="%" optional="true" after="AND COALESCE(l.IsActive, 'Y')='Y'"><![CDATA[AND UPPER(a.Postal) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="provincia" ignoreValue="%" optional="true" after="AND COALESCE(l.IsActive, 'Y')='Y'"><![CDATA[AND UPPER(C_REGION.NAME) LIKE UPPER(?)]]></Parameter>
         <Parameter name="clients" optional="true" type="none" after="AND COALESCE(l.IsActive, 'Y')='Y'"><![CDATA[AND bp.ISCUSTOMER = 'Y' ]]></Parameter>
         <Parameter name="vendors" optional="true" type="none" after="AND COALESCE(l.IsActive, 'Y')='Y'"><![CDATA[AND bp.ISVENDOR ='Y']]></Parameter>
-        <Parameter name="ciudad" optional="true" after="AND COALESCE(l.IsActive, 'Y')='Y'"><![CDATA[AND UPPER(a.City) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="ciudad" ignoreValue="%" optional="true" after="AND COALESCE(l.IsActive, 'Y')='Y'"><![CDATA[AND UPPER(a.City) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="orderBy" type="replace" optional="true" after="ORDER BY " text="bp.NAME" />
         <Parameter name="oraLimit" type="argument" optional="true" after="WHERE 1=1"><![CDATA[AND RN1 BETWEEN ]]></Parameter>
         <Parameter name="pgLimit" type="argument" optional="true" after="WHERE 1=1"><![CDATA[LIMIT ]]></Parameter>
--- a/src/org/openbravo/erpCommon/info/BusinessPartner_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/BusinessPartner_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2008 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -56,14 +56,14 @@
         <Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
         <Parameter name="adUserClient" type="replace" optional="true" after="bp.AD_Client_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="bp.AD_Org_ID IN (" text="'1'"/>
-        <Parameter name="key" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(bp.Value) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="name" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND C_IGNORE_ACCENT(bp.Name) LIKE C_IGNORE_ACCENT(?) ]]></Parameter>
-        <Parameter name="contact" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(COALESCE(c.name,u.name)) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="codigoPostal" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(l.Postal) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="provincia" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(r.NAME) LIKE UPPER(?)]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(bp.Value) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND C_IGNORE_ACCENT(bp.Name) LIKE C_IGNORE_ACCENT(?) ]]></Parameter>
+        <Parameter name="contact" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(COALESCE(c.name,u.name)) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="codigoPostal" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(l.Postal) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="provincia" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(r.NAME) LIKE UPPER(?)]]></Parameter>
         <Parameter name="clients" optional="true" type="none" after="AND bp.IsActive='Y'"><![CDATA[AND ISCUSTOMER = 'Y' ]]></Parameter>
         <Parameter name="vendors" optional="true" type="none" after="AND bp.IsActive='Y'"><![CDATA[AND ISVENDOR ='Y']]></Parameter>
-        <Parameter name="ciudad" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(l.City) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="ciudad" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(l.City) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="orderBy" type="replace" optional="true" after="ORDER BY " text="bp.value" />
         <Parameter name="oraLimit" type="argument" optional="true" after="WHERE 1=1"><![CDATA[AND RN1 BETWEEN ]]></Parameter>
         <Parameter name="pgLimit" type="argument" optional="true" after="WHERE 1=1"><![CDATA[LIMIT ]]></Parameter>
@@ -90,14 +90,14 @@
         <Field name="position" value="count"/>       
         <Parameter name="adUserClient" type="replace" optional="true" after="bp.AD_Client_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="bp.AD_Org_ID IN (" text="'1'"/>
-        <Parameter name="key" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(bp.Value) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="name" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND C_IGNORE_ACCENT(bp.Name) LIKE C_IGNORE_ACCENT(?) ]]></Parameter>
-        <Parameter name="contact" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(COALESCE(c.name,u.name)) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="codigoPostal" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(l.Postal) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="provincia" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(r.NAME) LIKE UPPER(?)]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(bp.Value) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND C_IGNORE_ACCENT(bp.Name) LIKE C_IGNORE_ACCENT(?) ]]></Parameter>
+        <Parameter name="contact" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(COALESCE(c.name,u.name)) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="codigoPostal" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(l.Postal) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="provincia" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(r.NAME) LIKE UPPER(?)]]></Parameter>
         <Parameter name="clients" optional="true" type="none" after="AND bp.IsActive='Y'"><![CDATA[AND ISCUSTOMER = 'Y' ]]></Parameter>
         <Parameter name="vendors" optional="true" type="none" after="AND bp.IsActive='Y'"><![CDATA[AND ISVENDOR ='Y']]></Parameter>
-        <Parameter name="ciudad" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(l.City) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="ciudad" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(l.City) LIKE UPPER(?) ]]></Parameter>
    </SqlMethod>
    <SqlMethod name="set" type="constant" return="multiple">
       <SqlMethodComment></SqlMethodComment>
--- a/src/org/openbravo/erpCommon/info/DebtPayment_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/DebtPayment_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -73,8 +73,8 @@
         <Parameter name="paymentRule" optional="true" after="DP.IsValid='Y'"><![CDATA[ AND dp.paymentrule = ? ]]></Parameter>
         <Parameter name="isPaid" optional="true" after="DP.IsValid='Y'"><![CDATA[ AND dp.ispaid = ? ]]></Parameter>
         <Parameter name="isReceipt" optional="true" after="DP.IsValid='Y'"><![CDATA[ AND dp.isreceipt = ? ]]></Parameter>
-        <Parameter name="invoiceId" optional="true" after="DP.IsValid='Y'"><![CDATA[ AND i.documentno like ? ]]></Parameter>
-        <Parameter name="orderId" optional="true" after="DP.IsValid='Y'"><![CDATA[ AND o.documentno like ? ]]></Parameter>
+        <Parameter name="invoiceId" ignoreValue="%" optional="true" after="DP.IsValid='Y'"><![CDATA[ AND i.documentno like ? ]]></Parameter>
+        <Parameter name="orderId" ignoreValue="%" optional="true" after="DP.IsValid='Y'"><![CDATA[ AND o.documentno like ? ]]></Parameter>
         <Parameter name="isPending" type="replace" optional="true" after="END " text="= ''"/>
         <Parameter name="orderBy" type="replace" optional="true" after="ORDER BY " text="DP.C_DEBT_PAYMENT_ID" />
         <Parameter name="oraLimit" type="argument" optional="true" after="WHERE 1=1"><![CDATA[AND RN1 BETWEEN ]]></Parameter>
@@ -119,8 +119,8 @@
         <Parameter name="paymentRule" optional="true" after="DP.IsValid='Y'"><![CDATA[ AND dp.paymentrule = ? ]]></Parameter>
         <Parameter name="isPaid" optional="true" after="DP.IsValid='Y'"><![CDATA[ AND dp.ispaid = ? ]]></Parameter>
         <Parameter name="isReceipt" optional="true" after="DP.IsValid='Y'"><![CDATA[ AND dp.isreceipt = ? ]]></Parameter>
-        <Parameter name="invoiceId" optional="true" after="DP.IsValid='Y'"><![CDATA[ AND i.documentno like ? ]]></Parameter>
-        <Parameter name="orderId" optional="true" after="DP.IsValid='Y'"><![CDATA[ AND o.documentno like ? ]]></Parameter>
+        <Parameter name="invoiceId" ignoreValue="%" optional="true" after="DP.IsValid='Y'"><![CDATA[ AND i.documentno like ? ]]></Parameter>
+        <Parameter name="orderId" ignoreValue="%" optional="true" after="DP.IsValid='Y'"><![CDATA[ AND o.documentno like ? ]]></Parameter>
         <Parameter name="isPending" type="replace" optional="true" after="END " text="= ''"/>
    </SqlMethod>
 
--- a/src/org/openbravo/erpCommon/info/ImageInfo_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/ImageInfo_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -37,8 +37,8 @@
         <Field name="position" value="count"/>
         <Parameter name="adUserClient" type="replace" optional="true" after="AD_CLIENT_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="AD_ORG_ID IN (" text="'1'"/>
-        <Parameter name="name" optional="true" after="AND ISACTIVE = 'Y' "><![CDATA[AND UPPER(Name) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="imageurl" optional="true" after="AND ISACTIVE = 'Y' "><![CDATA[AND UPPER(IMAGEURL) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="AND ISACTIVE = 'Y' "><![CDATA[AND UPPER(Name) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="imageurl" ignoreValue="%" optional="true" after="AND ISACTIVE = 'Y' "><![CDATA[AND UPPER(IMAGEURL) LIKE UPPER(?) ]]></Parameter>
    </SqlMethod>
    <SqlMethod name="set" type="constant" return="multiple">
       <SqlMethodComment></SqlMethodComment>
--- a/src/org/openbravo/erpCommon/info/Invoice.java	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/Invoice.java	Fri Jun 19 09:42:30 2009 +0200
@@ -267,14 +267,6 @@
         // build sql orderBy clause
         String strOrderBy = SelectorUtility.buildOrderByClause(strOrderCols, strOrderDirs);
 
-        // remove single % in parameters used in like upper(parameter)
-        if (strName.equals("%")) {
-          strName = null;
-        }
-        if (strDescription.equals("%")) {
-          strDescription = null;
-        }
-
         if (strNewFilter.equals("1") || strNewFilter.equals("")) { // New
           // filter
           // or
--- a/src/org/openbravo/erpCommon/info/InvoiceLine.java	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/InvoiceLine.java	Fri Jun 19 09:42:30 2009 +0200
@@ -294,17 +294,6 @@
         // build sql orderBy clause
         String strOrderBy = SelectorUtility.buildOrderByClause(strOrderCols, strOrderDirs);
 
-        // remove single % in parameters used in like upper(parameter)
-        if (strDocumentNo.equals("%")) {
-          strDocumentNo = null;
-        }
-        if (strDescription.equals("%")) {
-          strDescription = null;
-        }
-        if (strOrder.equals("%")) {
-          strOrder = null;
-        }
-
         if (strNewFilter.equals("1") || strNewFilter.equals("")) { // New
           // filter
           // or
--- a/src/org/openbravo/erpCommon/info/InvoiceLine_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/InvoiceLine_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -53,9 +53,9 @@
         <Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
         <Parameter name="adUserClient" type="replace" optional="true" after="I.AD_CLIENT_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="I.AD_ORG_ID IN (" text="'1'"/>
-        <Parameter name="documentno" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND UPPER(I.DocumentNo) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="description" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND UPPER(I.Description) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="orderReference" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND UPPER(I.POReference) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="documentno" ignoreValue="%" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND UPPER(I.DocumentNo) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="description" ignoreValue="%" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND UPPER(I.Description) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="orderReference" ignoreValue="%" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND UPPER(I.POReference) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="businesPartner" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND I.C_BPartner_ID=? ]]></Parameter>
         <Parameter name="dateFrom" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND I.DATEINVOICED >= TO_DATE(?) ]]></Parameter>
         <Parameter name="dateTo" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND I.DATEINVOICED < TO_DATE(?) ]]></Parameter>
@@ -85,9 +85,9 @@
         <Field name="position" value="count"/>
         <Parameter name="adUserClient" type="replace" optional="true" after="I.AD_CLIENT_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="I.AD_ORG_ID IN (" text="'1'"/>
-        <Parameter name="documentno" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND UPPER(I.DocumentNo) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="description" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND UPPER(I.Description) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="orderReference" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND UPPER(I.POReference) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="documentno" ignoreValue="%" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND UPPER(I.DocumentNo) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="description" ignoreValue="%" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND UPPER(I.Description) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="orderReference" ignoreValue="%" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND UPPER(I.POReference) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="businesPartner" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND I.C_BPartner_ID = ? ]]></Parameter>
         <Parameter name="dateFrom" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND I.DATEINVOICED >= TO_DATE(?) ]]></Parameter>
         <Parameter name="dateTo" optional="true" after="AND I.IsActive='Y'"><![CDATA[ AND I.DATEINVOICED < TO_DATE(?) ]]></Parameter>
@@ -128,9 +128,9 @@
         <Field name="position" value="count"/>
         <Parameter name="adUserClient" type="replace" optional="true" after="o.AD_CLIENT_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="o.AD_ORG_ID IN (" text="'1'"/>
-        <Parameter name="documentno" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.DocumentNo) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="description" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.Description) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="orderReference" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.POReference) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="documentno" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.DocumentNo) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="description" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.Description) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="orderReference" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.POReference) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="businesPartner" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.C_BPartner_ID=? ]]></Parameter>
         <Parameter name="dateFrom" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.DateOrdered >= to_date(?) ]]></Parameter>
         <Parameter name="dateTo" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.DateOrdered < to_date(?) ]]></Parameter>
--- a/src/org/openbravo/erpCommon/info/Invoice_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/Invoice_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -64,8 +64,8 @@
         <Parameter name="dateFormat"/>        
         <Parameter name="adUserClient" type="replace" optional="true" after="i.AD_Client_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="i.AD_Org_ID IN (" text="'1'"/>
-        <Parameter name="key" optional="true" after="AND i.IsActive='Y'"><![CDATA[ AND UPPER(i.DocumentNo) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="description" optional="true" after="AND i.IsActive='Y'"><![CDATA[ AND UPPER(i.Description) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="AND i.IsActive='Y'"><![CDATA[ AND UPPER(i.DocumentNo) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="description" ignoreValue="%" optional="true" after="AND i.IsActive='Y'"><![CDATA[ AND UPPER(i.Description) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="businesPartner" optional="true" after="AND i.IsActive='Y'"><![CDATA[ AND i.C_BPartner_ID = ? ]]></Parameter>
         <Parameter name="order" optional="true" after="AND i.IsActive='Y'"><![CDATA[ AND i.POReference = ? ]]></Parameter>
         <Parameter name="dateFrom" optional="true" after="AND i.IsActive='Y'"><![CDATA[ AND i.DateInvoiced >= TO_DATE(?) ]]></Parameter>
@@ -92,8 +92,8 @@
         <Field name="position" value="count"/>
         <Parameter name="adUserClient" type="replace" optional="true" after="i.AD_Client_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="i.AD_Org_ID IN (" text="'1'"/>
-        <Parameter name="key" optional="true" after="AND i.IsActive='Y'"><![CDATA[ AND UPPER(i.DocumentNo) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="description" optional="true" after="AND i.IsActive='Y'"><![CDATA[ AND UPPER(i.Description) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="AND i.IsActive='Y'"><![CDATA[ AND UPPER(i.DocumentNo) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="description" ignoreValue="%" optional="true" after="AND i.IsActive='Y'"><![CDATA[ AND UPPER(i.Description) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="businesPartner" optional="true" after="AND i.IsActive='Y'"><![CDATA[ AND i.C_BPartner_ID = ? ]]></Parameter>
         <Parameter name="order" optional="true" after="AND i.IsActive='Y'"><![CDATA[ AND i.POReference = ? ]]></Parameter>
         <Parameter name="dateFrom" optional="true" after="AND i.IsActive='Y'"><![CDATA[ AND i.DateInvoiced >= TO_DATE(?) ]]></Parameter>
--- a/src/org/openbravo/erpCommon/info/Locator_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/Locator_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -48,11 +48,11 @@
         <Parameter name="adLanguage"/>
         <Parameter name="adUserClient" type="replace" optional="true" after="mw.AD_Client_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="mw.AD_Org_ID IN (" text="'1'"/>
-        <Parameter name="key" optional="true" after="AND m.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(m.VALUE) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="warehouse" optional="true" after="AND m.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(mw.NAME) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="aisle" optional="true" after="AND m.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(m.X) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="bin" optional="true" after="AND m.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(m.Y) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="level" optional="true" after="AND m.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(m.Z) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="AND m.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(m.VALUE) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="warehouse" ignoreValue="%" optional="true" after="AND m.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(mw.NAME) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="aisle" ignoreValue="%" optional="true" after="AND m.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(m.X) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="bin" ignoreValue="%" optional="true" after="AND m.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(m.Y) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="level" ignoreValue="%" optional="true" after="AND m.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(m.Z) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="orderBy" type="replace" optional="true" after="ORDER BY " text="m.M_LOCATOR_ID" />
         <Parameter name="oraLimit" type="argument" optional="true" after="WHERE 1=1"><![CDATA[AND RN1 BETWEEN ]]></Parameter>
         <Parameter name="pgLimit" type="argument" optional="true" after="WHERE 1=1"><![CDATA[LIMIT ]]></Parameter>
@@ -77,7 +77,7 @@
       </Sql>
         <Parameter name="adUserClient" type="replace" optional="true" after="mw.AD_Client_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="mw.AD_Org_ID IN (" text="'1'"/>
-        <Parameter name="warehouse" optional="true" after="AND m.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(mw.NAME) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="warehouse" ignoreValue="%" optional="true" after="AND m.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(mw.NAME) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="key"/>
    </SqlMethod>
    <SqlMethod name="selectname" type="preparedStatement" return="string" default="">
--- a/src/org/openbravo/erpCommon/info/ProductComplete.java	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/ProductComplete.java	Fri Jun 19 09:42:30 2009 +0200
@@ -343,10 +343,6 @@
     int offset = Integer.valueOf(strOffset).intValue();
     int pageSize = Integer.valueOf(strPageSize).intValue();
 
-    // strip out single '%' parameters used with like
-    strKey = strKey.equals("%") ? "" : strKey;
-    strName = strName.equals("%") ? "" : strName;
-
     if (headers != null) {
       try {
         // build sql orderBy clause from parameters
--- a/src/org/openbravo/erpCommon/info/ProductComplete_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/ProductComplete_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2008 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -67,8 +67,8 @@
       ]]></Sql>
         <Field name="position" value="count"/>
         <Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
-        <Parameter name="key" optional="true" after="WHERE T.M_PRODUCT_ID = P.M_PRODUCT_ID "><![CDATA[ AND UPPER(P.Value) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="name" optional="true" after="WHERE T.M_PRODUCT_ID = P.M_PRODUCT_ID "><![CDATA[ AND UPPER(P.Name) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="WHERE T.M_PRODUCT_ID = P.M_PRODUCT_ID "><![CDATA[ AND UPPER(P.Value) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="WHERE T.M_PRODUCT_ID = P.M_PRODUCT_ID "><![CDATA[ AND UPPER(P.Name) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="warehouse" optional="true" after="WHERE T.M_PRODUCT_ID = P.M_PRODUCT_ID "><![CDATA[ AND W.M_Warehouse_ID = ? ]]></Parameter>
         <Parameter name="production" type="none" optional="true" after="AND P.ISACTIVE = 'Y'"><![CDATA[ AND P.production = 'Y' ]]></Parameter>
         <Parameter name="adRoleId"/>
@@ -104,8 +104,8 @@
         AND (T.QtyOnHand <> 0 OR COALESCE(T.QtyOrderOnHand, 0) <> 0) 
       ]]></Sql>
         <Field name="position" value="count"/>
-        <Parameter name="key" optional="true" after="WHERE T.M_PRODUCT_ID = P.M_PRODUCT_ID "><![CDATA[ AND UPPER(P.Value) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="name" optional="true" after="WHERE T.M_PRODUCT_ID = P.M_PRODUCT_ID "><![CDATA[ AND UPPER(P.Name) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="WHERE T.M_PRODUCT_ID = P.M_PRODUCT_ID "><![CDATA[ AND UPPER(P.Value) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="WHERE T.M_PRODUCT_ID = P.M_PRODUCT_ID "><![CDATA[ AND UPPER(P.Name) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="warehouse" optional="true" after="WHERE T.M_PRODUCT_ID = P.M_PRODUCT_ID "><![CDATA[ AND W.M_Warehouse_ID = ? ]]></Parameter>
         <Parameter name="production" type="none" optional="true" after="AND P.ISACTIVE = 'Y'"><![CDATA[ AND P.production = 'Y' ]]></Parameter>
         <Parameter name="adRoleId"/>
@@ -157,8 +157,8 @@
         <Field name="position" value="count"/>
         <Parameter name="adLanguage"/>
         <Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
-        <Parameter name="key" optional="true" after="WHERE T.M_PRODUCT_ID = P.M_PRODUCT_ID "><![CDATA[ AND UPPER(P.Value) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="name" optional="true" after="WHERE T.M_PRODUCT_ID = P.M_PRODUCT_ID "><![CDATA[ AND UPPER(P.Name) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="WHERE T.M_PRODUCT_ID = P.M_PRODUCT_ID "><![CDATA[ AND UPPER(P.Value) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="WHERE T.M_PRODUCT_ID = P.M_PRODUCT_ID "><![CDATA[ AND UPPER(P.Name) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="warehouse" optional="true" after="WHERE T.M_PRODUCT_ID = P.M_PRODUCT_ID "><![CDATA[ AND W.M_Warehouse_ID = ? ]]></Parameter>
         <Parameter name="production" type="none" optional="true" after="AND P.ISACTIVE = 'Y'"><![CDATA[ AND P.production = 'Y' ]]></Parameter>
         <Parameter name="adRoleId"/>
@@ -182,8 +182,8 @@
         AND P.ISACTIVE = 'Y'
       ]]></Sql>
         <Field name="position" value="count"/>
-        <Parameter name="key" optional="true" after="WHERE "><![CDATA[ UPPER(P.Value) LIKE UPPER(?) AND ]]></Parameter>
-        <Parameter name="name" optional="true" after="WHERE "><![CDATA[ UPPER(P.Name) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="WHERE "><![CDATA[ UPPER(P.Value) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="WHERE "><![CDATA[ UPPER(P.Name) LIKE UPPER(?) AND ]]></Parameter>
         <Parameter name="cBpartnerId"/>
         <Parameter name="adUserClient" type="replace" optional="true" after="P.AD_CLIENT_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="P.AD_ORG_ID IN (" text="'1'"/>
@@ -215,8 +215,8 @@
       ]]></Sql>
         <Field name="position" value="count"/>
         <Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
-        <Parameter name="key" optional="true" after="WHERE "><![CDATA[ UPPER(P.Value) LIKE UPPER(?) AND ]]></Parameter>
-        <Parameter name="name" optional="true" after="WHERE "><![CDATA[ UPPER(P.Name) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="WHERE "><![CDATA[ UPPER(P.Value) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="WHERE "><![CDATA[ UPPER(P.Name) LIKE UPPER(?) AND ]]></Parameter>
         <Parameter name="cBpartnerId"/>
         <Parameter name="adUserClient" type="replace" optional="true" after="P.AD_CLIENT_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="P.AD_ORG_ID IN (" text="'1'"/>
@@ -241,8 +241,8 @@
       ]]></Sql>
         <Field name="position" value="count"/>
         <Parameter name="adLanguage"/>
-        <Parameter name="key" optional="true" after="WHERE "><![CDATA[ UPPER(P.Value) LIKE UPPER(?) AND ]]></Parameter>
-        <Parameter name="name" optional="true" after="WHERE "><![CDATA[ UPPER(P.Name) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="WHERE "><![CDATA[ UPPER(P.Value) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="WHERE "><![CDATA[ UPPER(P.Name) LIKE UPPER(?) AND ]]></Parameter>
         <Parameter name="cBpartnerId"/>
         <Parameter name="adUserClient" type="replace" optional="true" after="P.AD_CLIENT_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="P.AD_ORG_ID IN (" text="'1'"/> 
@@ -276,8 +276,8 @@
         <Field name="position" value="count"/>
         <Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
         <Parameter name="adLanguage"/>
-        <Parameter name="key" optional="true" after="WHERE "><![CDATA[ UPPER(P.Value) LIKE UPPER(?) AND ]]></Parameter>
-        <Parameter name="name" optional="true" after="WHERE "><![CDATA[ UPPER(P.Name) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="WHERE "><![CDATA[ UPPER(P.Value) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="WHERE "><![CDATA[ UPPER(P.Name) LIKE UPPER(?) AND ]]></Parameter>
         <Parameter name="cBpartnerId"/>
         <Parameter name="adUserClient" type="replace" optional="true" after="P.AD_CLIENT_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="P.AD_ORG_ID IN (" text="'1'"/> 
--- a/src/org/openbravo/erpCommon/info/ProductMultiple_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/ProductMultiple_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2007 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -41,8 +41,8 @@
       ]]></Sql>
         <Field name="position" value="count"/>
         <Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
-        <Parameter name="key" optional="true" after="WHERE "><![CDATA[ UPPER(p.Value) LIKE UPPER(?) AND ]]></Parameter>
-        <Parameter name="name" optional="true" after="WHERE "><![CDATA[ UPPER(p.Name) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="WHERE "><![CDATA[ UPPER(p.Value) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="WHERE "><![CDATA[ UPPER(p.Name) LIKE UPPER(?) AND ]]></Parameter>
         <Parameter name="productCategory" optional="true" after="WHERE "><![CDATA[ p.M_Product_Category_ID = ? AND ]]></Parameter>
         <Parameter name="adUserClient" type="replace" optional="true" after="p.AD_Client_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="p.AD_Org_ID IN (" text="'1'"/>
--- a/src/org/openbravo/erpCommon/info/Product_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/Product_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -73,8 +73,8 @@
         <Parameter name="warehouse"/>
         <Parameter name="warehouse"/>
         <Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
-        <Parameter name="key" optional="true" after="ip.IsSummary='N' AND "><![CDATA[ UPPER(ip.Value) LIKE UPPER(?) AND ]]></Parameter>
-        <Parameter name="name" optional="true" after="ip.IsSummary='N' AND "><![CDATA[ UPPER(ip.Name) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="ip.IsSummary='N' AND "><![CDATA[ UPPER(ip.Value) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="ip.IsSummary='N' AND "><![CDATA[ UPPER(ip.Name) LIKE UPPER(?) AND ]]></Parameter>
         <Parameter name="adUserClient" type="replace" optional="true" after="ip.AD_Client_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="ip.AD_Org_ID IN (" text="'1'"/>
         <Parameter name="priceListVersion"/>
@@ -100,8 +100,8 @@
         AND p.AD_Client_ID IN ('1') 
         AND p.AD_Org_ID IN ('1') 
       ]]></Sql>
-        <Parameter name="key" optional="true" after="WHERE "><![CDATA[ UPPER(p.Value) LIKE UPPER(?) AND ]]></Parameter>
-        <Parameter name="name" optional="true" after="WHERE "><![CDATA[ UPPER(p.Name) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="WHERE "><![CDATA[ UPPER(p.Value) LIKE UPPER(?) AND ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="WHERE "><![CDATA[ UPPER(p.Name) LIKE UPPER(?) AND ]]></Parameter>
         <Parameter name="priceListVersion"/>
         <Parameter name="adUserClient" type="replace" optional="true" after="p.AD_Client_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="p.AD_Org_ID IN (" text="'1'"/>
--- a/src/org/openbravo/erpCommon/info/Project_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/Project_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -49,8 +49,8 @@
         <Parameter name="language"/>
         <Parameter name="adUserClient" type="replace" optional="true" after="P.AD_CLIENT_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="P.AD_ORG_ID IN (" text="'1'"/>
-        <Parameter name="key" optional="true" after="AND P.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(P.Value) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="name" optional="true" after="AND P.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(P.Name) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="AND P.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(P.Value) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="AND P.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(P.Name) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="bpartner" optional="true" after="AND P.ISACTIVE = 'Y'"><![CDATA[ AND P.C_BPARTNER_ID = ? ]]></Parameter>
         <Parameter name="orderBy" type="replace" optional="true" after="ORDER BY " text="P.VALUE" />
         <Parameter name="oraLimit" type="argument" optional="true" after="WHERE 1=1"><![CDATA[AND RN1 BETWEEN ]]></Parameter>
--- a/src/org/openbravo/erpCommon/info/SalesOrder.java	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/SalesOrder.java	Fri Jun 19 09:42:30 2009 +0200
@@ -247,17 +247,6 @@
         // build sql orderBy clause from parameters
         String strOrderBy = SelectorUtility.buildOrderByClause(strOrderCols, strOrderDirs);
 
-        // remove single % in parameters used in like upper(parameter)
-        if (strName.equals("%")) {
-          strName = null;
-        }
-        if (strDescription.equals("%")) {
-          strDescription = null;
-        }
-        if (strOrder.equals("%")) {
-          strOrder = null;
-        }
-
         if (strNewFilter.equals("1") || strNewFilter.equals("")) { // New
           // filter
           // or
--- a/src/org/openbravo/erpCommon/info/SalesOrderLine.java	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/SalesOrderLine.java	Fri Jun 19 09:42:30 2009 +0200
@@ -336,17 +336,6 @@
         // build sql orderBy clause from parameters
         String strOrderBy = SelectorUtility.buildOrderByClause(strOrderCols, strOrderDirs);
 
-        // remove single % in parameters used in like upper(parameter)
-        if (strDocumentNo.equals("%")) {
-          strDocumentNo = null;
-        }
-        if (strDescription.equals("%")) {
-          strDescription = null;
-        }
-        if (strOrder.equals("%")) {
-          strOrder = null;
-        }
-
         // New filter or first load
         if (strNewFilter.equals("1") || strNewFilter.equals("")) {
           if (strSOTrx.equals("Y")) {
--- a/src/org/openbravo/erpCommon/info/SalesOrderLine_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/SalesOrderLine_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -52,9 +52,9 @@
 			<Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
         <Parameter name="adUserClient" type="replace" optional="true" after="o.AD_CLIENT_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="o.AD_ORG_ID IN (" text="'1'"/>
-        <Parameter name="documentno" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.DocumentNo) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="description" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.Description) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="orderReference" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.POReference) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="documentno" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.DocumentNo) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="description" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.Description) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="orderReference" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.POReference) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="businesPartner" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.C_BPartner_ID=? ]]></Parameter>
         <Parameter name="dateFrom" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.DateOrdered >= to_date(?) ]]></Parameter>
         <Parameter name="dateTo" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.DateOrdered < to_date(?) ]]></Parameter>
@@ -86,9 +86,9 @@
         <Field name="position" value="count"/>
         <Parameter name="adUserClient" type="replace" optional="true" after="o.AD_CLIENT_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="o.AD_ORG_ID IN (" text="'1'"/>
-        <Parameter name="documentno" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.DocumentNo) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="description" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.Description) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="orderReference" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.POReference) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="documentno" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.DocumentNo) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="description" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.Description) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="orderReference" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.POReference) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="businesPartner" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.C_BPartner_ID = ? ]]></Parameter>
         <Parameter name="dateFrom" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.DateOrdered >= to_date(?) ]]></Parameter>
         <Parameter name="dateTo" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.DateOrdered < to_date(?) ]]></Parameter>
@@ -136,9 +136,9 @@
 			<Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
         <Parameter name="adUserClient" type="replace" optional="true" after="o.AD_CLIENT_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="o.AD_ORG_ID IN (" text="'1'"/>
-        <Parameter name="documentno" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.DocumentNo) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="description" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.Description) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="orderReference" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.POReference) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="documentno" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.DocumentNo) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="description" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.Description) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="orderReference" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.POReference) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="businesPartner" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.C_BPartner_ID=? ]]></Parameter>
         <Parameter name="dateFrom" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.DateOrdered >= to_date(?) ]]></Parameter>
         <Parameter name="dateTo" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.DateOrdered < to_date(?) ]]></Parameter>
--- a/src/org/openbravo/erpCommon/info/SalesOrder_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/SalesOrder_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2008 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -54,9 +54,9 @@
 		    <Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
         <Parameter name="adUserClient" type="replace" optional="true" after="o.AD_Client_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="o.AD_Org_ID IN (" text="'1'"/>
-        <Parameter name="key" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.DocumentNo) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="description" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.Description) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="orderReference" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.POReference) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.DocumentNo) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="description" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.Description) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="orderReference" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.POReference) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="businesPartner" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.C_BPartner_ID=? ]]></Parameter>
         <Parameter name="dateFrom" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.DateOrdered >= to_date(?) ]]></Parameter>
         <Parameter name="dateTo" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.DateOrdered < to_date(?) ]]></Parameter>
@@ -81,9 +81,9 @@
         <Field name="position" value="count"/>
         <Parameter name="adUserClient" type="replace" optional="true" after="o.AD_Client_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="o.AD_Org_ID IN (" text="'1'"/>
-        <Parameter name="key" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.DocumentNo) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="description" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.Description) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="orderReference" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.POReference) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.DocumentNo) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="description" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.Description) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="orderReference" ignoreValue="%" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND UPPER(o.POReference) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="businesPartner" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.C_BPartner_ID = ? ]]></Parameter>
         <Parameter name="dateFrom" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.DateOrdered >= to_date(?) ]]></Parameter>
         <Parameter name="dateTo" optional="true" after="AND o.IsActive='Y'"><![CDATA[ AND o.DateOrdered < to_date(?) ]]></Parameter>
--- a/src/org/openbravo/erpCommon/info/ShipmentReceiptLine_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/ShipmentReceiptLine_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2006 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -55,9 +55,9 @@
 				<Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
         <Parameter name="adUserClient" type="replace" optional="true" after="m.AD_CLIENT_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="m.AD_ORG_ID IN (" text="'1'"/>
-        <Parameter name="documentno" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND UPPER(m.DocumentNo) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="description" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND UPPER(m.Description) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="orderReference" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND UPPER(m.POReference) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="documentno" ignoreValue="%" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND UPPER(m.DocumentNo) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="description" ignoreValue="%" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND UPPER(m.Description) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="orderReference" ignoreValue="%" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND UPPER(m.POReference) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="businesPartner" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND m.C_BPartner_ID=? ]]></Parameter>
         <Parameter name="dateFrom" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND m.MovementDate >= to_date(?) ]]></Parameter>
         <Parameter name="dateTo" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND m.MovementDate < to_date(?) ]]></Parameter>
@@ -105,9 +105,9 @@
 				<Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
         <Parameter name="adUserClient" type="replace" optional="true" after="m.AD_CLIENT_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="m.AD_ORG_ID IN (" text="'1'"/>
-        <Parameter name="documentno" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND UPPER(m.DocumentNo) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="description" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND UPPER(m.Description) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="orderReference" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND UPPER(m.POReference) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="documentno" ignoreValue="%" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND UPPER(m.DocumentNo) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="description" ignoreValue="%" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND UPPER(m.Description) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="orderReference" ignoreValue="%" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND UPPER(m.POReference) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="businesPartner" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND m.C_BPartner_ID=? ]]></Parameter>
         <Parameter name="dateFrom" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND m.MovementDate >= to_date(?) ]]></Parameter>
         <Parameter name="dateTo" optional="true" after="AND m.IsActive='Y'"><![CDATA[ AND m.MovementDate < to_date(?) ]]></Parameter>
--- a/src/org/openbravo/erpCommon/info/ShipmentReceipt_data.xsql	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/info/ShipmentReceipt_data.xsql	Fri Jun 19 09:42:30 2009 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2008 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -46,10 +46,10 @@
         <Parameter name="rownum" type="replace" optional="true" after="FROM ( SELECT " text="'0'" />
         <Parameter name="adUserClient" type="replace" optional="true" after="MI.AD_Client_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="MI.AD_Org_ID IN (" text="'1'"/>
-        <Parameter name="key" optional="true" after="AND MI.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(MI.DOCUMENTNO) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="description" optional="true" after="AND MI.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(MI.DESCRIPTION) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="key" ignoreValue="%" optional="true" after="AND MI.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(MI.DOCUMENTNO) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="description" ignoreValue="%" optional="true" after="AND MI.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(MI.DESCRIPTION) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="businesPartner" optional="true" after="AND MI.ISACTIVE = 'Y'"><![CDATA[ AND MI.C_BPARTNER_ID=? ]]></Parameter>
-        <Parameter name="orderReference" optional="true" after="AND MI.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(MI.POREFERENCE) LIKE UPPER(?) ]]></Parameter>
+        <Parameter name="orderReference" ignoreValue="%" optional="true" after="AND MI.ISACTIVE = 'Y'"><![CDATA[ AND UPPER(MI.POREFERENCE) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="dateFrom" optional="true" after="AND MI.ISACTIVE = 'Y'"><![CDATA[ AND MI.MOVEMENTDATE >= to_date(?) ]]></Parameter>
         <Parameter name="dateTo" optional="true" after="AND MI.ISACTIVE = 'Y'"><![CDATA[ AND MI.MOVEMENTDATE < to_date(?) ]]></Parameter>
         <Parameter name="salesTransaction" optional="true" after="AND MI.ISACTIVE = 'Y'"><![CDATA[ AND MI.ISSOTRX=? ]]></Parameter>
--- a/src/org/openbravo/erpCommon/utility/ErrorTextParserORACLE.java	Fri Jun 19 09:41:25 2009 +0200
+++ b/src/org/openbravo/erpCommon/utility/ErrorTextParserORACLE.java	Fri Jun 19 09:42:30 2009 +0200
@@ -21,6 +21,21 @@
 import org.apache.log4j.Logger;
 import org.openbravo.data.FieldProvider;
 
+//examples for the types of postgres messages to be parsed by this class
+
+// example for unique constraint
+// ORA-00001: unique constraint (TADPI.AD_USER_UN_USERNAME) violated
+
+// example for raise_application_error(-20000), from inside a trigger
+// ORA-20000: @HCMC_OneDefaultRecord@
+// ORA-06512: at "TADPI.HCMC_DEFAULT_TRG", line 35
+// ORA-04088: error during execution of trigger 'TADPI.HCMC_DEFAULT_TRG'
+
+// example for oracle raised error from inside/about a trigger
+// ORA-04091: table TADPI.AD_MODULE is mutating, trigger/function may not see it
+// ORA-06512: at "TADPI.AD_MODULE_DEPENDENCY_MOD_TRG", line 30
+// ORA-04088: error during execution of trigger 'TADPI.AD_MODULE_DEPENDENCY_MOD_TRG'
+
 /**
  * @author Fernando Iriazabal
  * 
@@ -47,6 +62,7 @@
     String myMessage = getMessage();
     if (log4j.isDebugEnabled())
       log4j.debug("Message: " + myMessage);
+
     // BEGIN Checking if it's a DB error
     int pos = myMessage.indexOf("ORA-");
     if (pos != -1) {
@@ -72,8 +88,16 @@
         } else if (errorCode >= 20000 && errorCode <= 30000) {
           myError = new OBError();
           myError.setType("Error");
+
+          String toTranslate = myMessage.replace(errorCodeText + ": ", "");
+          // assumption incoming error message useful part is completely contained in the first line
+          pos = toTranslate.indexOf("\n");
+          if (pos != -1) {
+            toTranslate = toTranslate.substring(0, pos);
+          }
+
           String messageAux = Utility.parseTranslation(getConnection(), getVars(), getLanguage(),
-              myMessage.replace(errorCodeText + ": ", ""));
+              toTranslate);
           if (log4j.isDebugEnabled())
             log4j.debug("Message parsed: " + messageAux);
           myError.setMessage(messageAux);