details: /erp/devel/pi/rev/a52eba12f88f changeset: 12511:a52eba12f88f user: Stefan Hühner <stefan.huehner <at> openbravo.com> date: Fri May 27 11:26:03 2011 +0200 summary: [cleanup] Remove unused file for ReportTaxInvoice.java (as currently used version of it is in ReportTaxInvoiceJR.java)
diffstat: src-db/database/sourcedata/AD_TEXTINTERFACES.xml | 22 - src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoice.java | 617 ---------- src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceEdit.html | 212 --- src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceEdit.xml | 84 - src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoice_Excel.html | 89 - src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoice_Excel.xml | 68 - 6 files changed, 0 insertions(+), 1092 deletions(-) diffs (truncated from 1125 to 300 lines): diff -r 339a81060432 -r a52eba12f88f src-db/database/sourcedata/AD_TEXTINTERFACES.xml --- a/src-db/database/sourcedata/AD_TEXTINTERFACES.xml Fri May 27 08:28:40 2011 +0200 +++ b/src-db/database/sourcedata/AD_TEXTINTERFACES.xml Fri May 27 11:26:03 2011 +0200 @@ -1,27 +1,5 @@ <?xml version='1.0' encoding='UTF-8'?> <data> -<!--800002--><AD_TEXTINTERFACES> -<!--800002--> <AD_TEXTINTERFACES_ID><![CDATA[800002]]></AD_TEXTINTERFACES_ID> -<!--800002--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> -<!--800002--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> -<!--800002--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> -<!--800002--> <TEXT><![CDATA[Daily occupation summary report]]></TEXT> -<!--800002--> <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportTaxInvoice_Excel.html]]></FILENAME> -<!--800002--> <ISUSED><![CDATA[Y]]></ISUSED> -<!--800002--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> -<!--800002--></AD_TEXTINTERFACES> - -<!--800004--><AD_TEXTINTERFACES> -<!--800004--> <AD_TEXTINTERFACES_ID><![CDATA[800004]]></AD_TEXTINTERFACES_ID> -<!--800004--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> -<!--800004--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> -<!--800004--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> -<!--800004--> <TEXT><![CDATA[Nat.]]></TEXT> -<!--800004--> <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/ReportTaxInvoice_Excel.html]]></FILENAME> -<!--800004--> <ISUSED><![CDATA[Y]]></ISUSED> -<!--800004--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> -<!--800004--></AD_TEXTINTERFACES> - <!--800007--><AD_TEXTINTERFACES> <!--800007--> <AD_TEXTINTERFACES_ID><![CDATA[800007]]></AD_TEXTINTERFACES_ID> <!--800007--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> diff -r 339a81060432 -r a52eba12f88f src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoice.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoice.java Fri May 27 08:28:40 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,617 +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-2009 Openbravo SLU - * All Rights Reserved. - * Contributor(s): ______________________________________. - ************************************************************************ - */ -package org.openbravo.erpCommon.ad_reports; - -import java.io.IOException; -import java.io.PrintWriter; - -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.Tree; -import org.openbravo.erpCommon.businessUtility.TreeData; -import org.openbravo.erpCommon.businessUtility.WindowTabs; -import org.openbravo.erpCommon.utility.ComboTableData; -import org.openbravo.erpCommon.utility.DateTimeData; -import org.openbravo.erpCommon.utility.LeftTabsBar; -import org.openbravo.erpCommon.utility.NavigationBar; -import org.openbravo.erpCommon.utility.OBError; -import org.openbravo.erpCommon.utility.ToolBar; -import org.openbravo.erpCommon.utility.Utility; -import org.openbravo.xmlEngine.XmlDocument; - -public class ReportTaxInvoice extends HttpSecureAppServlet { - private static final long serialVersionUID = 1L; - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, - ServletException { - VariablesSecureApp vars = new VariablesSecureApp(request); - String strUserCurrencyId = Utility.stringBaseCurrencyId(this, vars.getClient()); - if (vars.commandIn("DEFAULT")) { - String strCurrencyId = vars.getGlobalVariable("inpCurrencyId","ReportTaxInvoice|currency", strUserCurrencyId); - String strDateFrom = vars.getGlobalVariable("inpDateFrom", "ReportTaxInvoice|DateFrom", ""); - String strDateTo = vars.getGlobalVariable("inpDateTo", "ReportTaxInvoice|DateTo", ""); - String strOrg = vars.getGlobalVariable("inpOrg", "ReportTaxInvoice|Org", "0"); - String strDetail = vars.getStringParameter("inpDetalle", "-1"); - String strSales = vars.getStringParameter("inpSales", "S"); - printPageDataSheet(response, vars, strDateFrom, strDateTo, strOrg, strDetail, strSales,strCurrencyId); - } else if (vars.commandIn("FIND")) { - String strCurrencyId = vars.getRequestGlobalVariable("inpCurrencyId","ReportTaxInvoice|currency"); - String strDateFrom = vars - .getRequestGlobalVariable("inpDateFrom", "ReportTaxInvoice|DateFrom"); - String strDateTo = vars.getRequestGlobalVariable("inpDateTo", "ReportTaxInvoice|DateTo"); - String strOrg = vars.getRequestGlobalVariable("inpOrg", "ReportTaxInvoice|Org"); - if (strOrg.equals("")) - strOrg = "0"; - String strDetail = vars.getStringParameter("inpDetalle"); - String strSales = vars.getStringParameter("inpSales"); - printPageDataHtml(response, vars, strDateFrom, strDateTo, strOrg, strDetail, strSales,strCurrencyId); - } else if (vars.commandIn("RELATION_XLS")) { - String strCurrencyId = vars.getRequestGlobalVariable("inpCurrencyId","ReportTaxInvoice|currency"); - String strDateFrom = vars - .getRequestGlobalVariable("inpDateFrom", "ReportTaxInvoice|DateFrom"); - String strDateTo = vars.getRequestGlobalVariable("inpDateTo", "ReportTaxInvoice|DateTo"); - String strOrg = vars.getRequestGlobalVariable("inpOrg", "ReportTaxInvoice|Org"); - if (strOrg.equals("")) - strOrg = "0"; - String strDetail = vars.getStringParameter("inpDetalle"); - String strSales = vars.getStringParameter("inpSales"); - printPageDataExcel(response, vars, strDateFrom, strDateTo, strOrg, strDetail, strSales,strCurrencyId); - } else - pageError(response); - } - - private void printPageDataHtml(HttpServletResponse response, VariablesSecureApp vars, - String strDateFrom, String strDateTo, String strOrg, String strDetail, String strSales,String strCurrencyId) - throws IOException, ServletException { - if (log4j.isDebugEnabled()) - log4j.debug("Output: dataSheet"); - response.setContentType("text/html; charset=UTF-8"); - PrintWriter out = response.getWriter(); - XmlDocument xmlDocument = null; - ReportTaxInvoiceData[] dataSale = null; - ReportTaxInvoiceData[] data2Sale = null; - ReportTaxInvoiceData[] dataPurchase = null; - ReportTaxInvoiceData[] data2Purchase = null; - String strTitle = "FACTURAS CON EL EXTRANJERO"; - String strSale = ""; - String strPurchase = ""; - String discard[] = { "discard", "discard", "discard", "discard" }; - if (log4j.isDebugEnabled()) - log4j.debug("****** strSales: " + strSales + " fecha desde: " + strDateFrom - + " fecha hasta: " + strDateTo + " detalle: " + strDetail); - /* - * if (strSales.equals("S")) strSalesAux = "Y"; else strSalesAux = "N"; - */ - if (strDateFrom.equals("") && strDateTo.equals("") && strDetail.equals("-1")) { - printPageDataSheet(response, vars, strDateFrom, strDateTo, strOrg, strDetail, strSales,strCurrencyId); - } else if (!strDetail.equals("-1")) { - if (log4j.isDebugEnabled()) - log4j.debug("****** not datailed"); - discard[0] = "selEliminarSale"; - discard[1] = "selEliminar1Sale"; - discard[2] = "selEliminarPurchase"; - discard[3] = "selEliminar1Purchase"; - if (strSales.equals("S")) { - dataSale = ReportTaxInvoiceData.select(this,strCurrencyId, Utility.getContext(this, vars, "C_Country_Id", - "ReportTaxInvoice"), - Utility.getContext(this, vars, "#User_Client", "ReportTaxInvoice"), strDateFrom, - DateTimeData.nDaysAfter(this, strDateTo, "1"), "Y", Tree.getMembers(this, TreeData - .getTreeOrg(this, vars.getClient()), strOrg)); - data2Sale = ReportTaxInvoiceData.selectForeign(this,strCurrencyId, Utility.getContext(this, vars, - "C_Country_Id", "ReportTaxInvoice"), Utility.getContext(this, vars, "#User_Client", - "ReportTaxInvoice"), strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), "Y", - Tree.getMembers(this, TreeData.getTreeOrg(this, vars.getClient()), strOrg)); - strSale = Utility.messageBD(this, "Sale", vars.getLanguage()); - } else if (strSales.equals("P")) { - dataPurchase = ReportTaxInvoiceData.select(this,strCurrencyId, Utility.getContext(this, vars, - "C_Country_Id", "ReportTaxInvoice"), Utility.getContext(this, vars, "#User_Client", - "ReportTaxInvoice"), strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), "N", - Tree.getMembers(this, TreeData.getTreeOrg(this,vars.getClient()), strOrg)); - data2Purchase = ReportTaxInvoiceData.selectForeign(this,strCurrencyId, Utility.getContext(this, vars, - "C_Country_Id", "ReportTaxInvoice"), Utility.getContext(this, vars, "#User_Client", - "ReportTaxInvoice"), strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), "N", - Tree.getMembers(this, TreeData.getTreeOrg(this, vars.getClient()), strOrg)); - strPurchase = Utility.messageBD(this, "Purchase", vars.getLanguage()); - } else { - dataSale = ReportTaxInvoiceData.select(this,strCurrencyId, Utility.getContext(this, vars, "C_Country_Id", - "ReportTaxInvoice"), - Utility.getContext(this, vars, "#User_Client", "ReportTaxInvoice"), strDateFrom, - DateTimeData.nDaysAfter(this, strDateTo, "1"), "Y", Tree.getMembers(this, TreeData - .getTreeOrg(this, vars.getClient()), strOrg)); - data2Sale = ReportTaxInvoiceData.selectForeign(this,strCurrencyId, Utility.getContext(this, vars, - "C_Country_Id", "ReportTaxInvoice"), Utility.getContext(this, vars, "#User_Client", - "ReportTaxInvoice"), strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), "Y", - Tree.getMembers(this, TreeData.getTreeOrg(this, vars.getClient()), strOrg)); - dataPurchase = ReportTaxInvoiceData.select(this,strCurrencyId, Utility.getContext(this, vars, - "C_Country_Id", "ReportTaxInvoice"), Utility.getContext(this, vars, "#User_Client", - "ReportTaxInvoice"), strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), "N", - Tree.getMembers(this, TreeData.getTreeOrg(this, vars.getClient()), strOrg)); - data2Purchase = ReportTaxInvoiceData.selectForeign(this,strCurrencyId, Utility.getContext(this, vars, - "C_Country_Id", "ReportTaxInvoice"), Utility.getContext(this, vars, "#User_Client", - "ReportTaxInvoice"), strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), "N", - Tree.getMembers(this, TreeData.getTreeOrg(this, vars.getClient()), strOrg)); - strSale = Utility.messageBD(this, "Sale", vars.getLanguage()); - strPurchase = Utility.messageBD(this, "Purchase", vars.getLanguage()); - } - } else { - if (log4j.isDebugEnabled()) - log4j.debug("****** detailed"); - if (strSales.equals("S")) { - dataSale = ReportTaxInvoiceData.select(this,strCurrencyId, Utility.getContext(this, vars, "C_Country_Id", - "ReportTaxInvoice"), - Utility.getContext(this, vars, "#User_Client", "ReportTaxInvoice"), strDateFrom, - DateTimeData.nDaysAfter(this, strDateTo, "1"), "Y", Tree.getMembers(this, TreeData - .getTreeOrg(this, vars.getClient()), strOrg)); - data2Sale = ReportTaxInvoiceData.selectForeign(this,strCurrencyId, Utility.getContext(this, vars, - "C_Country_Id", "ReportTaxInvoice"), Utility.getContext(this, vars, "#User_Client", - "ReportTaxInvoice"), strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), "Y", - Tree.getMembers(this, TreeData.getTreeOrg(this, vars.getClient()), strOrg)); - strSale = Utility.messageBD(this, "Sale", vars.getLanguage()); - } else if (strSales.equals("P")) { - dataPurchase = ReportTaxInvoiceData.select(this,strCurrencyId, Utility.getContext(this, vars, - "C_Country_Id", "ReportTaxInvoice"), Utility.getContext(this, vars, "#User_Client", - "ReportTaxInvoice"), strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), "N", - Tree.getMembers(this, TreeData.getTreeOrg(this, vars.getClient()), strOrg)); - data2Purchase = ReportTaxInvoiceData.selectForeign(this,strCurrencyId, Utility.getContext(this, vars, - "C_Country_Id", "ReportTaxInvoice"), Utility.getContext(this, vars, "#User_Client", - "ReportTaxInvoice"), strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), "N", - Tree.getMembers(this, TreeData.getTreeOrg(this, vars.getClient()), strOrg)); - strPurchase = Utility.messageBD(this, "Purchase", vars.getLanguage()); - } else { - dataSale = ReportTaxInvoiceData.select(this,strCurrencyId, Utility.getContext(this, vars, "C_Country_Id", - "ReportTaxInvoice"), - Utility.getContext(this, vars, "#User_Client", "ReportTaxInvoice"), strDateFrom, - DateTimeData.nDaysAfter(this, strDateTo, "1"), "Y", Tree.getMembers(this, TreeData - .getTreeOrg(this, vars.getClient()), strOrg)); - data2Sale = ReportTaxInvoiceData.selectForeign(this,strCurrencyId, Utility.getContext(this, vars, - "C_Country_Id", "ReportTaxInvoice"), Utility.getContext(this, vars, "#User_Client", - "ReportTaxInvoice"), strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), "Y", - Tree.getMembers(this, TreeData.getTreeOrg(this, vars.getClient()), strOrg)); - dataPurchase = ReportTaxInvoiceData.select(this,strCurrencyId, Utility.getContext(this, vars, - "C_Country_Id", "ReportTaxInvoice"), Utility.getContext(this, vars, "#User_Client", - "ReportTaxInvoice"), strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), "N", - Tree.getMembers(this, TreeData.getTreeOrg(this, vars.getClient()), strOrg)); - data2Purchase = ReportTaxInvoiceData.selectForeign(this,strCurrencyId, Utility.getContext(this, vars, - "C_Country_Id", "ReportTaxInvoice"), Utility.getContext(this, vars, "#User_Client", - "ReportTaxInvoice"), strDateFrom, DateTimeData.nDaysAfter(this, strDateTo, "1"), "N", - Tree.getMembers(this, TreeData.getTreeOrg(this, vars.getClient()), strOrg)); - strSale = Utility.messageBD(this, "Sale", vars.getLanguage()); - strPurchase = Utility.messageBD(this, "Purchase", vars.getLanguage()); - } - } - if (log4j.isDebugEnabled()) - log4j.debug("****** strSale: " + strSale + " strPurchase: " + strPurchase); - if (log4j.isDebugEnabled()) - log4j.debug("****** check nulls"); - if (dataSale == null || dataSale.length == 0) { - discard[0] = "sectionTaxSale"; - dataSale = ReportTaxInvoiceData.set(); - } - if (data2Sale == null || data2Sale.length == 0) { - discard[1] = "sectionTaxForeignSale"; - strTitle = ""; - data2Sale = ReportTaxInvoiceData.set(); - } - if (dataPurchase == null || dataPurchase.length == 0) { - discard[2] = "sectionTaxPurchase"; - dataPurchase = ReportTaxInvoiceData.set(); - } - if (data2Purchase == null || data2Purchase.length == 0) { - discard[3] = "sectionTaxForeignPurchase"; - strTitle = ""; - data2Purchase = ReportTaxInvoiceData.set(); - } - if (log4j.isDebugEnabled()) - log4j.debug("****** xmlDocument"); - xmlDocument = xmlEngine.readXmlTemplate( - "org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceEdit", discard).createXmlDocument(); - - xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n"); - xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";"); - xmlDocument.setParameter("theme", vars.getTheme()); - - if (log4j.isDebugEnabled()) - log4j.debug("****** setData dataSale"); - xmlDocument.setData("structure1Sale", dataSale); - if (log4j.isDebugEnabled()) - log4j.debug("****** setData data2Sale"); - xmlDocument.setData("structure2Sale", data2Sale); - if (log4j.isDebugEnabled()) - log4j.debug("****** setData dataPurchase"); - xmlDocument.setData("structure1Purchase", dataPurchase); - if (log4j.isDebugEnabled()) - log4j.debug("****** setData data2Purchase"); - xmlDocument.setData("structure2Purchase", data2Purchase); - - xmlDocument.setParameter("titleSale", strTitle); - xmlDocument.setParameter("titlePurchase", strTitle); - xmlDocument.setParameter("sale", strSale); - xmlDocument.setParameter("purchase", strPurchase); - out.println(xmlDocument.print()); - out.close(); - } - - private void printPageDataSheet(HttpServletResponse response, VariablesSecureApp vars, - String strDateFrom, String strDateTo, String strOrg, String strDetail, String strSales,String strCurrencyId) - throws IOException, ServletException { - if (log4j.isDebugEnabled()) - log4j.debug("Output: dataSheet"); - response.setContentType("text/html; charset=UTF-8"); - PrintWriter out = response.getWriter(); - XmlDocument xmlDocument = null; - - String strTitle = "FACTURAS CON EL EXTRANJERO"; - String strSale = ""; - String strPurchase = ""; ------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1 _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
