details:   /erp/stable/2.50/rev/01758c85c876
changeset: 9133:01758c85c876
user:      David Alsasua <david.alsasua <at> openbravo.com>
date:      Fri Jan 14 16:21:50 2011 +0100
summary:   Code Formatted CreateFrom servlet

details:   /erp/stable/2.50/rev/254fdfcf4cf1
changeset: 9134:254fdfcf4cf1
user:      David Alsasua <david.alsasua <at> openbravo.com>
date:      Fri Jan 14 18:21:34 2011 +0100
summary:   Fixes issue 15662: The date mask is not applied in Bank Create lines 
from
Java, Html, Xsql and Xml files of the servlet where modified so:
1- Now, each row adds, when painted, the date format mask
2- The Html file, in the date field of the grid, calls correctly to the 
autoCompleteDate function

diffstat:

 src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java           |  434 
+++++----
 src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Bank.html      |    2 +-
 src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Bank.xml       |    5 +-
 src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Bank_data.xsql |    3 +-
 4 files changed, 238 insertions(+), 206 deletions(-)

diffs (truncated from 764 to 300 lines):

diff -r fe388334c287 -r 254fdfcf4cf1 
src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java       Fri Jan 
14 08:29:57 2011 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java       Fri Jan 
14 18:21:34 2011 +0100
@@ -150,8 +150,8 @@
       final String strKey = vars.getRequiredStringParameter("inpKey");
       final String strTableId = vars.getStringParameter("inpTableId");
       final String strProcessId = vars.getStringParameter("inpProcessId");
-      final String strPath = vars.getStringParameter("inpPath", strDireccion
-          + request.getServletPath());
+      final String strPath = vars.getStringParameter("inpPath",
+          strDireccion + request.getServletPath());
       final String strWindowId = vars.getStringParameter("inpWindowId");
       final String strTabName = vars.getStringParameter("inpTabName");
       final String strDateInvoiced = 
vars.getStringParameter("inpDateInvoiced");
@@ -307,9 +307,9 @@
     final XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
         
"org/openbravo/erpCommon/ad_actionButton/CreateFrom_Bank").createXmlDocument();
 
-    final int numRows = Integer.valueOf(CreateFromBankData.countRows(this, 
Utility.getContext(this,
-        vars, "#User_Client", strWindowId), Utility
-        .getContext(this, vars, "#User_Org", strWindowId), strcBPartner, 
strPaymentRule,
+    final int numRows = Integer.valueOf(CreateFromBankData.countRows(this,
+        Utility.getContext(this, vars, "#User_Client", strWindowId),
+        Utility.getContext(this, vars, "#User_Org", strWindowId), 
strcBPartner, strPaymentRule,
         strPlannedDateFrom, strPlannedDateTo, strAmountFrom, strAmountTo, 
strIsReceipt, strBank,
         strOrg, strCharge, strDocumentNo, strStatus));
     final int maxRows = 
Integer.valueOf(vars.getSessionValue("#RECORDRANGEINFO"));
@@ -327,17 +327,19 @@
 
     // different limit/offset syntax in oracle and postgresql
     if (this.myPool.getRDBMS().equalsIgnoreCase("ORACLE")) {
-      data = CreateFromBankData.select(this, vars.getLanguage(), 
strStatementDate, "ROWNUM",
-          Utility.getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this,
-              vars, "#User_Org", strWindowId), strcBPartner, strPaymentRule, 
strPlannedDateFrom,
-          strPlannedDateTo, strAmountFrom, strAmountTo, strIsReceipt, strBank, 
strOrg, strCharge,
-          strDocumentNo, strStatus, String.valueOf(maxRows), null);
+      data = CreateFromBankData.select(this, 
vars.getSessionValue("#AD_SqlDateFormat"),
+          vars.getLanguage(), strStatementDate, "ROWNUM",
+          Utility.getContext(this, vars, "#User_Client", strWindowId),
+          Utility.getContext(this, vars, "#User_Org", strWindowId), 
strcBPartner, strPaymentRule,
+          strPlannedDateFrom, strPlannedDateTo, strAmountFrom, strAmountTo, 
strIsReceipt, strBank,
+          strOrg, strCharge, strDocumentNo, strStatus, 
String.valueOf(maxRows), null);
     } else {
-      data = CreateFromBankData.select(this, vars.getLanguage(), 
strStatementDate, "1", Utility
-          .getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this, vars,
-          "#User_Org", strWindowId), strcBPartner, strPaymentRule, 
strPlannedDateFrom,
-          strPlannedDateTo, strAmountFrom, strAmountTo, strIsReceipt, strBank, 
strOrg, strCharge,
-          strDocumentNo, strStatus, null, String.valueOf(maxRows));
+      data = CreateFromBankData.select(this, 
vars.getSessionValue("#AD_SqlDateFormat"),
+          vars.getLanguage(), strStatementDate, "1",
+          Utility.getContext(this, vars, "#User_Client", strWindowId),
+          Utility.getContext(this, vars, "#User_Org", strWindowId), 
strcBPartner, strPaymentRule,
+          strPlannedDateFrom, strPlannedDateTo, strAmountFrom, strAmountTo, 
strIsReceipt, strBank,
+          strOrg, strCharge, strDocumentNo, strStatus, null, 
String.valueOf(maxRows));
     }
 
     xmlDocument.setParameter("calendar", vars.getLanguage().substring(0, 2));
@@ -363,9 +365,9 @@
 
     try {
       ComboTableData comboTableData = new ComboTableData(vars, this, "LIST", 
"",
-          "All_Payment Rule", "", Utility
-              .getContext(this, vars, "#AccessibleOrgTree", "CreateFrom"), 
Utility.getContext(this,
-              vars, "#User_Client", "CreateFrom"), 0);
+          "All_Payment Rule", "",
+          Utility.getContext(this, vars, "#AccessibleOrgTree", "CreateFrom"), 
Utility.getContext(
+              this, vars, "#User_Client", "CreateFrom"), 0);
       Utility.fillSQLParameters(this, vars, null, comboTableData, 
"CreateFrom", strPaymentRule);
       xmlDocument.setData("reportPaymentRule", "liststructure", 
comboTableData.select(false));
       comboTableData = null;
@@ -376,13 +378,13 @@
 
     xmlDocument.setParameter("cbpartnerId_DES", 
CreateFromBankData.bpartner(this, strcBPartner));
     xmlDocument.setParameter("plannedDateFrom", strPlannedDateFrom);
-    xmlDocument.setParameter("plannedDateFromdisplayFormat", vars
-        .getSessionValue("#AD_SqlDateFormat"));
+    xmlDocument.setParameter("plannedDateFromdisplayFormat",
+        vars.getSessionValue("#AD_SqlDateFormat"));
     xmlDocument
         .setParameter("plannedDateFromsaveFormat", 
vars.getSessionValue("#AD_SqlDateFormat"));
     xmlDocument.setParameter("plannedDateTo", strPlannedDateTo);
-    xmlDocument.setParameter("plannedDateTodisplayFormat", vars
-        .getSessionValue("#AD_SqlDateFormat"));
+    xmlDocument.setParameter("plannedDateTodisplayFormat",
+        vars.getSessionValue("#AD_SqlDateFormat"));
     xmlDocument.setParameter("plannedDateTosaveFormat", 
vars.getSessionValue("#AD_SqlDateFormat"));
     xmlDocument.setParameter("amountFrom", strAmountFrom);
     {
@@ -413,8 +415,8 @@
 
     try {
       ComboTableData comboTableData = new ComboTableData(vars, this, 
"TABLEDIR", "AD_Org_ID", "",
-          "", Utility.getContext(this, vars, "#AccessibleOrgTree", 
strWindowId), Utility
-              .getContext(this, vars, "#User_Client", strWindowId), 0);
+          "", Utility.getContext(this, vars, "#AccessibleOrgTree", 
strWindowId),
+          Utility.getContext(this, vars, "#User_Client", strWindowId), 0);
       Utility.fillSQLParameters(this, vars, null, comboTableData, strWindowId, 
strOrg);
       xmlDocument.setData("reportAD_Org_ID", "liststructure", 
comboTableData.select(false));
       comboTableData = null;
@@ -468,42 +470,42 @@
       if (strShipment.equals("")) {
         if (vars.getLanguage().equals("en_US")) {
           if (isSOTrx.equals("Y"))
-            data = CreateFromInvoiceData.selectFromPOSOTrx(this, 
vars.getLanguage(), Utility
-                .getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this,
-                vars, "#User_Org", strWindowId), strPO);
+            data = CreateFromInvoiceData.selectFromPOSOTrx(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strPO);
           else
-            data = CreateFromInvoiceData.selectFromPO(this, 
vars.getLanguage(), Utility.getContext(
-                this, vars, "#User_Client", strWindowId), 
Utility.getContext(this, vars,
-                "#User_Org", strWindowId), strPO);
+            data = CreateFromInvoiceData.selectFromPO(this, vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strPO);
         } else {
           if (isSOTrx.equals("Y"))
-            data = CreateFromInvoiceData.selectFromPOTrlSOTrx(this, 
vars.getLanguage(), Utility
-                .getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this,
-                vars, "#User_Org", strWindowId), strPO);
+            data = CreateFromInvoiceData.selectFromPOTrlSOTrx(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strPO);
           else
-            data = CreateFromInvoiceData.selectFromPOTrl(this, 
vars.getLanguage(), Utility
-                .getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this,
-                vars, "#User_Org", strWindowId), strPO);
+            data = CreateFromInvoiceData.selectFromPOTrl(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strPO);
         }
       } else {
         if (vars.getLanguage().equals("en_US")) {
           if (isSOTrx.equals("Y"))
-            data = CreateFromInvoiceData.selectFromShipmentSOTrx(this, 
vars.getLanguage(), Utility
-                .getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this,
-                vars, "#User_Org", strWindowId), strShipment);
+            data = CreateFromInvoiceData.selectFromShipmentSOTrx(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strShipment);
           else
-            data = CreateFromInvoiceData.selectFromShipment(this, 
vars.getLanguage(), Utility
-                .getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this,
-                vars, "#User_Org", strWindowId), strShipment);
+            data = CreateFromInvoiceData.selectFromShipment(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strShipment);
         } else {
           if (isSOTrx.equals("Y"))
             data = CreateFromInvoiceData.selectFromShipmentTrlSOTrx(this, 
vars.getLanguage(),
-                Utility.getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(
-                    this, vars, "#User_Org", strWindowId), strShipment);
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strShipment);
           else
-            data = CreateFromInvoiceData.selectFromShipmentTrl(this, 
vars.getLanguage(), Utility
-                .getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this,
-                vars, "#User_Org", strWindowId), strShipment);
+            data = CreateFromInvoiceData.selectFromShipmentTrl(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strShipment);
         }
       }
     }
@@ -519,8 +521,8 @@
     xmlDocument.setParameter("bpartnerLocation", strBPartnerLocation);
     xmlDocument.setParameter("pricelist", strPriceList);
     xmlDocument.setParameter("cBpartnerId", strBPartner);
-    xmlDocument.setParameter("BPartnerDescription", 
CreateFromShipmentData.selectBPartner(this,
-        strBPartner));
+    xmlDocument.setParameter("BPartnerDescription",
+        CreateFromShipmentData.selectBPartner(this, strBPartner));
     xmlDocument.setParameter("PurchaseOrder", strPO);
     xmlDocument.setParameter("Shipment", strShipment);
     xmlDocument.setParameter("pType", (!strShipment.equals("") ? "SHIPMENT"
@@ -533,23 +535,31 @@
       xmlDocument.setData("reportPurchaseOrder", "liststructure", new 
CreateFromInvoiceData[0]);
     } else {
       if (isSOTrx.equals("Y")) {
-        xmlDocument.setData("reportShipmentReciept", "liststructure", 
CreateFromInvoiceData
-            .selectFromShipmentSOTrxCombo(this, vars.getLanguage(), 
Utility.getContext(this, vars,
-                "#User_Client", strWindowId), Utility.getContext(this, vars, 
"#User_Org",
-                strWindowId), strBPartner));
-        xmlDocument.setData("reportPurchaseOrder", "liststructure", 
CreateFromInvoiceData
-            .selectFromPOSOTrxCombo(this, vars.getLanguage(), 
Utility.getContext(this, vars,
-                "#User_Client", strWindowId), Utility.getContext(this, vars, 
"#User_Org",
-                strWindowId), strBPartner));
+        xmlDocument.setData(
+            "reportShipmentReciept",
+            "liststructure",
+            CreateFromInvoiceData.selectFromShipmentSOTrxCombo(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strBPartner));
+        xmlDocument.setData(
+            "reportPurchaseOrder",
+            "liststructure",
+            CreateFromInvoiceData.selectFromPOSOTrxCombo(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strBPartner));
       } else {
-        xmlDocument.setData("reportShipmentReciept", "liststructure", 
CreateFromInvoiceData
-            .selectFromShipmentCombo(this, vars.getLanguage(), 
Utility.getContext(this, vars,
-                "#User_Client", strWindowId), Utility.getContext(this, vars, 
"#User_Org",
-                strWindowId), strBPartner));
-        xmlDocument.setData("reportPurchaseOrder", "liststructure", 
CreateFromInvoiceData
-            .selectFromPOCombo(this, vars.getLanguage(), 
Utility.getContext(this, vars,
-                "#User_Client", strWindowId), Utility.getContext(this, vars, 
"#User_Org",
-                strWindowId), strBPartner));
+        xmlDocument.setData(
+            "reportShipmentReciept",
+            "liststructure",
+            CreateFromInvoiceData.selectFromShipmentCombo(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strBPartner));
+        xmlDocument.setData(
+            "reportPurchaseOrder",
+            "liststructure",
+            CreateFromInvoiceData.selectFromPOCombo(this, vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strBPartner));
       }
     }
     {
@@ -605,43 +615,43 @@
       if (strInvoice.equals("")) {
         if (vars.getLanguage().equals("en_US")) {
           if (isSOTrx.equals("Y")) {
-            data = CreateFromShipmentData.selectFromPOSOTrx(this, 
vars.getLanguage(), Utility
-                .getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this,
-                vars, "#User_Org", strWindowId), strPO);
+            data = CreateFromShipmentData.selectFromPOSOTrx(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strPO);
           } else {
-            data = CreateFromShipmentData.selectFromPO(this, 
vars.getLanguage(), Utility
-                .getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this,
-                vars, "#User_Org", strWindowId), strPO);
+            data = CreateFromShipmentData.selectFromPO(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strPO);
           }
         } else {
           if (isSOTrx.equals("Y"))
-            data = CreateFromShipmentData.selectFromPOTrlSOTrx(this, 
vars.getLanguage(), Utility
-                .getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this,
-                vars, "#User_Org", strWindowId), strPO);
+            data = CreateFromShipmentData.selectFromPOTrlSOTrx(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strPO);
           else
-            data = CreateFromShipmentData.selectFromPOTrl(this, 
vars.getLanguage(), Utility
-                .getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this,
-                vars, "#User_Org", strWindowId), strPO);
+            data = CreateFromShipmentData.selectFromPOTrl(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strPO);
         }
       } else {
         if (vars.getLanguage().equals("en_US")) {
           if (isSOTrx.equals("Y"))
-            data = CreateFromShipmentData.selectFromInvoiceTrx(this, 
vars.getLanguage(), Utility
-                .getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this,
-                vars, "#User_Org", strWindowId), strInvoice);
+            data = CreateFromShipmentData.selectFromInvoiceTrx(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strInvoice);
           else
-            data = CreateFromShipmentData.selectFromInvoice(this, 
vars.getLanguage(), Utility
-                .getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this,
-                vars, "#User_Org", strWindowId), strInvoice);
+            data = CreateFromShipmentData.selectFromInvoice(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strInvoice);
         } else {
           if (isSOTrx.equals("Y"))
-            data = CreateFromShipmentData.selectFromInvoiceTrx(this, 
vars.getLanguage(), Utility
-                .getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this,
-                vars, "#User_Org", strWindowId), strInvoice);
+            data = CreateFromShipmentData.selectFromInvoiceTrx(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strInvoice);
           else
-            data = CreateFromShipmentData.selectFromInvoiceTrl(this, 
vars.getLanguage(), Utility
-                .getContext(this, vars, "#User_Client", strWindowId), 
Utility.getContext(this,
-                vars, "#User_Org", strWindowId), strInvoice);
+            data = CreateFromShipmentData.selectFromInvoiceTrl(this, 
vars.getLanguage(),
+                Utility.getContext(this, vars, "#User_Client", strWindowId),
+                Utility.getContext(this, vars, "#User_Org", strWindowId), 
strInvoice);
         }
       }
     }
@@ -654,12 +664,12 @@
     xmlDocument.setParameter("tableId", strTableId);
     xmlDocument.setParameter("processId", strProcessId);
     xmlDocument.setParameter("cBpartnerId", strBPartner);
-    xmlDocument.setParameter("BPartnerDescription", 
CreateFromShipmentData.selectBPartner(this,
-        strBPartner));
+    xmlDocument.setParameter("BPartnerDescription",
+        CreateFromShipmentData.selectBPartner(this, strBPartner));

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to