details:   https://code.openbravo.com/erp/devel/pi/rev/3d0a5d2000e4
changeset: 31069:3d0a5d2000e4
user:      Mark <markmm82 <at> gmail.com>
date:      Fri Jan 06 16:40:10 2017 -0500
summary:   Related to issue 34806: Updated copyright

details:   https://code.openbravo.com/erp/devel/pi/rev/b7eb116a1922
changeset: 31070:b7eb116a1922
user:      Mark <markmm82 <at> gmail.com>
date:      Mon Jan 09 14:36:47 2017 -0500
summary:   Related to issue 34620: Backed out changeset 6edf67f27c25

diffstat:

 src/org/openbravo/erpCommon/ad_reports/ReportInvoicesJR.java               |  
385 +++---
 src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderInvoicedJasper.java |  
550 +++++-----
 src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvidedJR.java     |  
550 +++++-----
 src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl.java         |   
28 +-
 src/org/openbravo/erpCommon/ad_reports/ReportWarehouseControl_data.xsql    |   
47 +-
 5 files changed, 746 insertions(+), 814 deletions(-)

diffs (truncated from 1695 to 300 lines):

diff -r 8f8221fada5b -r b7eb116a1922 
src/org/openbravo/erpCommon/ad_reports/ReportInvoicesJR.java
--- a/src/org/openbravo/erpCommon/ad_reports/ReportInvoicesJR.java      Mon Jan 
09 13:29:01 2017 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportInvoicesJR.java      Mon Jan 
09 14:36:47 2017 -0500
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2016 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2017 Openbravo SLU 
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -39,212 +39,211 @@
 import org.openbravo.xmlEngine.XmlDocument;
 
 public class ReportInvoicesJR extends HttpSecureAppServlet {
-  private static final long serialVersionUID = 1L;
+       private static final long serialVersionUID = 1L;
 
-  public void doPost(HttpServletRequest request, HttpServletResponse response)
-      throws IOException, ServletException {
-    VariablesSecureApp vars = new VariablesSecureApp(request);
+       public void doPost(HttpServletRequest request, HttpServletResponse 
response) throws IOException,
+           ServletException {
+               VariablesSecureApp vars = new VariablesSecureApp(request);
 
-    // Get user Client's base currency
-    String strUserCurrencyId = Utility.stringBaseCurrencyId(this, 
vars.getClient());
-    if (vars.commandIn("DEFAULT")) {
-      String strC_BPartner_ID = vars.getGlobalVariable("inpcBPartnerId",
-          "ReportInvoices|C_BPartner_ID", "");
-      String strM_Product_ID = vars.getGlobalVariable("inpmProductId",
-          "ReportInvoices|M_Product_ID", "");
-      String strDateFrom = vars.getGlobalVariable("inpDateInvoiceFrom", 
"ReportInvoices|DateFrom",
-          "");
-      String strDateTo = vars.getGlobalVariable("inpDateInvoiceTo", 
"ReportInvoices|DateTo", "");
-      String strDocumentNo = vars.getGlobalVariable("inpInvoicedocumentno",
-          "ReportInvoices|DocumentNo", "");
-      String strOrder = vars.getGlobalVariable("inpOrder", 
"ReportInvoices|Order", "SalesOrder");
-      String strC_BpGroup_ID = vars.getGlobalVariable("inpcBpGroupId",
-          "ReportInvoices|C_BpGroup_ID", "");
-      String strM_Product_Category_ID = 
vars.getGlobalVariable("inpmProductCategoryId",
-          "ReportInvoices|M_Product_Category_ID", "");
-      String strCurrencyId = vars.getGlobalVariable("inpCurrencyId", 
"ReportInvoices|currency",
-          strUserCurrencyId);
-      printPageDataSheet(response, vars, strC_BPartner_ID, strM_Product_ID, 
strDateFrom, strDateTo,
-          strDocumentNo, strOrder, strC_BpGroup_ID, strM_Product_Category_ID, 
strCurrencyId);
-    } else if (vars.commandIn("FIND")) {
-      String strC_BPartner_ID = vars.getRequestGlobalVariable("inpcBPartnerId",
-          "ReportInvoices|C_BPartner_ID");
-      String strM_Product_ID = vars.getRequestGlobalVariable("inpmProductId",
-          "ReportInvoices|M_Product_ID");
-      String strDateFrom = vars.getRequestGlobalVariable("inpDateInvoiceFrom",
-          "ReportInvoices|DateFrom");
-      String strDateTo = vars.getRequestGlobalVariable("inpDateInvoiceTo", 
"ReportInvoices|DateTo");
-      String strDocumentNo = 
vars.getRequestGlobalVariable("inpInvoicedocumentno",
-          "ReportInvoices|DocumentNo");
-      String strOrder = vars.getGlobalVariable("inpOrder", 
"ReportInvoices|Order");
-      String strC_BpGroup_ID = vars.getRequestGlobalVariable("inpcBpGroupId",
-          "ReportInvoices|C_BpGroup_ID");
-      String strM_Product_Category_ID = 
vars.getRequestGlobalVariable("inpmProductCategoryId",
-          "ReportInvoices|M_Product_Category_ID");
-      String strCurrencyId = vars.getGlobalVariable("inpCurrencyId", 
"ReportInvoices|currency",
-          strUserCurrencyId);
-      printPageDataHtml(request, response, vars, strC_BPartner_ID, 
strM_Product_ID, strDateFrom,
-          strDateTo, strDocumentNo, strOrder, strC_BpGroup_ID, 
strM_Product_Category_ID,
-          strCurrencyId);
-    } else
-      pageError(response);
-  }
+               // Get user Client's base currency
+               String strUserCurrencyId = Utility.stringBaseCurrencyId(this, 
vars.getClient());
+               if (vars.commandIn("DEFAULT")) {
+                       String strC_BPartner_ID = 
vars.getGlobalVariable("inpcBPartnerId",
+                           "ReportInvoices|C_BPartner_ID", "");
+                       String strM_Product_ID = 
vars.getGlobalVariable("inpmProductId",
+                           "ReportInvoices|M_Product_ID", "");
+                       String strDateFrom = 
vars.getGlobalVariable("inpDateInvoiceFrom", "ReportInvoices|DateFrom",
+                           "");
+                       String strDateTo = 
vars.getGlobalVariable("inpDateInvoiceTo", "ReportInvoices|DateTo", "");
+                       String strDocumentNo = 
vars.getGlobalVariable("inpInvoicedocumentno",
+                           "ReportInvoices|DocumentNo", "");
+                       String strOrder = vars.getGlobalVariable("inpOrder", 
"ReportInvoices|Order", "SalesOrder");
+                       String strC_BpGroup_ID = 
vars.getGlobalVariable("inpcBpGroupId",
+                           "ReportInvoices|C_BpGroup_ID", "");
+                       String strM_Product_Category_ID = 
vars.getGlobalVariable("inpmProductCategoryId",
+                           "ReportInvoices|M_Product_Category_ID", "");
+                       String strCurrencyId = 
vars.getGlobalVariable("inpCurrencyId", "ReportInvoices|currency",
+                           strUserCurrencyId);
+                       printPageDataSheet(response, vars, strC_BPartner_ID, 
strM_Product_ID, strDateFrom, strDateTo,
+                           strDocumentNo, strOrder, strC_BpGroup_ID, 
strM_Product_Category_ID, strCurrencyId);
+               } else if (vars.commandIn("FIND")) {
+                       String strC_BPartner_ID = 
vars.getRequestGlobalVariable("inpcBPartnerId",
+                           "ReportInvoices|C_BPartner_ID");
+                       String strM_Product_ID = 
vars.getRequestGlobalVariable("inpmProductId",
+                           "ReportInvoices|M_Product_ID");
+                       String strDateFrom = 
vars.getRequestGlobalVariable("inpDateInvoiceFrom",
+                           "ReportInvoices|DateFrom");
+                       String strDateTo = 
vars.getRequestGlobalVariable("inpDateInvoiceTo", "ReportInvoices|DateTo");
+                       String strDocumentNo = 
vars.getRequestGlobalVariable("inpInvoicedocumentno",
+                           "ReportInvoices|DocumentNo");
+                       String strOrder = vars.getGlobalVariable("inpOrder", 
"ReportInvoices|Order");
+                       String strC_BpGroup_ID = 
vars.getRequestGlobalVariable("inpcBpGroupId",
+                           "ReportInvoices|C_BpGroup_ID");
+                       String strM_Product_Category_ID = 
vars.getRequestGlobalVariable("inpmProductCategoryId",
+                           "ReportInvoices|M_Product_Category_ID");
+                       String strCurrencyId = 
vars.getGlobalVariable("inpCurrencyId", "ReportInvoices|currency",
+                           strUserCurrencyId);
+                       printPageDataHtml(request, response, vars, 
strC_BPartner_ID, strM_Product_ID, strDateFrom,
+                           strDateTo, strDocumentNo, strOrder, 
strC_BpGroup_ID, strM_Product_Category_ID,
+                           strCurrencyId);
+               } else
+                       pageError(response);
+       }
 
-  private void printPageDataHtml(HttpServletRequest request, 
HttpServletResponse response,
-      VariablesSecureApp vars, String strC_BPartner_ID, String 
strM_Product_ID, String strDateFrom,
-      String strDateTo, String strDocumentNo, String strOrder, String 
strC_BpGroup_ID,
-      String strM_Product_Category_ID, String strCurrencyId) throws 
IOException, ServletException {
-    if (log4j.isDebugEnabled())
-      log4j.debug("Output: dataSheet");
-    response.setContentType("text/html; charset=UTF-8");
+       private void printPageDataHtml(HttpServletRequest request, 
HttpServletResponse response,
+           VariablesSecureApp vars, String strC_BPartner_ID, String 
strM_Product_ID, String strDateFrom,
+           String strDateTo, String strDocumentNo, String strOrder, String 
strC_BpGroup_ID,
+           String strM_Product_Category_ID, String strCurrencyId) throws 
IOException, ServletException {
+               if (log4j.isDebugEnabled())
+                       log4j.debug("Output: dataSheet");
+               response.setContentType("text/html; charset=UTF-8");
 
-    String strReportName = 
"@basedesign@/org/openbravo/erpCommon/ad_reports/ReportInvoicesEditJR.jrxml";
-    String strOutput = "html";
-    response.setHeader("Content-disposition", "inline; 
filename=ReportInvoicesEdit.html");
+               String strReportName = 
"@basedesign@/org/openbravo/erpCommon/ad_reports/ReportInvoicesEditJR.jrxml";
+               String strOutput = "html";
+               response.setHeader("Content-disposition", "inline; 
filename=ReportInvoicesEdit.html");
 
-    // Checks if there is a conversion rate for each of the transactions of
-    // the report
-    ReportInvoicesData[] data = null;
-    String strConvRateErrorMsg = "";
-    OBError myMessage = null;
-    myMessage = new OBError();
-    try {
-      data = ReportInvoicesData.select(this, strCurrencyId,
-          Utility.getContext(this, vars, "#User_Client", "ReportInvoices"),
-          Utility.getContext(this, vars, "#AccessibleOrgTree", 
"ReportInvoices"), strC_BpGroup_ID,
-          strM_Product_Category_ID, strC_BPartner_ID, strM_Product_ID, 
strDateFrom,
-          DateTimeData.nDaysAfter(this, strDateTo, "1"), strDocumentNo,
-          (strOrder.equals("PurchaseOrder")) ? "" : "sales",
-          (strOrder.equals("PurchaseOrder")) ? "purchase" : "");
-    } catch (ServletException ex) {
-      myMessage = Utility.translateError(this, vars, vars.getLanguage(), 
ex.getMessage());
-    }
-    strConvRateErrorMsg = myMessage.getMessage();
-    // If a conversion rate is missing for a certain transaction, an error
-    // message window pops-up.
-    if (!strConvRateErrorMsg.equals("") && strConvRateErrorMsg != null) {
-      advisePopUp(request, response, "ERROR",
-          Utility.messageBD(this, "NoConversionRateHeader", 
vars.getLanguage()),
-          strConvRateErrorMsg);
-    } else { // Launch the report as usual, calling the JRXML file
-      String strSubTitle = "";
-      strSubTitle = Utility.messageBD(this, "From", vars.getLanguage()) + " " 
+ strDateFrom + " "
-          + Utility.messageBD(this, "To", vars.getLanguage()) + " " + 
strDateTo;
+               // Checks if there is a conversion rate for each of the 
transactions of
+               // the report
+               ReportInvoicesData[] data = null;
+               String strConvRateErrorMsg = "";
+               OBError myMessage = null;
+               myMessage = new OBError();
+               try {
+                       data = ReportInvoicesData.select(this, strCurrencyId, 
Utility.getContext(this, vars,
+                           "#User_Client", "ReportInvoices"), 
Utility.getContext(this, vars, "#AccessibleOrgTree",
+                           "ReportInvoices"), strC_BpGroup_ID, 
strM_Product_Category_ID, strC_BPartner_ID,
+                           strM_Product_ID, strDateFrom, 
DateTimeData.nDaysAfter(this, strDateTo, "1"),
+                           strDocumentNo, (strOrder.equals("PurchaseOrder")) ? 
"" : "sales", (strOrder
+                               .equals("PurchaseOrder")) ? "purchase" : "");
+               } catch (ServletException ex) {
+                       myMessage = Utility.translateError(this, vars, 
vars.getLanguage(), ex.getMessage());
+               }
+               strConvRateErrorMsg = myMessage.getMessage();
+               // If a conversion rate is missing for a certain transaction, 
an error
+               // message window pops-up.
+               if (!strConvRateErrorMsg.equals("") && strConvRateErrorMsg != 
null) {
+                       advisePopUp(request, response, "ERROR",
+                           Utility.messageBD(this, "NoConversionRateHeader", 
vars.getLanguage()),
+                           strConvRateErrorMsg);
+               } else { // Launch the report as usual, calling the JRXML file
+                       String strSubTitle = "";
+                       strSubTitle = Utility.messageBD(this, "From", 
vars.getLanguage()) + " " + strDateFrom + " "
+                           + Utility.messageBD(this, "To", vars.getLanguage()) 
+ " " + strDateTo;
 
-      HashMap<String, Object> parameters = new HashMap<String, Object>();
-      parameters.put("REPORT_SUBTITLE", strSubTitle);
+                       HashMap<String, Object> parameters = new 
HashMap<String, Object>();
+                       parameters.put("REPORT_SUBTITLE", strSubTitle);
 
-      renderJR(vars, response, strReportName, strOutput, parameters, data, 
null);
-    }
-  }
+                       renderJR(vars, response, strReportName, strOutput, 
parameters, data, null);
+               }
+       }
 
-  private void printPageDataSheet(HttpServletResponse response, 
VariablesSecureApp vars,
-      String strC_BPartner_ID, String strM_Product_ID, String strDateFrom, 
String strDateTo,
-      String strDocumentNo, String strOrder, String strC_BpGroup_ID,
-      String strM_Product_Category_ID, String strCurrencyId) throws 
IOException, ServletException {
-    if (log4j.isDebugEnabled())
-      log4j.debug("Output: dataSheet");
-    response.setContentType("text/html; charset=UTF-8");
-    PrintWriter out = response.getWriter();
+       private void printPageDataSheet(HttpServletResponse response, 
VariablesSecureApp vars,
+           String strC_BPartner_ID, String strM_Product_ID, String 
strDateFrom, String strDateTo,
+           String strDocumentNo, String strOrder, String strC_BpGroup_ID,
+           String strM_Product_Category_ID, String strCurrencyId) throws 
IOException, ServletException {
+               if (log4j.isDebugEnabled())
+                       log4j.debug("Output: dataSheet");
+               response.setContentType("text/html; charset=UTF-8");
+               PrintWriter out = response.getWriter();
 
-    XmlDocument xmlDocument = null;
-    xmlDocument = 
xmlEngine.readXmlTemplate("org/openbravo/erpCommon/ad_reports/ReportInvoicesJR")
-        .createXmlDocument();
+               XmlDocument xmlDocument = null;
+               xmlDocument = 
xmlEngine.readXmlTemplate("org/openbravo/erpCommon/ad_reports/ReportInvoicesJR")
+                   .createXmlDocument();
 
-    ToolBar toolbar = new ToolBar(this, vars.getLanguage(), 
"ReportInvoicesJR", false, "", "", "",
-        false, "ad_reports", strReplaceWith, false, true);
-    toolbar.prepareSimpleToolBarTemplate();
-    xmlDocument.setParameter("toolbar", toolbar.toString());
-    try {
-      WindowTabs tabs = new WindowTabs(this, vars,
-          "org.openbravo.erpCommon.ad_reports.ReportInvoicesJR");
-      xmlDocument.setParameter("parentTabContainer", tabs.parentTabs());
-      xmlDocument.setParameter("mainTabContainer", tabs.mainTabs());
-      xmlDocument.setParameter("childTabContainer", tabs.childTabs());
-      xmlDocument.setParameter("theme", vars.getTheme());
-      NavigationBar nav = new NavigationBar(this, vars.getLanguage(), 
"ReportInvoicesJR.html",
-          classInfo.id, classInfo.type, strReplaceWith, tabs.breadcrumb());
-      xmlDocument.setParameter("navigationBar", nav.toString());
-      LeftTabsBar lBar = new LeftTabsBar(this, vars.getLanguage(), 
"ReportInvoicesJR.html",
-          strReplaceWith);
-      xmlDocument.setParameter("leftTabs", lBar.manualTemplate());
-    } catch (Exception ex) {
-      throw new ServletException(ex);
-    }
-    {
-      OBError myMessage = vars.getMessage("ReportInvoices");
-      vars.removeMessage("ReportInvoices");
-      if (myMessage != null) {
-        xmlDocument.setParameter("messageType", myMessage.getType());
-        xmlDocument.setParameter("messageTitle", myMessage.getTitle());
-        xmlDocument.setParameter("messageMessage", myMessage.getMessage());
-      }
-    }
+               ToolBar toolbar = new ToolBar(this, vars.getLanguage(), 
"ReportInvoicesJR", false, "", "", "",
+                   false, "ad_reports", strReplaceWith, false, true);
+               toolbar.prepareSimpleToolBarTemplate();
+               xmlDocument.setParameter("toolbar", toolbar.toString());
+               try {
+                       WindowTabs tabs = new WindowTabs(this, vars,
+                           
"org.openbravo.erpCommon.ad_reports.ReportInvoicesJR");
+                       xmlDocument.setParameter("parentTabContainer", 
tabs.parentTabs());
+                       xmlDocument.setParameter("mainTabContainer", 
tabs.mainTabs());
+                       xmlDocument.setParameter("childTabContainer", 
tabs.childTabs());
+                       xmlDocument.setParameter("theme", vars.getTheme());
+                       NavigationBar nav = new NavigationBar(this, 
vars.getLanguage(), "ReportInvoicesJR.html",
+                           classInfo.id, classInfo.type, strReplaceWith, 
tabs.breadcrumb());
+                       xmlDocument.setParameter("navigationBar", 
nav.toString());
+                       LeftTabsBar lBar = new LeftTabsBar(this, 
vars.getLanguage(), "ReportInvoicesJR.html",
+                           strReplaceWith);
+                       xmlDocument.setParameter("leftTabs", 
lBar.manualTemplate());
+               } catch (Exception ex) {
+                       throw new ServletException(ex);
+               }
+               {
+                       OBError myMessage = vars.getMessage("ReportInvoices");
+                       vars.removeMessage("ReportInvoices");
+                       if (myMessage != null) {
+                               xmlDocument.setParameter("messageType", 
myMessage.getType());
+                               xmlDocument.setParameter("messageTitle", 
myMessage.getTitle());
+                               xmlDocument.setParameter("messageMessage", 
myMessage.getMessage());
+                       }
+               }
 
-    xmlDocument.setParameter("calendar", vars.getLanguage().substring(0, 2));
-    xmlDocument.setParameter("directory", "var baseDirectory = \"" + 
strReplaceWith + "/\";\n");
-    xmlDocument.setParameter("paramLanguage", "defaultLang=\"" + 
vars.getLanguage() + "\";");
-    xmlDocument.setParameter("paramBPartnerId", strC_BPartner_ID);
-    xmlDocument.setParameter("paramMProductId", strM_Product_ID);
-    xmlDocument.setParameter("dateFrom", strDateFrom);
-    xmlDocument.setParameter("dateFromdisplayFormat", 
vars.getSessionValue("#AD_SqlDateFormat"));
-    xmlDocument.setParameter("dateFromsaveFormat", 
vars.getSessionValue("#AD_SqlDateFormat"));
-    xmlDocument.setParameter("dateTo", strDateTo);
-    xmlDocument.setParameter("dateTodisplayFormat", 
vars.getSessionValue("#AD_SqlDateFormat"));
-    xmlDocument.setParameter("dateTosaveFormat", 
vars.getSessionValue("#AD_SqlDateFormat"));
-    xmlDocument.setParameter("paramDocumentNo", strDocumentNo);

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to