details: /erp/devel/main/rev/eb105fcc4400 changeset: 8578:eb105fcc4400 user: Antonio Moreno <antonio.moreno <at> openbravo.com> date: Tue Oct 19 09:29:36 2010 +0200 summary: Fixed issue 14091. Return early also in RemoveCheckChange.apply() method.
details: /erp/devel/main/rev/632808419bb4 changeset: 8579:632808419bb4 user: Sivaraman Rajagopal <sivaraman.rajagopal <at> openbravo.com> date: Tue Oct 19 17:13:17 2010 +0530 summary: Fixes issue 9422: CreateTaxReport & CreateAccountingReport: static class members As per the proposed solution, strTreeOrg has been moved to printPagePopup as local variable and passed into treeOrg as parameter. Please note, String type has been changed to StringBuffer in order to use treeOrg without having major changes. details: /erp/devel/main/rev/95c6f3deb9db changeset: 8580:95c6f3deb9db user: RM packaging bot <staff.rm <at> openbravo.com> date: Tue Oct 19 18:12:17 2010 +0000 summary: CI: promote changesets from pi to main diffstat: src-db/database/lib/dbsourcemanager.jar | 0 src-db/database/sourcedata/AD_MODULE.xml | 4 +- src/org/openbravo/erpCommon/ad_process/CreateAccountingReport.java | 35 +++++---- src/org/openbravo/erpCommon/ad_process/CreateTaxReport.java | 36 +++++----- 4 files changed, 39 insertions(+), 36 deletions(-) diffs (203 lines): diff -r 92f6a0d1457a -r 95c6f3deb9db src-db/database/lib/dbsourcemanager.jar Binary file src-db/database/lib/dbsourcemanager.jar has changed diff -r 92f6a0d1457a -r 95c6f3deb9db src-db/database/sourcedata/AD_MODULE.xml --- a/src-db/database/sourcedata/AD_MODULE.xml Tue Oct 19 11:42:00 2010 +0530 +++ b/src-db/database/sourcedata/AD_MODULE.xml Tue Oct 19 18:12:17 2010 +0000 @@ -6,7 +6,7 @@ <!--0--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> <!--0--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--0--> <NAME><![CDATA[Core]]></NAME> -<!--0--> <VERSION><![CDATA[2.50.18452]]></VERSION> +<!--0--> <VERSION><![CDATA[2.50.18579]]></VERSION> <!--0--> <DESCRIPTION><![CDATA[Core module is the base one]]></DESCRIPTION> <!--0--> <HELP><![CDATA[Core module is the base one, all developments in core are included as part of the standard Openbravo ERP.]]></HELP> <!--0--> <URL><![CDATA[www.openbravo.com]]></URL> @@ -22,7 +22,7 @@ <!--0--> <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE> <!--0--> <HASREFERENCEDATA><![CDATA[Y]]></HASREFERENCEDATA> <!--0--> <REFERENCEDATAINFO><![CDATA[Standard document types for orders, invoices, etc. and settings]]></REFERENCEDATAINFO> -<!--0--> <VERSION_LABEL><![CDATA[dev]]></VERSION_LABEL> +<!--0--> <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL> <!--0--> <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL> <!--0--></AD_MODULE> diff -r 92f6a0d1457a -r 95c6f3deb9db src/org/openbravo/erpCommon/ad_process/CreateAccountingReport.java --- a/src/org/openbravo/erpCommon/ad_process/CreateAccountingReport.java Tue Oct 19 11:42:00 2010 +0530 +++ b/src/org/openbravo/erpCommon/ad_process/CreateAccountingReport.java Tue Oct 19 18:12:17 2010 +0000 @@ -45,7 +45,6 @@ public class CreateAccountingReport extends HttpSecureAppServlet { private static final long serialVersionUID = 1L; - private static String strTreeOrg = ""; public void init(ServletConfig config) { super.init(config); @@ -97,9 +96,9 @@ pageErrorPopUp(response); } - private void printPage(HttpServletResponse response, VariablesSecureApp vars, String strcAcctSchemaId, - String strAccountingReportId, String strOrg, String strPeriod, String strYear, - String strProcessId) throws IOException, ServletException { + private void printPage(HttpServletResponse response, VariablesSecureApp vars, + String strcAcctSchemaId, String strAccountingReportId, String strOrg, String strPeriod, + String strYear, String strProcessId) throws IOException, ServletException { if (log4j.isDebugEnabled()) log4j.debug("Output: process CreateAccountingReport"); @@ -245,17 +244,16 @@ .getSqlDateFormat()); strPeriodTo = CreateAccountingReportData.selectFormat(this, strPeriodTo, vars .getSqlDateFormat()); - strTreeOrg = strOrg; - treeOrg(vars, strOrg); + StringBuilder strTreeOrg = new StringBuilder(strOrg); + treeOrg(vars, strOrg, strTreeOrg); Vector<Object> vectorArray = new Vector<Object>(); childData(vars, vectorArray, strcAcctSchemaId, strAccountingReportId, strPeriodFrom, - strPeriodTo, strTreeOrg, level, "0", strPeriod); + strPeriodTo, strTreeOrg.toString(), level, "0", strPeriod); CreateAccountingReportData[] dataTree = convertVector(vectorArray); dataTree = filterData(dataTree); - strTreeOrg = ""; xmlDocument.setParameter("title", dataTree[0].name); xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n"); @@ -268,7 +266,8 @@ out.close(); } - private String arrayEntry(VariablesSecureApp vars, String strcAcctSchemaId) throws ServletException { + private String arrayEntry(VariablesSecureApp vars, String strcAcctSchemaId) + throws ServletException { String result = ""; CreateAccountingReportData[] data = CreateAccountingReportData .selectAD_Accountingrpt_Element_ID(this, Utility.getContext(this, vars, "#User_Org", @@ -306,20 +305,23 @@ return result; } - private void treeOrg(VariablesSecureApp vars, String strOrg) throws ServletException { + private void treeOrg(VariablesSecureApp vars, String strOrg, StringBuilder treeOrg) + throws ServletException { CreateAccountingReportData[] dataOrg = CreateAccountingReportData.selectOrg(this, strOrg, vars .getClient()); for (int i = 0; i < dataOrg.length; i++) { - strTreeOrg += "," + dataOrg[i].id; + treeOrg.append(","); + treeOrg.append(dataOrg[i].id); if (dataOrg[i].issummary.equals("Y")) - treeOrg(vars, dataOrg[i].id); + treeOrg(vars, dataOrg[i].id, treeOrg); } return; } - private void childData(VariablesSecureApp vars, Vector<Object> vectorArray, String strcAcctSchemaId, - String strAccountingReportId, String strPeriodFrom, String strPeriodTo, String strOrg, - int level, String strParent, String strPeriod) throws IOException, ServletException { + private void childData(VariablesSecureApp vars, Vector<Object> vectorArray, + String strcAcctSchemaId, String strAccountingReportId, String strPeriodFrom, + String strPeriodTo, String strOrg, int level, String strParent, String strPeriod) + throws IOException, ServletException { if (log4j.isDebugEnabled()) log4j.debug("**********************strAccountingReportId: " + strAccountingReportId); if (log4j.isDebugEnabled()) @@ -378,7 +380,8 @@ } } - private CreateAccountingReportData[] convertVector(Vector<Object> vectorArray) throws ServletException { + private CreateAccountingReportData[] convertVector(Vector<Object> vectorArray) + throws ServletException { CreateAccountingReportData[] data = new CreateAccountingReportData[vectorArray.size()]; BigDecimal count = BigDecimal.ZERO; for (int i = 0; i < vectorArray.size(); i++) { diff -r 92f6a0d1457a -r 95c6f3deb9db src/org/openbravo/erpCommon/ad_process/CreateTaxReport.java --- a/src/org/openbravo/erpCommon/ad_process/CreateTaxReport.java Tue Oct 19 11:42:00 2010 +0530 +++ b/src/org/openbravo/erpCommon/ad_process/CreateTaxReport.java Tue Oct 19 18:12:17 2010 +0000 @@ -43,8 +43,6 @@ public class CreateTaxReport extends HttpSecureAppServlet { private static final long serialVersionUID = 1L; - private static String strTreeOrg = ""; - private static int rownum = 1; public void init(ServletConfig config) { super.init(config); @@ -74,9 +72,9 @@ pageErrorPopUp(response); } - private void printPage(HttpServletResponse response, VariablesSecureApp vars, String strTaxReportId, - String strDateFrom, String strDateTo, String strOrg, String strProcessId) throws IOException, - ServletException { + private void printPage(HttpServletResponse response, VariablesSecureApp vars, + String strTaxReportId, String strDateFrom, String strDateTo, String strOrg, + String strProcessId) throws IOException, ServletException { if (log4j.isDebugEnabled()) log4j.debug("Output: process CreateTaxReport"); @@ -168,24 +166,24 @@ out.close(); } - private void printPagePopUp(HttpServletResponse response, VariablesSecureApp vars, String strTaxReportId, - String strDateFrom, String strDateTo, String strOrg) throws IOException, ServletException { + private void printPagePopUp(HttpServletResponse response, VariablesSecureApp vars, + String strTaxReportId, String strDateFrom, String strDateTo, String strOrg) + throws IOException, ServletException { if (log4j.isDebugEnabled()) log4j.debug("Output: pop up CreateTaxReport"); XmlDocument xmlDocument = xmlEngine.readXmlTemplate( "org/openbravo/erpCommon/ad_process/CreateTaxReportPopUp").createXmlDocument(); int level = 0; - strTreeOrg = strOrg; - treeOrg(vars, strOrg); + StringBuilder strTreeOrg = new StringBuilder(strOrg); + treeOrg(vars, strOrg, strTreeOrg); Vector<Object> vectorArray = new Vector<Object>(); - childData(vars, vectorArray, strTaxReportId, strDateFrom, strDateTo, strTreeOrg, level, "0", - rownum); + childData(vars, vectorArray, strTaxReportId, strDateFrom, strDateTo, strTreeOrg.toString(), + level, "0", 1); CreateTaxReportData[] dataTree = convertVector(vectorArray); - strTreeOrg = ""; xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n"); xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";"); xmlDocument.setParameter("theme", vars.getTheme()); @@ -208,19 +206,21 @@ * (i<data.length-1) result += ",\n"; } result += ");"; } return result; } */ - private void treeOrg(VariablesSecureApp vars, String strOrg) throws ServletException { + private void treeOrg(VariablesSecureApp vars, String strOrg, StringBuilder treeOrg) + throws ServletException { CreateTaxReportData[] dataOrg = CreateTaxReportData.selectOrg(this, strOrg, vars.getClient()); for (int i = 0; i < dataOrg.length; i++) { - strTreeOrg += "," + dataOrg[i].id; + treeOrg.append(","); + treeOrg.append(dataOrg[i].id); if (dataOrg[i].issummary.equals("Y")) - treeOrg(vars, dataOrg[i].id); + treeOrg(vars, dataOrg[i].id, treeOrg); } return; } - private void childData(VariablesSecureApp vars, Vector<Object> vectorArray, String strTaxReportId, - String strPeriodFrom, String strPeriodTo, String strOrg, int level, String strParent, - int rownum) throws IOException, ServletException { + private void childData(VariablesSecureApp vars, Vector<Object> vectorArray, + String strTaxReportId, String strPeriodFrom, String strPeriodTo, String strOrg, int level, + String strParent, int rownum) throws IOException, ServletException { if (log4j.isDebugEnabled()) log4j.debug("**********************strTaxReportId: " + strTaxReportId); if (log4j.isDebugEnabled()) ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits