details:   https://code.openbravo.com/erp/devel/pi/rev/c5c36112a9b5
changeset: 13290:c5c36112a9b5
user:      Jon Alegría <jon.alegria <at> openbravo.com>
date:      Tue Jul 26 20:13:02 2011 +0200
summary:   Fixes issue 0016895: Selector for "Outsourced" operations in "Work 
Effort"
does not allow selecting a "Purchase Invoice" line
Added filter by issotrx

diffstat:

 src/org/openbravo/erpCommon/info/InvoiceLine.java      |  22 ++++++++++-------
 src/org/openbravo/erpCommon/info/InvoiceLine_data.xsql |   9 ++++--
 2 files changed, 19 insertions(+), 12 deletions(-)

diffs (147 lines):

diff -r 5ca30ea10898 -r c5c36112a9b5 
src/org/openbravo/erpCommon/info/InvoiceLine.java
--- a/src/org/openbravo/erpCommon/info/InvoiceLine.java Tue Jul 26 18:17:55 
2011 +0200
+++ b/src/org/openbravo/erpCommon/info/InvoiceLine.java Tue Jul 26 20:13:02 
2011 +0200
@@ -106,8 +106,9 @@
       String strDateTo = vars.getGlobalVariable("inpDateTo", 
"InvoiceLine.dateto", "");
       String strCal1 = vars.getNumericGlobalVariable("inpCal1", 
"InvoiceLine.grandtotalfrom", "");
       String strCal2 = vars.getNumericGlobalVariable("inpCal2", 
"InvoiceLine.grandtotalto", "");
+      String issotrx = vars.getStringParameter("inpIssotrx", "N");
       printPage(response, vars, strBPartner, strProduct, strDocumentNo, 
strDateFrom, strDateTo,
-          strCal1, strCal2);
+          strCal1, strCal2, issotrx);
     } else if (vars.commandIn("KEY")) {
       String strKeyValue = vars.getRequestGlobalVariable("inpNameValue", 
"InvoiceLine.key");
       vars.getRequestGlobalVariable("WindowID", "InvoiceLine.windowId");
@@ -115,9 +116,11 @@
       vars.setSessionValue("InvoiceLine.documentno", strKeyValue + "%");
       InvoiceLineData[] data = null;
       String strOrg = vars.getStringParameter("inpAD_Org_ID");
+      String issotrx = vars.getStringParameter("inpIssotrx", "N");
       data = InvoiceLineData.selectKey(this,
           Utility.getContext(this, vars, "#User_Client", "InvoiceLine"),
-          Utility.getSelectorOrgs(this, vars, strOrg), strKeyValue + "%");
+          Utility.getSelectorOrgs(this, vars, strOrg), strKeyValue + "%",
+         issotrx);
 
       if (data != null && data.length == 1)
         printPageKey(response, vars, data);
@@ -131,7 +134,7 @@
         String strCal1 = vars.getNumericGlobalVariable("inpCal1", 
"InvoiceLine.grandtotalfrom", "");
         String strCal2 = vars.getNumericGlobalVariable("inpCal2", 
"InvoiceLine.grandtotalto", "");
         printPage(response, vars, strBPartner, strProduct, strDocumentNo, 
strDateFrom, strDateTo,
-            strCal1, strCal2);
+            strCal1, strCal2, issotrx);
       }
     } else if (vars.commandIn("STRUCTURE")) {
       printGridStructure(response, vars);
@@ -157,10 +160,11 @@
       String strPageSize = vars.getStringParameter("page_size");
       String strSortCols = vars.getInStringParameter("sort_cols", 
columnFilter);
       String strSortDirs = vars.getInStringParameter("sort_dirs", 
directionFilter);
+      String issotrx = vars.getStringParameter("inpIssotrx", "N");
 
       printGridData(response, vars, strDocumentNo, strBpartnerId, strDateFrom, 
strDateTo,
           strDescription, strCal1, strCal2, strOrder, strProduct, strSortCols, 
strSortDirs,
-          strOffset, strPageSize, strNewFilter, strOrg);
+          strOffset, strPageSize, strNewFilter, strOrg, issotrx);
 
     } else
       pageError(response);
@@ -194,7 +198,7 @@
 
   private void printPage(HttpServletResponse response, VariablesSecureApp 
vars, String strBPartner,
       String strProduct, String strDocumentNo, String strDateFrom, String 
strDateTo,
-      String strCal1, String strCal2) throws IOException, ServletException {
+      String strCal1, String strCal2, String issotrx) throws IOException, 
ServletException {
     if (log4j.isDebugEnabled())
       log4j.debug("Output: Frame 1 of sale-order-lines seeker");
     XmlDocument xmlDocument = 
xmlEngine.readXmlTemplate("org/openbravo/erpCommon/info/InvoiceLine")
@@ -282,7 +286,7 @@
       String strDocumentNo, String strBpartnerId, String strDateFrom, String 
strDateTo,
       String strDescription, String strCal1, String strCal2, String strOrder, 
String strProduct,
       String strOrderCols, String strOrderDirs, String strOffset, String 
strPageSize,
-      String strNewFilter, String strOrg) throws IOException, ServletException 
{
+      String strNewFilter, String strOrg, String issotrx) throws IOException, 
ServletException {
     if (log4j.isDebugEnabled())
       log4j.debug("Output: print page rows");
     int page = 0;
@@ -327,7 +331,7 @@
               Utility.getContext(this, vars, "#User_Client", "InvoiceLine"),
               Utility.getSelectorOrgs(this, vars, strOrg), strDocumentNo, 
strDescription, strOrder,
               strBpartnerId, strDateFrom, DateTimeData.nDaysAfter(this, 
strDateTo, "1"), strCal1,
-              strCal2, strProduct, pgLimit, oraLimit1, oraLimit2);
+              strCal2, strProduct, issotrx, pgLimit, oraLimit1, oraLimit2);
           vars.setSessionValue("BusinessPartnerInfo.numrows", strNumRows);
         } else {
           strNumRows = vars.getSessionValue("BusinessPartnerInfo.numrows");
@@ -339,14 +343,14 @@
               Utility.getContext(this, vars, "#User_Client", "InvoiceLine"),
               Utility.getSelectorOrgs(this, vars, strOrg), strDocumentNo, 
strDescription, strOrder,
               strBpartnerId, strDateFrom, DateTimeData.nDaysAfter(this, 
strDateTo, "1"), strCal1,
-              strCal2, strProduct, strOrderBy, oraLimit, "");
+              strCal2, strProduct, issotrx, strOrderBy, oraLimit, "");
         } else {
           String pgLimit = pageSize + " OFFSET " + offset;
           data = InvoiceLineData.select(this, "1",
               Utility.getContext(this, vars, "#User_Client", "InvoiceLine"),
               Utility.getSelectorOrgs(this, vars, strOrg), strDocumentNo, 
strDescription, strOrder,
               strBpartnerId, strDateFrom, DateTimeData.nDaysAfter(this, 
strDateTo, "1"), strCal1,
-              strCal2, strProduct, strOrderBy, "", pgLimit);
+              strCal2, strProduct, issotrx, strOrderBy, "", pgLimit);
         }
       } catch (ServletException e) {
         log4j.error("Error in print page data: " + e);
diff -r 5ca30ea10898 -r c5c36112a9b5 
src/org/openbravo/erpCommon/info/InvoiceLine_data.xsql
--- a/src/org/openbravo/erpCommon/info/InvoiceLine_data.xsql    Tue Jul 26 
18:17:55 2011 +0200
+++ b/src/org/openbravo/erpCommon/info/InvoiceLine_data.xsql    Tue Jul 26 
20:13:02 2011 +0200
@@ -43,7 +43,7 @@
                  AND I.AD_CLIENT_ID IN ('1') 
                  AND I.AD_ORG_ID IN ('1') 
                  AND I.IsActive='Y' 
-                 AND I.ISSOTRX = 'Y'
+                 AND I.ISSOTRX = ?
                  ORDER BY b.NAME
                ) A ) B
         WHERE 1=1
@@ -62,6 +62,7 @@
         <Parameter name="grandTotalFrom" optional="true" after="AND 
I.IsActive='Y'"><![CDATA[  AND IL.PRICEACTUAL*IL.QTYINVOICED >= TO_NUMBER(?) 
]]></Parameter>
         <Parameter name="grandTotalTo" optional="true" after="AND 
I.IsActive='Y'"><![CDATA[  AND IL.PRICEACTUAL*IL.QTYINVOICED <= TO_NUMBER(?) 
]]></Parameter>
         <Parameter name="product" optional="true" after="AND 
I.IsActive='Y'"><![CDATA[ AND IL.M_Product_ID=? ]]></Parameter>
+       <Parameter name="issotrx"/>
         <Parameter name="orderBy" type="replace" optional="true" after="ORDER 
BY " text="b.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>
@@ -84,7 +85,7 @@
                  AND I.AD_CLIENT_ID IN ('1') 
                  AND I.AD_ORG_ID IN ('1') 
                  AND I.IsActive='Y' 
-                 AND I.ISSOTRX = 'Y'
+                 AND I.ISSOTRX = ?
                  AND 1=1
                  ) B
                  ) A 
@@ -103,6 +104,7 @@
         <Parameter name="grandTotalFrom" optional="true" after="AND 
I.IsActive='Y'"><![CDATA[  AND IL.PRICEACTUAL*IL.QTYINVOICED >= TO_NUMBER(?) 
]]></Parameter>
         <Parameter name="grandTotalTo" optional="true" after="AND 
I.IsActive='Y'"><![CDATA[  AND IL.PRICEACTUAL*IL.QTYINVOICED <= TO_NUMBER(?) 
]]></Parameter>
         <Parameter name="product" optional="true" after="AND 
I.IsActive='Y'"><![CDATA[ AND IL.M_Product_ID = ? ]]></Parameter>
+       <Parameter name="issotrx"/>
         <Parameter name="pgLimit" type="argument" optional="true" after="AND 
1=1"><![CDATA[LIMIT ]]></Parameter>
         <Parameter name="oraLimit1" type="argument" optional="true" after=") 
B"><![CDATA[ WHERE ROWNUM <= ]]></Parameter>
         <Parameter name="oraLimit2" type="argument" optional="true" after=") A 
"><![CDATA[WHERE RN1 BETWEEN ]]></Parameter>
@@ -162,7 +164,7 @@
         AND IL.M_PRODUCT_ID = p.M_PRODUCT_ID
         AND I.AD_CLIENT_ID IN ('1') 
         AND I.AD_ORG_ID IN ('1') 
-        AND I.IsActive='Y' 
+        AND I.IsActive=?
         AND UPPER(I.DOCUMENTNO) LIKE UPPER(?) 
        /* AND (IL.QTYORDERED - COALESCE(IL.QTYINVOICED, 0)) > 0 
         AND (IL.QTYORDERED - COALESCE(IL.QTYDELIVERED, 0)) > 0 */
@@ -173,6 +175,7 @@
         <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"/>
+       <Parameter name="issotrx"/>
    </SqlMethod>
    <!--SqlMethod name="selectKeySOTrx" type="preparedStatement" 
return="multiple">
       <SqlMethodComment></SqlMethodComment>

------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to