Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0036280 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 01. General setup | minor | have not tried | 2017-06-19 18:16 | 2018-05-14 13:09 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | AtulOpenbravo | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR18Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 2db82514d5d5 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | aferraz | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0036280: Several unused + probably unusable callouts exists and are candidates to be deleted | |||||||
Description | The following classes are servlets but do all do not have a corresponding ad_model_object entry. That means they have no servlet mapping and that they cannot be used as callouts (as defined callouts find the java class implementing them via ad_model_object). So all these seem not usable and are candidates for deletion: org.openbravo.erpCommon.ad_callouts.SE_Years_For_Calendar org.openbravo.erpCommon.ad_callouts.SL_CreateFromMultiple_Warehouse org.openbravo.erpCommon.ad_callouts.SL_Payment_No_Verify org.openbravo.erpCommon.ad_callouts.SL_CreateFromMultiple_Conversion org.openbravo.erpCommon.ad_callouts.SL_MovementAll_Locator org.openbravo.erpCommon.ad_callouts.SL_Payment_DocType org.openbravo.erpCommon.ad_callouts.SL_CreateFromMultiple_Product org.openbravo.erpCommon.ad_callouts.SL_Payment_Amounts org.openbravo.erpCommon.ad_callouts.SE_Calendar_For_Org org.openbravo.erpCommon.ad_callouts.SL_WorkRequirement_Sequence org.openbravo.erpCommon.ad_callouts.SL_Invoice_Tax org.openbravo.erpCommon.ad_callouts.SL_InOutLine_Locator | |||||||
Steps To Reproduce | - | |||||||
Proposed Solution | Double check each as usual before deleting anything and maybe remove them. Note on removal careful to also remove any related items no longer used after deleting those callouts (i.e. xsql files, xmlengine template ...) | |||||||
Tags | No tags attached. | |||||||
Attached Files | 36280.diff [^] (62,814 bytes) 2017-06-27 13:36 [Show Content] [Hide Content]# HG changeset patch # User Víctor Martínez Romanos <victor.martinez@openbravo.com> # Date 1498475831 -7200 # Mon Jun 26 13:17:11 2017 +0200 # Node ID b9fd1b6a810f231fcb601d2027b9e696b25850f6 # Parent e0985a0110819df3b701e2855ef2f7324e719f36 Fixed issue 36280 [calloutCleanup] SE_Years_For_Calendar Removed callout as it is not used anymore diff --git a/src-db/database/sourcedata/AD_CALLOUT.xml b/src-db/database/sourcedata/AD_CALLOUT.xml --- a/src-db/database/sourcedata/AD_CALLOUT.xml +++ b/src-db/database/sourcedata/AD_CALLOUT.xml @@ -1126,16 +1126,6 @@ <!--8A5A44A91EBF4081B316572504DD68DA--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> <!--8A5A44A91EBF4081B316572504DD68DA--></AD_CALLOUT> -<!--8D5A298D3BEF4E14BB9B9C2A7D0CFA18--><AD_CALLOUT> -<!--8D5A298D3BEF4E14BB9B9C2A7D0CFA18--> <AD_CALLOUT_ID><![CDATA[8D5A298D3BEF4E14BB9B9C2A7D0CFA18]]></AD_CALLOUT_ID> -<!--8D5A298D3BEF4E14BB9B9C2A7D0CFA18--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> -<!--8D5A298D3BEF4E14BB9B9C2A7D0CFA18--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> -<!--8D5A298D3BEF4E14BB9B9C2A7D0CFA18--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> -<!--8D5A298D3BEF4E14BB9B9C2A7D0CFA18--> <NAME><![CDATA[SE_Years_For_Calendar]]></NAME> -<!--8D5A298D3BEF4E14BB9B9C2A7D0CFA18--> <DESCRIPTION><![CDATA[List of years for chosen calendar]]></DESCRIPTION> -<!--8D5A298D3BEF4E14BB9B9C2A7D0CFA18--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> -<!--8D5A298D3BEF4E14BB9B9C2A7D0CFA18--></AD_CALLOUT> - <!--8D7D52080CF3467093DDE410B7BB0A2F--><AD_CALLOUT> <!--8D7D52080CF3467093DDE410B7BB0A2F--> <AD_CALLOUT_ID><![CDATA[8D7D52080CF3467093DDE410B7BB0A2F]]></AD_CALLOUT_ID> <!--8D7D52080CF3467093DDE410B7BB0A2F--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> diff --git a/src/org/openbravo/erpCommon/ad_callouts/SE_Years_For_Calendar.java b/src/org/openbravo/erpCommon/ad_callouts/SE_Years_For_Calendar.java deleted file mode 100644 --- a/src/org/openbravo/erpCommon/ad_callouts/SE_Years_For_Calendar.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - ************************************************************************* - * The contents of this file are subject to the Openbravo Public License - * Version 1.1 (the "License"), being the Mozilla Public License - * Version 1.1 with a permitted attribution clause; you may not use this - * file except in compliance with the License. You may obtain a copy of - * the License at http://www.openbravo.com/legal/license.html - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * 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-2010 Openbravo SLU - * All Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ - */ -package org.openbravo.erpCommon.ad_callouts; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.openbravo.base.secureApp.HttpSecureAppServlet; -import org.openbravo.base.secureApp.VariablesSecureApp; -import org.openbravo.xmlEngine.XmlDocument; - -public class SE_Years_For_Calendar extends HttpSecureAppServlet { - - private static final long serialVersionUID = 1L; - - public void init(ServletConfig config) { - super.init(config); - boolHist = false; - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, - ServletException { - VariablesSecureApp vars = new VariablesSecureApp(request); - if (vars.commandIn("DEFAULT")) { - String strCalendarId = vars.getStringParameter("inpcCalendarId"); - String strChanged = vars.getStringParameter("inpLastFieldChanged"); - String strWindowId = vars.getStringParameter("inpwindowId"); - try { - printPage(response, vars, strWindowId, strCalendarId, strChanged); - } catch (ServletException ex) { - pageErrorCallOut(response); - } - } else - pageError(response); - } - - private void printPage(HttpServletResponse response, VariablesSecureApp vars, String strWindowId, - String strCalendarId, String strChanged) throws IOException, ServletException { - - XmlDocument xmlDocument = xmlEngine.readXmlTemplate( - "org/openbravo/erpCommon/ad_callouts/CallOut").createXmlDocument(); - - StringBuilder result = new StringBuilder(); - result.append("var calloutName='SE_Years_For_Calendar';\n\n"); - result.append("var respuesta = new Array("); - - SEPeriodNoData[] tdv = null; - if (strChanged.equals("inpcCalendarId") && !strCalendarId.equals("")) { - // Update the years - try { - tdv = SEPeriodNoData.getYears(this, strCalendarId); - } catch (Exception ex) { - throw new ServletException(ex); - } - } - result.append("new Array(\"inpcYearId\", "); - if (tdv != null && tdv.length > 0) { - result.append("new Array("); - for (int i = 0; i < tdv.length; i++) { - result.append("new Array(\"" + tdv[i].getField("id") + "\", \"" + tdv[i].getField("Name") - + "\", \"" + (i == 0 ? "true" : "false") + "\")"); - if (i < tdv.length - 1) - result.append(",\n"); - } - result.append("\n)"); - } else - result.append("null"); - result.append("\n)"); - - result.append(");"); - xmlDocument.setParameter("array", result.toString()); - xmlDocument.setParameter("frameName", "appFrame"); - response.setContentType("text/html; charset=UTF-8"); - PrintWriter out = response.getWriter(); - out.println(xmlDocument.print()); - out.close(); - - } -} # HG changeset patch # User Víctor Martínez Romanos <victor.martinez@openbravo.com> # Date 1498476567 -7200 # Mon Jun 26 13:29:27 2017 +0200 # Node ID 3cbebd8efd298256e1dd30cf2984c8460f6fb737 # Parent b9fd1b6a810f231fcb601d2027b9e696b25850f6 Fixed issue 36280 [calloutCleanup] SL_Payment_No_Verify Removed callout as it is not used anymore diff --git a/src/org/openbravo/erpCommon/ad_callouts/SL_Payment_No_Verify.java b/src/org/openbravo/erpCommon/ad_callouts/SL_Payment_No_Verify.java deleted file mode 100644 --- a/src/org/openbravo/erpCommon/ad_callouts/SL_Payment_No_Verify.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - ************************************************************************* - * The contents of this file are subject to the Openbravo Public License - * Version 1.1 (the "License"), being the Mozilla Public License - * Version 1.1 with a permitted attribution clause; you may not use this - * file except in compliance with the License. You may obtain a copy of - * the License at http://www.openbravo.com/legal/license.html - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * 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-2010 Openbravo SLU - * All Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ - */ -package org.openbravo.erpCommon.ad_callouts; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.openbravo.base.secureApp.HttpSecureAppServlet; -import org.openbravo.base.secureApp.VariablesSecureApp; -import org.openbravo.erpCommon.businessUtility.Tax; -import org.openbravo.erpCommon.utility.Utility; -import org.openbravo.utils.FormatUtilities; -import org.openbravo.xmlEngine.XmlDocument; - -public class SL_Payment_No_Verify extends HttpSecureAppServlet { - private static final long serialVersionUID = 1L; - - public void init(ServletConfig config) { - super.init(config); - boolHist = false; - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, - ServletException { - VariablesSecureApp vars = new VariablesSecureApp(request); - if (vars.commandIn("DEFAULT")) { - String strChanged = vars.getStringParameter("inpLastFieldChanged"); - if (log4j.isDebugEnabled()) - log4j.debug("CHANGED: " + strChanged); - String strcCreditCard = vars.getStringParameter("inpcreditcardnumber"); - String strcCreditCardType = vars.getStringParameter("inpcreditcardtype"); - String strcRoutingNo = vars.getStringParameter("inproutingno"); - String strTabId = vars.getStringParameter("inpTabId"); - - try { - printPage(response, vars, strChanged, strcCreditCard, strcCreditCardType, strcRoutingNo, - strTabId); - } catch (ServletException ex) { - pageErrorCallOut(response); - } - } else - pageError(response); - } - - private void printPage(HttpServletResponse response, VariablesSecureApp vars, String strChanged, - String strcCreditCard, String strcCreditCardType, String strcRoutingNo, String strTabId) - throws IOException, ServletException { - if (log4j.isDebugEnabled()) - log4j.debug("Output: dataSheet"); - XmlDocument xmlDocument = xmlEngine.readXmlTemplate( - "org/openbravo/erpCommon/ad_callouts/CallOut").createXmlDocument(); - StringBuffer resultado = new StringBuffer(); - resultado.append("var calloutName='SL_Payment_DocType';\n\n"); - resultado.append("var respuesta = new Array("); - - if (strChanged.equals("inpcreditcardnumber")) { - if (strcCreditCard == null || strcCreditCard.length() == 0) { - } else { - String strcvalidateCc = Tax.validateCreditCardNumber(strcCreditCard, strcCreditCardType); - resultado - .append("new Array('MESSAGE', \"" - + FormatUtilities.replaceJS(Utility.messageBD(this, strcvalidateCc, - vars.getLanguage())) + "\")"); - } - } else if (strChanged.equals("inproutingno")) { - if (strcRoutingNo == null || strcRoutingNo.length() == 0) { - } else { - String strcvalidateRo = Tax.validateRoutingNo(strcRoutingNo); - resultado - .append("new Array('MESSAGE', \"" - + FormatUtilities.replaceJS(Utility.messageBD(this, strcvalidateRo, - vars.getLanguage())) + "\")"); - } - } - resultado.append(");"); - xmlDocument.setParameter("array", resultado.toString()); - xmlDocument.setParameter("frameName", "appFrame"); - response.setContentType("text/html; charset=UTF-8"); - PrintWriter out = response.getWriter(); - out.println(xmlDocument.print()); - out.close(); - - } -} # HG changeset patch # User Víctor Martínez Romanos <victor.martinez@openbravo.com> # Date 1498477078 -7200 # Mon Jun 26 13:37:58 2017 +0200 # Node ID eb0d142ad4c8b951e89f5611b7572afe37485405 # Parent 3cbebd8efd298256e1dd30cf2984c8460f6fb737 Fixed issue 36280 [calloutCleanup] SL_MovementAll_Locator Removed callout as it is not used anymore SL_InOutLine_Locator_data.filledLocator() method removed as it is not used by any other class diff --git a/src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator_data.xsql b/src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator_data.xsql --- a/src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator_data.xsql +++ b/src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator_data.xsql @@ -12,7 +12,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-2010 Openbravo SLU + * All portions are Copyright (C) 2001-2017 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -51,15 +51,4 @@ <Parameter name="mLocatorId"/> <Parameter name="mProductId"/> </SqlMethod> - <SqlMethod name="filledLocator" type="preparedStatement" return="String" default=""> - <SqlMethodComment></SqlMethodComment> - <Sql> - SELECT COALESCE(MAX(M_INOUTLINE.M_INOUTLINE_ID),'0') AS FILLEDLOCATOR FROM M_INOUT, M_INOUTLINE - WHERE M_INOUT.M_INOUT_ID = M_INOUTLINE.M_INOUT_ID - AND M_INOUT.M_INOUT_ID = ? - AND M_INOUTLINE.M_LOCATOR_ID = ? - </Sql> - <Parameter name="mInoutId"/> - <Parameter name="mLocatorId"/> - </SqlMethod> </SqlClass> diff --git a/src/org/openbravo/erpCommon/ad_callouts/SL_MovementAll_Locator.java b/src/org/openbravo/erpCommon/ad_callouts/SL_MovementAll_Locator.java deleted file mode 100644 --- a/src/org/openbravo/erpCommon/ad_callouts/SL_MovementAll_Locator.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - ************************************************************************* - * The contents of this file are subject to the Openbravo Public License - * Version 1.1 (the "License"), being the Mozilla Public License - * Version 1.1 with a permitted attribution clause; you may not use this - * file except in compliance with the License. You may obtain a copy of - * the License at http://www.openbravo.com/legal/license.html - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * 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-2010 Openbravo SLU - * All Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ - */ -package org.openbravo.erpCommon.ad_callouts; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.openbravo.base.secureApp.HttpSecureAppServlet; -import org.openbravo.base.secureApp.VariablesSecureApp; -import org.openbravo.erpCommon.utility.Utility; -import org.openbravo.xmlEngine.XmlDocument; - -public class SL_MovementAll_Locator extends HttpSecureAppServlet { - private static final long serialVersionUID = 1L; - - public void init(ServletConfig config) { - super.init(config); - boolHist = false; - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, - ServletException { - VariablesSecureApp vars = new VariablesSecureApp(request); - if (vars.commandIn("DEFAULT")) { - String strChanged = vars.getStringParameter("inpLastFieldChanged"); - log4j.debug("CHANGED: " + strChanged); - String strLocator = vars.getStringParameter(strChanged); - // String strLocator = vars.getStringParameter("inpmLocatorId"); - String strmInoutId = vars.getStringParameter("inpmInoutId"); - String strTabId = vars.getStringParameter("inpTabId"); - - try { - printPage(response, vars, strLocator, "N", strTabId, strmInoutId); - } catch (ServletException ex) { - pageErrorCallOut(response); - } - } else - pageError(response); - } - - private void printPage(HttpServletResponse response, VariablesSecureApp vars, String strLocator, - String strIsSOTrx, String strTabId, String strmInoutId) throws IOException, ServletException { - log4j.debug("Output: dataSheet"); - XmlDocument xmlDocument = xmlEngine.readXmlTemplate( - "org/openbravo/erpCommon/ad_callouts/CallOut").createXmlDocument(); - - String locator = "0"; - String FilledLocator = "0"; - - locator = SLInOutLineLocatorData.locator(this, strLocator); - FilledLocator = SLInOutLineLocatorData.filledLocator(this, strmInoutId, strLocator); - - StringBuffer resultado = new StringBuffer(); - resultado.append("var calloutName='SL_MovementAll_Locator';\n\n"); - log4j.debug("IsSOTrx: " + strIsSOTrx + " - locator: " + locator + " - FilledLocator: " - + FilledLocator); - if (strIsSOTrx.equals("N") && !locator.equals("0")) { - resultado.append("var respuesta = new Array("); - resultado.append("new Array(\"MESSAGE\", \"" - + Utility.messageBD(this, "FilledWarehouseLocator", vars.getLanguage()) + "\")"); - resultado.append(");"); - } else if (strIsSOTrx.equals("N") && !FilledLocator.equals("0")) { - resultado.append("var respuesta = new Array("); - resultado.append("new Array(\"MESSAGE\", \"" - + Utility.messageBD(this, "FilledLocatorInout", vars.getLanguage()) + "\")"); - resultado.append(");"); - } else - resultado.append("var respuesta = null;\n"); - xmlDocument.setParameter("array", resultado.toString()); - xmlDocument.setParameter("frameName", "frameButton"); - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - out.println(xmlDocument.print()); - out.close(); - } -} # HG changeset patch # User Víctor Martínez Romanos <victor.martinez@openbravo.com> # Date 1498477244 -7200 # Mon Jun 26 13:40:44 2017 +0200 # Node ID 889485cc7ee07b53c76c26c2110842e1966f7ff3 # Parent eb0d142ad4c8b951e89f5611b7572afe37485405 Fixed issue 36280 [calloutCleanup] SL_Payment_DocType* Removed callout and xsql file as they are not used anymore diff --git a/src/org/openbravo/erpCommon/ad_callouts/SL_Payment_DocType.java b/src/org/openbravo/erpCommon/ad_callouts/SL_Payment_DocType.java deleted file mode 100644 --- a/src/org/openbravo/erpCommon/ad_callouts/SL_Payment_DocType.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - ************************************************************************* - * The contents of this file are subject to the Openbravo Public License - * Version 1.1 (the "License"), being the Mozilla Public License - * Version 1.1 with a permitted attribution clause; you may not use this - * file except in compliance with the License. You may obtain a copy of - * the License at http://www.openbravo.com/legal/license.html - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * 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-2010 Openbravo SLU - * All Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ - */ -package org.openbravo.erpCommon.ad_callouts; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.openbravo.base.secureApp.HttpSecureAppServlet; -import org.openbravo.base.secureApp.VariablesSecureApp; -import org.openbravo.erpCommon.utility.Utility; -import org.openbravo.utils.FormatUtilities; -import org.openbravo.xmlEngine.XmlDocument; - -public class SL_Payment_DocType extends HttpSecureAppServlet { - private static final long serialVersionUID = 1L; - - public void init(ServletConfig config) { - super.init(config); - boolHist = false; - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, - ServletException { - VariablesSecureApp vars = new VariablesSecureApp(request); - if (vars.commandIn("DEFAULT")) { - String strChanged = vars.getStringParameter("inpLastFieldChanged"); - if (log4j.isDebugEnabled()) - log4j.debug("WE GO INTO THE DEFAULT"); - if (log4j.isDebugEnabled()) - log4j.debug("CHANGED: " + strChanged); - String strcInvoiceId = vars.getStringParameter("inpcInvoiceId"); - String strcDoctypeId = vars.getStringParameter("inpcDoctypeId"); - String strTabId = vars.getStringParameter("inpTabId"); - - try { - printPage(response, vars, strChanged, strcInvoiceId, strcDoctypeId, strTabId); - } catch (ServletException ex) { - pageErrorCallOut(response); - } - } else - pageError(response); - } - - private void printPage(HttpServletResponse response, VariablesSecureApp vars, String strChanged, - String strcInvoiceId, String strcDoctypeId, String strTabId) throws IOException, - ServletException { - if (log4j.isDebugEnabled()) - log4j.debug("Output: dataSheet"); - XmlDocument xmlDocument = xmlEngine.readXmlTemplate( - "org/openbravo/erpCommon/ad_callouts/CallOut").createXmlDocument(); - if (log4j.isDebugEnabled()) - log4j.debug("WE GET INTO PRINTPAGE"); - StringBuffer resultado = new StringBuffer(); - resultado.append("var calloutName='SL_Payment_DocType';\n\n"); - resultado.append("var respuesta = new Array("); - - String strcaseId = SLPaymentDocTypeData.selectCase(this, strcInvoiceId, strcDoctypeId); - if (strcaseId.equals("N")) { - resultado.append("new Array('MESSAGE', \"" - + FormatUtilities.replaceJS(Utility.messageBD(this, "PaymentDocTypeInvoiceInconsistent", - vars.getLanguage())) + "\")"); - } - resultado.append(");"); - xmlDocument.setParameter("array", resultado.toString()); - xmlDocument.setParameter("frameName", "appFrame"); - response.setContentType("text/html; charset=UTF-8"); - PrintWriter out = response.getWriter(); - out.println(xmlDocument.print()); - out.close(); - - } -} diff --git a/src/org/openbravo/erpCommon/ad_callouts/SL_Payment_DocType_data.xsql b/src/org/openbravo/erpCommon/ad_callouts/SL_Payment_DocType_data.xsql deleted file mode 100644 --- a/src/org/openbravo/erpCommon/ad_callouts/SL_Payment_DocType_data.xsql +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!-- - ************************************************************************* - * The contents of this file are subject to the Openbravo Public License - * Version 1.1 (the "License"), being the Mozilla Public License - * Version 1.1 with a permitted attribution clause; you may not use this - * file except in compliance with the License. You may obtain a copy of - * the License at http://www.openbravo.com/legal/license.html - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * 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-2010 Openbravo SLU - * All Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ ---> - - - - - -<SqlClass name="SLPaymentDocTypeData" package="org.openbravo.erpCommon.ad_callouts"> - <SqlMethod name="select" type="preparedStatement" return="multiple"> - <SqlMethodComment></SqlMethodComment> - <Sql> - <![CDATA[ - SELECT * FROM DUAL - ]]> - </Sql> - </SqlMethod> - <SqlMethod name="selectCase" type="preparedStatement" return="string" default=""> - <SqlMethodComment></SqlMethodComment> - <Sql> - <![CDATA[ - SELECT (CASE WHEN (i.IsSOTrx='Y' AND dt.DocBaseType='ARR') OR (i.IsSOTrx='N' AND dt.DocBaseType='APP') THEN 'Y' - ELSE 'N' - END) AS TOTAL - FROM C_INVOICE i, C_DOCTYPE dt - WHERE i.C_Invoice_ID=? - AND dt.C_DocType_ID=? - ]]> - </Sql> - <Parameter name="cInvoiceId"/> - <Parameter name="cDocTypeId"/> - </SqlMethod> -</SqlClass> # HG changeset patch # User Víctor Martínez Romanos <victor.martinez@openbravo.com> # Date 1498477859 -7200 # Mon Jun 26 13:50:59 2017 +0200 # Node ID ea4a2e9b1209c8b4afea9e11da9269622c018333 # Parent 889485cc7ee07b53c76c26c2110842e1966f7ff3 Fixed issue 36280 [calloutCleanup] SL_Payment_Amounts* Removed callout and xsql file as they are not used anymore diff --git a/src/org/openbravo/erpCommon/ad_callouts/SL_Payment_Amounts.java b/src/org/openbravo/erpCommon/ad_callouts/SL_Payment_Amounts.java deleted file mode 100644 --- a/src/org/openbravo/erpCommon/ad_callouts/SL_Payment_Amounts.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - ************************************************************************* - * The contents of this file are subject to the Openbravo Public License - * Version 1.1 (the "License"), being the Mozilla Public License - * Version 1.1 with a permitted attribution clause; you may not use this - * file except in compliance with the License. You may obtain a copy of - * the License at http://www.openbravo.com/legal/license.html - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * 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 Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ - */ -package org.openbravo.erpCommon.ad_callouts; - -import java.io.IOException; -import java.io.PrintWriter; -import java.math.BigDecimal; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.openbravo.base.secureApp.HttpSecureAppServlet; -import org.openbravo.base.secureApp.VariablesSecureApp; -import org.openbravo.data.FieldProvider; -import org.openbravo.erpCommon.utility.ComboTableData; -import org.openbravo.erpCommon.utility.DateTimeData; -import org.openbravo.erpCommon.utility.Utility; -import org.openbravo.utils.FormatUtilities; -import org.openbravo.xmlEngine.XmlDocument; - -public class SL_Payment_Amounts extends HttpSecureAppServlet { - private static final long serialVersionUID = 1L; - - public void init(ServletConfig config) { - super.init(config); - boolHist = false; - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, - ServletException { - VariablesSecureApp vars = new VariablesSecureApp(request); - if (vars.commandIn("DEFAULT")) { - String strChanged = vars.getStringParameter("inpLastFieldChanged"); - if (log4j.isDebugEnabled()) - log4j.debug("CHANGED: " + strChanged); - String strIsOverUnderPayment = vars.getStringParameter("inpisoverunderpayment"); - String strPayamt = vars.getNumericParameter("inppayamt"); - String strDiscountamt = vars.getNumericParameter("inpdiscountamt"); - String strWriteoffamt = vars.getNumericParameter("inpwriteoffamt"); - String strOverunderamt = vars.getNumericParameter("inpoverunderamt"); - String strcCurrencyId = vars.getStringParameter("inpcCurrencyId"); - String strcPaymentId = vars.getStringParameter("inpcPaymentId"); - String strcInvoiceId = vars.getStringParameter("inpcInvoiceId"); - String strTabId = vars.getStringParameter("inpTabId"); - try { - printPage(response, vars, strChanged, strIsOverUnderPayment, strPayamt, strDiscountamt, - strWriteoffamt, strOverunderamt, strcCurrencyId, strcPaymentId, strcInvoiceId, strTabId); - } catch (ServletException ex) { - pageErrorCallOut(response); - } - - } else - pageError(response); - } - - private void printPage(HttpServletResponse response, VariablesSecureApp vars, String strChanged, - String strIsOverUnderPayment, String strPayamt, String strDiscountamt, String strWriteoffamt, - String strOverunderamt, String strcCurrencyId, String strcPaymentId, String strcInvoiceId, - String strTabId) throws IOException, ServletException { - if (log4j.isDebugEnabled()) - log4j.debug("Output: dataSheet"); - XmlDocument xmlDocument = xmlEngine.readXmlTemplate( - "org/openbravo/erpCommon/ad_callouts/CallOut").createXmlDocument(); - - BigDecimal payamt, discountamt, writeoffamt, overunderamt, convert, invtotamt; - - payamt = new BigDecimal(strPayamt); - discountamt = new BigDecimal(strDiscountamt); - writeoffamt = new BigDecimal(strWriteoffamt); - overunderamt = new BigDecimal(strOverunderamt); - - StringBuffer resultado = new StringBuffer(); - resultado.append("var calloutName='SL_Payment_Amounts';\n\n"); - resultado.append("var respuesta = new Array("); - if (strChanged.equals("inpisoverunderpayment")) { - overunderamt = new BigDecimal(strOverunderamt); - resultado.append("new Array(\"inpoverunderamt\", " + overunderamt.toString() + ")"); - } - - else if (strChanged.equals("inpcCurrencyId")) { - - String strCurrency = vars.getSessionValue("Last.Currency"); - if (log4j.isDebugEnabled()) - log4j.debug("LAST CURRENCY: " + strCurrency); - if (strCurrency.equals("")) { - vars.setSessionValue("Last.Currency", strcCurrencyId); - } else { - - if (strCurrency.equals(strcCurrencyId)) { - } else { - String strconvert = SLPaymentAmountsData.selectConversion(this, strCurrency, - strcCurrencyId, DateTimeData.today(this), null, vars.getClient(), vars.getOrg()); - if (strconvert.equals("")) { - resultado.append("new Array('MESSAGE', \"" - + FormatUtilities.replaceJS(Utility.messageBD(this, "NoCurrencyConversion", - vars.getLanguage())) + "\"),"); - FieldProvider[] tdd = null; - try { - ComboTableData comboTableData = new ComboTableData(vars, this, "TABLE", "", - "C_Currency", "ID", Utility.getContext(this, vars, "#AccessibleOrgTree", - "SLPaymentAmounts"), Utility.getContext(this, vars, "#User_Client", - "SLPaymentAmounts"), 0); - Utility.fillSQLParameters(this, vars, null, comboTableData, "SLPaymentAmounts", ""); - tdd = comboTableData.select(false); - comboTableData = null; - } catch (Exception ex) { - throw new ServletException(ex); - } - - resultado.append("new Array(\"inpcCurrencyId\", "); - if (tdd != null && tdd.length > 0) { - resultado.append("new Array("); - for (int i = 0; i < tdd.length; i++) { - resultado.append("new Array(\"" + tdd[i].getField("id") + "\", \"" - + FormatUtilities.replaceJS(tdd[i].getField("name")) + "\", \"" - + (tdd[i].getField("id").equalsIgnoreCase(strCurrency) ? "true" : "false") - + "\")"); - if (i < tdd.length - 1) - resultado.append(",\n"); - } - resultado.append("\n)"); - } else - resultado.append("null"); - resultado.append("\n)"); - } else { - convert = new BigDecimal(strconvert); - payamt = payamt.multiply(convert).setScale(2, 4); - resultado.append("new Array(\"inppayamt\", " + payamt.toString() + "),"); - discountamt = discountamt.multiply(convert).setScale(2, 4); - resultado.append("new Array(\"inpdiscountamt\", " + discountamt.toString() + "),"); - writeoffamt = writeoffamt.multiply(convert).setScale(2, 4); - resultado.append("new Array(\"inpwriteoffamt\", " + writeoffamt.toString() + "),"); - overunderamt = overunderamt.multiply(convert).setScale(2, 4); - resultado.append("new Array(\"inpoverunderamt\", " + overunderamt.toString() + ")"); - vars.setSessionValue("Last.Currency", strcCurrencyId); - } - - } - - } - - } else if (strChanged.equals("inppayamt")) { - SLPaymentAmountsData[] data = SLPaymentAmountsData.select(this, strcInvoiceId); - if (log4j.isDebugEnabled()) - log4j.debug("PAYMENT: " + data[0].grand + "CURRENCYID: " + data[0].currencyid); - invtotamt = new BigDecimal(data[0].grand); - if (strcCurrencyId.equals(data[0].currencyid)) { - } else { - String strconvert = SLPaymentAmountsData.selectConversion(this, data[0].currencyid, - strcCurrencyId, DateTimeData.today(this), null, vars.getClient(), vars.getOrg()); - convert = new BigDecimal(strconvert); - invtotamt = invtotamt.multiply(convert).setScale(2, 4); - } - writeoffamt = (invtotamt).subtract(payamt).subtract(discountamt).subtract(overunderamt); - resultado.append("new Array(\"inpwriteoffamt\", " + writeoffamt.toString() + ")"); - } else if (strChanged.equals("inpdiscountamt")) { - SLPaymentAmountsData[] data = SLPaymentAmountsData.select(this, strcInvoiceId); - invtotamt = new BigDecimal(data[0].grand); - if (strcCurrencyId.equals(data[0].currencyid)) { - } else { - String strconvert = SLPaymentAmountsData.selectConversion(this, data[0].currencyid, - strcCurrencyId, DateTimeData.today(this), null, vars.getClient(), vars.getOrg()); - convert = new BigDecimal(strconvert); - invtotamt = invtotamt.multiply(convert).setScale(2, 4); - } - invtotamt = invtotamt.subtract(discountamt).subtract(writeoffamt).subtract(overunderamt); - resultado.append("new Array(\"inppayamt\", " + invtotamt.toString() + ")"); - } else if (strChanged.equals("inpwriteoffamt")) { - SLPaymentAmountsData[] data = SLPaymentAmountsData.select(this, strcInvoiceId); - invtotamt = new BigDecimal(data[0].grand); - if (strcCurrencyId.equals(data[0].currencyid)) { - } else { - String strconvert = SLPaymentAmountsData.selectConversion(this, data[0].currencyid, - strcCurrencyId, DateTimeData.today(this), null, vars.getClient(), vars.getOrg()); - convert = new BigDecimal(strconvert); - invtotamt = invtotamt.multiply(convert).setScale(2, 4); - } - invtotamt = invtotamt.subtract(writeoffamt).subtract(discountamt).subtract(overunderamt); - resultado.append("new Array(\"inppayamt\", " + invtotamt.toString() + ")"); - } else if (strChanged.equals("inpoverunderamt")) { - SLPaymentAmountsData[] data = SLPaymentAmountsData.select(this, strcInvoiceId); - invtotamt = new BigDecimal(data[0].grand); - invtotamt = invtotamt.subtract(overunderamt).subtract(writeoffamt).subtract(discountamt); - resultado.append("new Array(\"inppayamt\", " + invtotamt.toString() + ")"); - } - resultado.append(");"); - xmlDocument.setParameter("array", resultado.toString()); - xmlDocument.setParameter("frameName", "appFrame"); - response.setContentType("text/html; charset=UTF-8"); - PrintWriter out = response.getWriter(); - out.println(xmlDocument.print()); - out.close(); - - } -} diff --git a/src/org/openbravo/erpCommon/ad_callouts/SL_Payment_Amounts_data.xsql b/src/org/openbravo/erpCommon/ad_callouts/SL_Payment_Amounts_data.xsql deleted file mode 100644 --- a/src/org/openbravo/erpCommon/ad_callouts/SL_Payment_Amounts_data.xsql +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!-- - ************************************************************************* - * The contents of this file are subject to the Openbravo Public License - * Version 1.1 (the "License"), being the Mozilla Public License - * Version 1.1 with a permitted attribution clause; you may not use this - * file except in compliance with the License. You may obtain a copy of - * the License at http://www.openbravo.com/legal/license.html - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * 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-2010 Openbravo SLU - * All Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ ---> - - - - - -<SqlClass name="SLPaymentAmountsData" package="org.openbravo.erpCommon.ad_callouts"> - <SqlMethod name="select" type="preparedStatement" return="multiple"> - <SqlMethodComment></SqlMethodComment> - <Sql> - <![CDATA[ - SELECT C_INVOICE.GRANDTOTAL AS GRAND, C_CURRENCY.C_CURRENCY_ID as CURRENCYID - FROM C_INVOICE, C_CURRENCY - WHERE C_INVOICE.C_CURRENCY_ID = C_CURRENCY.C_CURRENCY_ID - AND C_INVOICE.C_INVOICE_ID = ? - ]]> - </Sql> - <Parameter name="cInvoiceId"/> - - </SqlMethod> - <SqlMethod name="selectConversion" type="preparedStatement" return="String" default="0"> - <SqlMethodComment></SqlMethodComment> - <Sql> - <![CDATA[ - SELECT C_CURRENCY_RATE(?,?,TO_DATE(?),TO_CHAR(?),?,?) AS TOTAL FROM DUAL - ]]> - </Sql> - <Parameter name="cCurrencyId"/> - <Parameter name="cCurrencyIdTo"/> - <Parameter name="cConvDate"/> - <Parameter name="cRateType"/> - <Parameter name="adClientId"/> - <Parameter name="adOrgId"/> - </SqlMethod> -</SqlClass> # HG changeset patch # User Víctor Martínez Romanos <victor.martinez@openbravo.com> # Date 1498478341 -7200 # Mon Jun 26 13:59:01 2017 +0200 # Node ID 56e70e1f5fc31060f1a5f48f0dfd9bb5cfde989b # Parent ea4a2e9b1209c8b4afea9e11da9269622c018333 Fixed issue 36280 [calloutCleanup] SE_Calendar_For_Org Removed callout as it is not used anymore diff --git a/src-db/database/sourcedata/AD_CALLOUT.xml b/src-db/database/sourcedata/AD_CALLOUT.xml --- a/src-db/database/sourcedata/AD_CALLOUT.xml +++ b/src-db/database/sourcedata/AD_CALLOUT.xml @@ -1014,16 +1014,6 @@ <!--6A8705EEA6184612A40C2166F129A6E2--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> <!--6A8705EEA6184612A40C2166F129A6E2--></AD_CALLOUT> -<!--6C7A1DC738044D2880CF60856508FC81--><AD_CALLOUT> -<!--6C7A1DC738044D2880CF60856508FC81--> <AD_CALLOUT_ID><![CDATA[6C7A1DC738044D2880CF60856508FC81]]></AD_CALLOUT_ID> -<!--6C7A1DC738044D2880CF60856508FC81--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> -<!--6C7A1DC738044D2880CF60856508FC81--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> -<!--6C7A1DC738044D2880CF60856508FC81--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> -<!--6C7A1DC738044D2880CF60856508FC81--> <NAME><![CDATA[SE_Calendar_For_Org]]></NAME> -<!--6C7A1DC738044D2880CF60856508FC81--> <DESCRIPTION><![CDATA[List of calendar for chosen organization]]></DESCRIPTION> -<!--6C7A1DC738044D2880CF60856508FC81--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> -<!--6C7A1DC738044D2880CF60856508FC81--></AD_CALLOUT> - <!--6D1C09018D30444EB4F04E724A8D252A--><AD_CALLOUT> <!--6D1C09018D30444EB4F04E724A8D252A--> <AD_CALLOUT_ID><![CDATA[6D1C09018D30444EB4F04E724A8D252A]]></AD_CALLOUT_ID> <!--6D1C09018D30444EB4F04E724A8D252A--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> diff --git a/src/org/openbravo/erpCommon/ad_callouts/SE_Calendar_For_Org.java b/src/org/openbravo/erpCommon/ad_callouts/SE_Calendar_For_Org.java deleted file mode 100644 --- a/src/org/openbravo/erpCommon/ad_callouts/SE_Calendar_For_Org.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - ************************************************************************* - * The contents of this file are subject to the Openbravo Public License - * Version 1.1 (the "License"), being the Mozilla Public License - * Version 1.1 with a permitted attribution clause; you may not use this - * file except in compliance with the License. You may obtain a copy of - * the License at http://www.openbravo.com/legal/license.html - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * 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-2010 Openbravo SLU - * All Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ - */ -package org.openbravo.erpCommon.ad_callouts; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.openbravo.base.secureApp.HttpSecureAppServlet; -import org.openbravo.base.secureApp.VariablesSecureApp; -import org.openbravo.xmlEngine.XmlDocument; - -public class SE_Calendar_For_Org extends HttpSecureAppServlet { - - private static final long serialVersionUID = 1L; - - public void init(ServletConfig config) { - super.init(config); - boolHist = false; - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, - ServletException { - VariablesSecureApp vars = new VariablesSecureApp(request); - if (vars.commandIn("DEFAULT")) { - String strOrgId = vars.getStringParameter("inpadOrgId"); - String strChanged = vars.getStringParameter("inpLastFieldChanged"); - String strWindowId = vars.getStringParameter("inpwindowId"); - try { - printPage(response, vars, strWindowId, strOrgId, strChanged); - } catch (ServletException ex) { - pageErrorCallOut(response); - } - } else - pageError(response); - } - - private void printPage(HttpServletResponse response, VariablesSecureApp vars, String strWindowId, - String strOrgId, String strChanged) throws IOException, ServletException { - - XmlDocument xmlDocument = xmlEngine.readXmlTemplate( - "org/openbravo/erpCommon/ad_callouts/CallOut").createXmlDocument(); - - StringBuilder result = new StringBuilder(); - result.append("var calloutName='SE_Calendar_For_Org';\n\n"); - result.append("var respuesta = new Array("); - SEPeriodNoData[] tdv = null; - if (strChanged.equals("inpadOrgId") && !strOrgId.equals("")) { - // Update the Calendar - try { - tdv = SEPeriodNoData.getCalendar(this, strOrgId); - } catch (Exception ex) { - throw new ServletException(ex); - } - } - result.append("new Array(\"inpcCalendarId\", "); - if (tdv != null && tdv.length > 0) { - result.append("new Array("); - for (int i = 0; i < tdv.length; i++) { - result.append("new Array(\"" + tdv[i].getField("id") + "\", \"" + tdv[i].getField("Name") - + "\")"); - if (i < tdv.length - 1) - result.append(",\n"); - } - result.append("\n)"); - } else - result.append("null"); - result.append("\n)"); - - result.append(");"); - xmlDocument.setParameter("array", result.toString()); - xmlDocument.setParameter("frameName", "appFrame"); - response.setContentType("text/html; charset=UTF-8"); - PrintWriter out = response.getWriter(); - out.println(xmlDocument.print()); - out.close(); - - } -} # HG changeset patch # User Víctor Martínez Romanos <victor.martinez@openbravo.com> # Date 1498478484 -7200 # Mon Jun 26 14:01:24 2017 +0200 # Node ID d917c59ead15159b118cd1b36916f856b0f690de # Parent 56e70e1f5fc31060f1a5f48f0dfd9bb5cfde989b Fixed issue 36280 [calloutCleanup] SL_WorkRequirement_Sequence Removed callout and xsql file as they are not used anymore diff --git a/src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_Sequence.java b/src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_Sequence.java deleted file mode 100644 --- a/src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_Sequence.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - ************************************************************************* - * The contents of this file are subject to the Openbravo Public License - * Version 1.1 (the "License"), being the Mozilla Public License - * Version 1.1 with a permitted attribution clause; you may not use this - * file except in compliance with the License. You may obtain a copy of - * the License at http://www.openbravo.com/legal/license.html - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * 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-2010 Openbravo SLU - * All Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ - */ -package org.openbravo.erpCommon.ad_callouts; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.openbravo.base.secureApp.HttpSecureAppServlet; -import org.openbravo.base.secureApp.VariablesSecureApp; -import org.openbravo.utils.FormatUtilities; -import org.openbravo.xmlEngine.XmlDocument; - -public class SL_WorkRequirement_Sequence extends HttpSecureAppServlet { - private static final long serialVersionUID = 1L; - - public void init(ServletConfig config) { - super.init(config); - boolHist = false; - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, - ServletException { - VariablesSecureApp vars = new VariablesSecureApp(request); - if (vars.commandIn("DEFAULT")) { - String strChanged = vars.getStringParameter("inpLastFieldChanged"); - if (log4j.isDebugEnabled()) - log4j.debug("CHANGED: " + strChanged); - String strSequence = vars.getStringParameter("inpmaSequenceId"); - String strWorkRequirement = vars.getStringParameter("inpmaWorkrequirementId"); - - try { - printPage(response, vars, strWorkRequirement, strSequence); - } catch (ServletException ex) { - pageErrorCallOut(response); - } - } else - pageError(response); - } - - private void printPage(HttpServletResponse response, VariablesSecureApp vars, - String strWorkRequirement, String strSequence) throws IOException, ServletException { - if (log4j.isDebugEnabled()) - log4j.debug("Output: dataSheet"); - XmlDocument xmlDocument = xmlEngine.readXmlTemplate( - "org/openbravo/erpCommon/ad_callouts/CallOut").createXmlDocument(); - SLWorkRequirementSequence[] data = SLWorkRequirementSequence.select(this, strSequence); - - StringBuffer resultado = new StringBuffer(); - resultado.append("var calloutName='SL_WorkRequirement_Sequence';\n\n"); - resultado.append("var respuesta = new Array("); - resultado.append("new Array(\"inpmaProcessId\", \"" + data[0].maProcessId + "\"),"); - resultado.append("new Array(\"inpcostcenteruse\", \"" - + FormatUtilities.replaceJS(data[0].costcenteruse) + "\"),"); - resultado.append("new Array(\"inppreptime\", \"" + FormatUtilities.replaceJS(data[0].preptime) - + "\"),"); - resultado.append("new Array(\"inpnoqty\", " + FormatUtilities.replaceJS(data[0].noqty) + "),"); - resultado.append("new Array(\"inpgroupuse\", \"" + FormatUtilities.replaceJS(data[0].groupuse) - + "\")"); - resultado.append(");"); - - xmlDocument.setParameter("array", resultado.toString()); - response.setContentType("text/html; charset=UTF-8"); - PrintWriter out = response.getWriter(); - out.println(xmlDocument.print()); - out.close(); - } -} diff --git a/src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_Sequence.xsql b/src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_Sequence.xsql deleted file mode 100644 --- a/src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_Sequence.xsql +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!-- - ************************************************************************* - * The contents of this file are subject to the Openbravo Public License - * Version 1.1 (the "License"), being the Mozilla Public License - * Version 1.1 with a permitted attribution clause; you may not use this - * file except in compliance with the License. You may obtain a copy of - * the License at http://www.openbravo.com/legal/license.html - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * 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-2010 Openbravo SLU - * All Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ ---> - - - - - -<SqlClass name="SLWorkRequirementSequence" package="org.openbravo.erpCommon.ad_callouts"> - <SqlMethod name="select" type="preparedStatement" return="multiple"> - <SqlMethodComment></SqlMethodComment> - <Sql> - <![CDATA[ - SELECT s.MA_Process_ID, s.COSTCENTERUSE, s.PREPTIME, s.NOQTY, s.GROUPUSE, '' AS quantity - FROM MA_Sequence s - WHERE MA_Sequence_ID = ? - ]]> - </Sql> - <Parameter name="maSequenceId"/> - </SqlMethod> -</SqlClass> # HG changeset patch # User Víctor Martínez Romanos <victor.martinez@openbravo.com> # Date 1498478610 -7200 # Mon Jun 26 14:03:30 2017 +0200 # Node ID b3c51303cb5cf1d593cfda857fe5b65f0c424d1a # Parent d917c59ead15159b118cd1b36916f856b0f690de Fixed issue 36280 [calloutCleanup] SL_Invoice_Tax Removed callout as is is not used anymore diff --git a/src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Tax.java b/src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Tax.java deleted file mode 100644 --- a/src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Tax.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - ************************************************************************* - * The contents of this file are subject to the Openbravo Public License - * Version 1.1 (the "License"), being the Mozilla Public License - * Version 1.1 with a permitted attribution clause; you may not use this - * file except in compliance with the License. You may obtain a copy of - * the License at http://www.openbravo.com/legal/license.html - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * 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-2010 Openbravo SLU - * All Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ - */ -package org.openbravo.erpCommon.ad_callouts; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.openbravo.base.secureApp.HttpSecureAppServlet; -import org.openbravo.base.secureApp.VariablesSecureApp; -import org.openbravo.erpCommon.businessUtility.Tax; -import org.openbravo.erpCommon.utility.Utility; -import org.openbravo.xmlEngine.XmlDocument; - -public class SL_Invoice_Tax extends HttpSecureAppServlet { - private static final long serialVersionUID = 1L; - - public void init(ServletConfig config) { - super.init(config); - boolHist = false; - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, - ServletException { - VariablesSecureApp vars = new VariablesSecureApp(request); - if (vars.commandIn("DEFAULT")) { - String strChanged = vars.getStringParameter("inpLastFieldChanged"); - if (log4j.isDebugEnabled()) - log4j.debug("CHANGED: " + strChanged); - String strMProductID = vars.getStringParameter("inpmProductId"); - String strADOrgID = vars.getStringParameter("inpadOrgId"); - String strCInvoiceID = vars.getStringParameter("inpcInvoiceId"); - String strWindowId = vars.getStringParameter("inpwindowId"); - String strIsSOTrx = Utility.getContext(this, vars, "isSOTrx", strWindowId); - String strWharehouse = Utility.getContext(this, vars, "#M_Warehouse_ID", strWindowId); - String strTabId = vars.getStringParameter("inpTabId"); - - try { - printPage(response, vars, strMProductID, strADOrgID, strCInvoiceID, strIsSOTrx, - strWharehouse, strTabId); - } catch (ServletException ex) { - pageErrorCallOut(response); - } - } else - pageError(response); - } - - private void printPage(HttpServletResponse response, VariablesSecureApp vars, - String strMProductID, String strADOrgID, String strCInvoiceID, String strIsSOTrx, - String strWharehouse, String strTabId) throws IOException, ServletException { - if (log4j.isDebugEnabled()) - log4j.debug("Output: dataSheet"); - XmlDocument xmlDocument = xmlEngine.readXmlTemplate( - "org/openbravo/erpCommon/ad_callouts/CallOut").createXmlDocument(); - - StringBuffer resultado = new StringBuffer(); - resultado.append("var calloutName='SL_Invoice_Tax';\n\n"); - resultado.append("var respuesta = new Array("); - - SLInvoiceTaxData[] data = SLInvoiceTaxData.select(this, strCInvoiceID); - - String strCTaxID = Tax.get(this, strMProductID, data[0].dateinvoiced, strADOrgID, - strWharehouse, data[0].cBpartnerLocationId, data[0].cBpartnerLocationId, - data[0].cProjectId, strIsSOTrx.equals("Y")); - - resultado.append("new Array(\"inpcTaxId\", \"" + strCTaxID + "\")"); - - resultado.append(");"); - xmlDocument.setParameter("array", resultado.toString()); - xmlDocument.setParameter("frameName", "appFrame"); - response.setContentType("text/html; charset=UTF-8"); - PrintWriter out = response.getWriter(); - out.println(xmlDocument.print()); - out.close(); - } -} # HG changeset patch # User Víctor Martínez Romanos <victor.martinez@openbravo.com> # Date 1498478736 -7200 # Mon Jun 26 14:05:36 2017 +0200 # Node ID a741af004bfa46cbbe43fd789bea127e4a111731 # Parent b3c51303cb5cf1d593cfda857fe5b65f0c424d1a Fixed issue 36280 [calloutCleanup] SL_InOutLine_Locator* Removed callout and xsql file as they are not used anymore diff --git a/src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator.java b/src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator.java deleted file mode 100644 --- a/src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - ************************************************************************* - * The contents of this file are subject to the Openbravo Public License - * Version 1.1 (the "License"), being the Mozilla Public License - * Version 1.1 with a permitted attribution clause; you may not use this - * file except in compliance with the License. You may obtain a copy of - * the License at http://www.openbravo.com/legal/license.html - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * 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-2010 Openbravo SLU - * All Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ - */ -package org.openbravo.erpCommon.ad_callouts; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.openbravo.base.secureApp.HttpSecureAppServlet; -import org.openbravo.base.secureApp.VariablesSecureApp; -import org.openbravo.erpCommon.utility.Utility; -import org.openbravo.utils.FormatUtilities; -import org.openbravo.xmlEngine.XmlDocument; - -public class SL_InOutLine_Locator extends HttpSecureAppServlet { - private static final long serialVersionUID = 1L; - - public void init(ServletConfig config) { - super.init(config); - boolHist = false; - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, - ServletException { - VariablesSecureApp vars = new VariablesSecureApp(request); - if (vars.commandIn("DEFAULT")) { - String strChanged = vars.getStringParameter("inpLastFieldChanged"); - if (log4j.isDebugEnabled()) - log4j.debug("CHANGED: " + strChanged); - String strLocator = vars.getStringParameter("inpmLocatorId"); - String strWindowId = vars.getStringParameter("inpwindowId"); - String strIsSOTrx = Utility.getContext(this, vars, "isSOTrx", strWindowId); - String strTabId = vars.getStringParameter("inpTabId"); - - try { - printPage(response, vars, strLocator, strIsSOTrx, strTabId); - } catch (ServletException ex) { - pageErrorCallOut(response); - } - } else - pageError(response); - } - - private void printPage(HttpServletResponse response, VariablesSecureApp vars, String strLocator, - String strIsSOTrx, String strTabId) throws IOException, ServletException { - if (log4j.isDebugEnabled()) - log4j.debug("Output: dataSheet"); - XmlDocument xmlDocument = xmlEngine.readXmlTemplate( - "org/openbravo/erpCommon/ad_callouts/CallOut").createXmlDocument(); - - String Locator = "0"; - - Locator = SLInOutLineLocatorData.locator(this, strLocator); - - StringBuffer resultado = new StringBuffer(); - resultado.append("var calloutName='SL_InOutLine_Locator';\n\n"); - if (strIsSOTrx.equals("N") && !Locator.equals("0")) { - resultado.append("var respuesta = new Array("); - resultado.append("new Array(\"MESSAGE\", \"" - + FormatUtilities.replaceJS(Utility.messageBD(this, "FilledWarehouseLocator", - vars.getLanguage())) + "\")"); - resultado.append(");"); - } else - resultado.append("var respuesta = null;\n"); - if (log4j.isDebugEnabled()) - log4j.debug("Array: " + resultado.toString()); - xmlDocument.setParameter("array", resultado.toString()); - xmlDocument.setParameter("frameName", "appFrame"); - response.setContentType("text/html; charset=UTF-8"); - PrintWriter out = response.getWriter(); - out.println(xmlDocument.print()); - out.close(); - } -} diff --git a/src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator_data.xsql b/src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator_data.xsql deleted file mode 100644 --- a/src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator_data.xsql +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!-- - ************************************************************************* - * The contents of this file are subject to the Openbravo Public License - * Version 1.1 (the "License"), being the Mozilla Public License - * Version 1.1 with a permitted attribution clause; you may not use this - * file except in compliance with the License. You may obtain a copy of - * the License at http://www.openbravo.com/legal/license.html - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - * License for the specific language governing rights and limitations - * 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-2017 Openbravo SLU - * All Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ ---> - - - - - -<SqlClass name="SLInOutLineLocatorData" package="org.openbravo.erpCommon.ad_callouts"> - <SqlMethod name="select" type="preparedStatement" return="multiple"> - <SqlMethodComment></SqlMethodComment> - <Sql> - <![CDATA[ - SELECT * FROM DUAL - ]]> - </Sql> - </SqlMethod> - <SqlMethod name="locator" type="preparedStatement" return="String" default=""> - <SqlMethodComment></SqlMethodComment> - <Sql> - SELECT COALESCE(SUM(QTYONHAND),0) AS QTYONHAND FROM M_STORAGE_DETAIL - WHERE M_LOCATOR_ID = ? - </Sql> - <Parameter name="mLocatorId"/> - </SqlMethod> - <SqlMethod name="qtyonhandProduct" type="preparedStatement" return="String" default=""> - <SqlMethodComment>select to get the m_Locator_ID</SqlMethodComment> - <Sql> - <![CDATA[ - SELECT COALESCE(SUM(QTYONHAND),0) AS QTYONHAND FROM M_STORAGE_DETAIL - WHERE M_LOCATOR_ID = ? - AND M_PRODUCT_ID <> ? - ]]> - </Sql> - <Parameter name="mLocatorId"/> - <Parameter name="mProductId"/> - </SqlMethod> -</SqlClass> | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||||||||||||||||||||||||||||||
|
Notes | |
(0097708) vmromanos (manager) 2017-06-27 12:45 |
Most of these callouts can be safely removed because they are not referenced by any internal or external class. This will obviously create an API change with very low risk. However there are 3 callouts that won't be removed right now because they are referenced by a process. See 0036358 for details |
(0104473) hgbot (developer) 2018-05-11 13:58 |
Repository: erp/devel/api-checks Changeset: 3aec9468515a8265dce7b7d5e03ac5ddbab136ed Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> Date: Fri May 11 13:57:15 2018 +0200 URL: http://code.openbravo.com/erp/devel/api-checks/rev/3aec9468515a8265dce7b7d5e03ac5ddbab136ed [^] Fixes issue 36362: API change for issue 36280 --- M java/reference/java.japi.gz M model/src-db/database/sourcedata/AD_CALLOUT.xml --- |
(0104475) hgbot (developer) 2018-05-11 13:58 |
Repository: erp/devel/pi Changeset: 2db82514d5d58618fd8621ec5722e3b7a24c8f5e Author: Atul Gaware <atul.gaware <at> openbravo.com> Date: Wed May 02 23:46:36 2018 +0530 URL: http://code.openbravo.com/erp/devel/pi/rev/2db82514d5d58618fd8621ec5722e3b7a24c8f5e [^] Fixes Issue 36280:Several unused + probably unusable callouts exists and are candidates to be deleted. ** All the below callouts are not used in internal and external class and has a low risk to remove them. ** Removed java files for SE_Years_For_Calendar, SE_Calendar_For_Org and registers in ad_callout. ** Removed java files for SL_Payment_No_Verify, SL_MovementAll_Locator, SL_Payment_DocType & data xsql file, SL_Payment_Amounts, SL_WorkRequirement_Sequence & xsql file, SL_Invoice_Tax, SL_InOutLine_Locator & data xsql file. --- M src-db/database/sourcedata/AD_CALLOUT.xml R src/org/openbravo/erpCommon/ad_callouts/SE_Calendar_For_Org.java R src/org/openbravo/erpCommon/ad_callouts/SE_Years_For_Calendar.java R src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator.java R src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator_data.xsql R src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Tax.java R src/org/openbravo/erpCommon/ad_callouts/SL_MovementAll_Locator.java R src/org/openbravo/erpCommon/ad_callouts/SL_Payment_Amounts.java R src/org/openbravo/erpCommon/ad_callouts/SL_Payment_DocType.java R src/org/openbravo/erpCommon/ad_callouts/SL_Payment_DocType_data.xsql R src/org/openbravo/erpCommon/ad_callouts/SL_Payment_No_Verify.java R src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_Sequence.java R src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_Sequence.xsql --- |
(0104476) hgbot (developer) 2018-05-11 13:58 |
Repository: erp/devel/pi Changeset: 2663ab08fb3f48cd010666fb0c5e58fc276dd25d Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> Date: Fri May 11 10:13:35 2018 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/2663ab08fb3f48cd010666fb0c5e58fc276dd25d [^] Related to issue 36280: Remove SL_Payment_Amounts_data.xsql --- R src/org/openbravo/erpCommon/ad_callouts/SL_Payment_Amounts_data.xsql --- |
(0104480) aferraz (manager) 2018-05-11 13:59 |
Code review + Testing OK |
(0104495) hudsonbot (developer) 2018-05-14 13:09 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ed385e0e027b [^] Maturity status: Test |
(0104496) hudsonbot (developer) 2018-05-14 13:09 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ed385e0e027b [^] Maturity status: Test |
Issue History | |||
Date Modified | Username | Field | Change |
2017-06-19 18:16 | shuehner | New Issue | |
2017-06-19 18:16 | shuehner | Assigned To | => Triage Finance |
2017-06-19 18:16 | shuehner | Modules | => Core |
2017-06-19 18:16 | shuehner | Triggers an Emergency Pack | => No |
2017-06-19 18:16 | shuehner | Relationship added | related to 0036279 |
2017-06-27 12:23 | vmromanos | Status | new => scheduled |
2017-06-27 12:23 | vmromanos | Assigned To | Triage Finance => vmromanos |
2017-06-27 12:42 | vmromanos | Relationship added | related to 0036358 |
2017-06-27 12:45 | vmromanos | Note Added: 0097708 | |
2017-06-27 13:36 | vmromanos | File Added: 36280.diff | |
2017-06-27 14:12 | vmromanos | Relationship added | depends on 0036362 |
2017-09-22 15:14 | aferraz | Relationship added | related to 0036067 |
2018-04-16 11:59 | shuehner | Relationship added | blocks 0032688 |
2018-04-25 10:05 | dmiguelez | Assigned To | vmromanos => AtulOpenbravo |
2018-05-11 13:58 | hgbot | Checkin | |
2018-05-11 13:58 | hgbot | Note Added: 0104473 | |
2018-05-11 13:58 | hgbot | Checkin | |
2018-05-11 13:58 | hgbot | Note Added: 0104475 | |
2018-05-11 13:58 | hgbot | Status | scheduled => resolved |
2018-05-11 13:58 | hgbot | Resolution | open => fixed |
2018-05-11 13:58 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/2db82514d5d58618fd8621ec5722e3b7a24c8f5e [^] |
2018-05-11 13:58 | hgbot | Checkin | |
2018-05-11 13:58 | hgbot | Note Added: 0104476 | |
2018-05-11 13:59 | aferraz | Review Assigned To | => aferraz |
2018-05-11 13:59 | aferraz | Note Added: 0104480 | |
2018-05-11 13:59 | aferraz | Status | resolved => closed |
2018-05-11 13:59 | aferraz | Fixed in Version | => 3.0PR18Q3 |
2018-05-14 13:09 | hudsonbot | Checkin | |
2018-05-14 13:09 | hudsonbot | Note Added: 0104495 | |
2018-05-14 13:09 | hudsonbot | Checkin | |
2018-05-14 13:09 | hudsonbot | Note Added: 0104496 |
Copyright © 2000 - 2009 MantisBT Group |