details: https://code.openbravo.com/erp/devel/pi/rev/2db82514d5d5 changeset: 33945:2db82514d5d5 user: Atul Gaware <atul.gaware <at> openbravo.com> date: Wed May 02 23:46:36 2018 +0530 summary: 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. details: https://code.openbravo.com/erp/devel/pi/rev/2663ab08fb3f changeset: 33946:2663ab08fb3f user: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> date: Fri May 11 10:13:35 2018 +0200 summary: Related to issue 36280: Remove SL_Payment_Amounts_data.xsql details: https://code.openbravo.com/erp/devel/pi/rev/19590151cbb2 changeset: 33947:19590151cbb2 user: Atul Gaware <atul.gaware <at> openbravo.com> date: Tue May 08 22:32:12 2018 +0530 summary: Fixes Issue 0038487:"Suspense balancing" account used when invoice's total is zero and prepayment exists Prepayment Amount and Different amount should be posted to respective customer / vendor prepayment and receivable/payable accounts when there is difference in between invoice grossamt (grandtotal) and prepayment amount. Prior to this solution it was done only when grossamt is greater than prepayment amt. details: https://code.openbravo.com/erp/devel/pi/rev/324ddcc5adc9 changeset: 33948:324ddcc5adc9 user: Atul Gaware <atul.gaware <at> openbravo.com> date: Fri May 11 00:45:46 2018 +0530 summary: Fixes Issue 0038490: Empty error message is shown when processing a stock reservation without available stock and without attribute set value Use COALESCE(TO_CHAR(cur_not_available.attributeName), '') to avoid null value in the description of attribute set instance with id 0 diffstat: src-db/database/model/functions/M_RESERVATION_POST.xml | 4 +- src-db/database/sourcedata/AD_CALLOUT.xml | 20 - src/org/openbravo/erpCommon/ad_callouts/SE_Calendar_For_Org.java | 99 ---- src/org/openbravo/erpCommon/ad_callouts/SE_Years_For_Calendar.java | 100 ---- src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator.java | 94 ---- src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator_data.xsql | 65 --- src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Tax.java | 96 ---- src/org/openbravo/erpCommon/ad_callouts/SL_MovementAll_Locator.java | 97 ---- src/org/openbravo/erpCommon/ad_callouts/SL_Payment_Amounts.java | 214 ---------- src/org/openbravo/erpCommon/ad_callouts/SL_Payment_Amounts_data.xsql | 53 -- src/org/openbravo/erpCommon/ad_callouts/SL_Payment_DocType.java | 93 ---- src/org/openbravo/erpCommon/ad_callouts/SL_Payment_DocType_data.xsql | 49 -- src/org/openbravo/erpCommon/ad_callouts/SL_Payment_No_Verify.java | 105 ---- src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_Sequence.java | 88 ---- src/org/openbravo/erpCommon/ad_callouts/SL_WorkRequirement_Sequence.xsql | 37 - src/org/openbravo/erpCommon/ad_forms/DocInvoice.java | 4 +- 16 files changed, 4 insertions(+), 1214 deletions(-) diffs (truncated from 1321 to 300 lines): diff -r 8ba7ab55dd7a -r 324ddcc5adc9 src-db/database/model/functions/M_RESERVATION_POST.xml --- a/src-db/database/model/functions/M_RESERVATION_POST.xml Mon May 07 18:21:59 2018 -0400 +++ b/src-db/database/model/functions/M_RESERVATION_POST.xml Fri May 11 00:45:46 2018 +0530 @@ -25,7 +25,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) 2012-2017 Openbravo SLU +* All portions are Copyright (C) 2012-2018 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************/ @@ -204,7 +204,7 @@ AND rs.m_reservation_id = v_reservation_id AND rs.m_locator_id IS NOT NULL ) LOOP - RAISE_APPLICATION_ERROR(-20000, '@NotEnoughAvailableStock@ : ' || cur_not_available.locatorName || ' - ' || cur_not_available.attributeName); + RAISE_APPLICATION_ERROR(-20000, '@NotEnoughAvailableStock@ : ' || cur_not_available.locatorName || ' - ' || COALESCE(TO_CHAR(cur_not_available.attributeName), '')); END LOOP; -- Check that prereserved quantity is equal all lower than ordered quantity diff -r 8ba7ab55dd7a -r 324ddcc5adc9 src-db/database/sourcedata/AD_CALLOUT.xml --- a/src-db/database/sourcedata/AD_CALLOUT.xml Mon May 07 18:21:59 2018 -0400 +++ b/src-db/database/sourcedata/AD_CALLOUT.xml Fri May 11 00:45:46 2018 +0530 @@ -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> @@ -1136,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 -r 8ba7ab55dd7a -r 324ddcc5adc9 src/org/openbravo/erpCommon/ad_callouts/SE_Calendar_For_Org.java --- a/src/org/openbravo/erpCommon/ad_callouts/SE_Calendar_For_Org.java Mon May 07 18:21:59 2018 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -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(); - - } -} diff -r 8ba7ab55dd7a -r 324ddcc5adc9 src/org/openbravo/erpCommon/ad_callouts/SE_Years_For_Calendar.java --- a/src/org/openbravo/erpCommon/ad_callouts/SE_Years_For_Calendar.java Mon May 07 18:21:59 2018 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -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(); - - } -} diff -r 8ba7ab55dd7a -r 324ddcc5adc9 src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator.java --- a/src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Locator.java Mon May 07 18:21:59 2018 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -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; ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits