details:   /erp/stable/2.50/rev/646cb1ee1724
changeset: 9221:646cb1ee1724
user:      Adrián Romero <adrianromero <at> openbravo.com>
date:      Thu Feb 17 17:52:32 2011 +0100
summary:   Fixes issue 015682: Inhomogeneous behavior when searching in Copy 
From Settlement
It has been fixed the behavior of searching by % to make it behave the same way 
as other search windows and selectors

diffstat:

 src/org/openbravo/erpCommon/ad_actionButton/CopyFromSettlement.java |  20 
++++++++--
 1 files changed, 16 insertions(+), 4 deletions(-)

diffs (44 lines):

diff -r 98d3b02cdc49 -r 646cb1ee1724 
src/org/openbravo/erpCommon/ad_actionButton/CopyFromSettlement.java
--- a/src/org/openbravo/erpCommon/ad_actionButton/CopyFromSettlement.java       
Thu Feb 17 17:46:38 2011 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CopyFromSettlement.java       
Thu Feb 17 17:52:32 2011 +0100
@@ -233,8 +233,14 @@
       log4j.debug("Output: Button process Copy from Settlement");
 
     String[] discard = { "", "" };
-    CopyFromSettlementData[] data = 
CopyFromSettlementData.selectRelation(this, "%"
-        + strSetDescription + "%", "%" + strDocumentNo + "%", 
Utility.getContext(this, vars,
+
+    String myStrDocumentNo = (strDocumentNo == null || strDocumentNo
+        .equals("")) ? "%" : strDocumentNo;
+    String myStrSetDescription = (strSetDescription == null || 
strSetDescription
+        .equals("")) ? "%" : strSetDescription;
+
+    CopyFromSettlementData[] data = CopyFromSettlementData.selectRelation(this,
+        myStrSetDescription, myStrDocumentNo, Utility.getContext(this, vars,
         "#User_Org", strWindow), Utility.getContext(this, vars, 
"#User_Client", strWindow),
         strDateFrom, strDateTo);
 
@@ -277,8 +283,13 @@
 
     String[] discard = { "", "" };
 
-    CopyFromSettlementData[] data = 
CopyFromSettlementData.selectRelation(this, "%"
-        + strDescription + "%", "%" + strDocumentNo + "%", 
Utility.getContext(this, vars,
+    String myStrDocumentNo = (strDocumentNo == null || strDocumentNo
+        .equals("")) ? "%" : strDocumentNo;
+    String myStrDescription = (strDescription == null || strDescription
+        .equals("")) ? "%" : strDescription;
+
+    CopyFromSettlementData[] data = CopyFromSettlementData.selectRelation(this,
+         myStrDescription, myStrDocumentNo, Utility.getContext(this, vars,
         "#User_Org", strWindow), Utility.getContext(this, vars, 
"#User_Client", strWindow),
         strDateFrom, strDateTo);
 
@@ -308,6 +319,7 @@
     xmlDocument.setParameter("paramSettlementId", strSettlement);
     xmlDocument.setParameter("paramSettlementFromId", strSettlementFrom);
     xmlDocument.setParameter("documentNo", strDocumentNo);
+    xmlDocument.setParameter("description", strDescription);
     xmlDocument.setData("structure", data);
     xmlDocument.setData("structure2", data2);
     response.setContentType("text/html; charset=UTF-8");

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to