details: http://code.openbravo.com/erp/devel/pi/rev/89bb61b36cb4 changeset: 3560:89bb61b36cb4 user: Areef Basha <areef.basha <at> openbravo.com> date: Thu Apr 09 10:35:27 2009 -0400 summary: Fixes bug 8372: Reports shows data of all organizations. Now the report will be filtered by the organization (and sub-organizations tree) the user is logged with.
diffstat: src/org/openbravo/erpCommon/ad_reports/ReportInvoiceVendorDimensionalAnalysesJR.java | 11 +++-- src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesJR.java | 9 ++-- src/org/openbravo/erpCommon/ad_reports/ReportPurchaseDimensionalAnalysesJR.java | 9 ++-- src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalyses.java | 6 +- src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalysesPDF.java | 4 +- src/org/openbravo/erpCommon/ad_reports/ReportSalesDimensionalAnalyzeJR.java | 7 ++- src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJR.java | 9 ++-- src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceJR.java | 7 +-- 8 files changed, 29 insertions(+), 33 deletions(-) diffs (289 lines): diff -r 6e8a345631a3 -r 89bb61b36cb4 src/org/openbravo/erpCommon/ad_reports/ReportInvoiceVendorDimensionalAnalysesJR.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceVendorDimensionalAnalysesJR.java Wed Apr 08 23:24:47 2009 +0200 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceVendorDimensionalAnalysesJR.java Thu Apr 09 10:35:27 2009 -0400 @@ -71,7 +71,7 @@ String strShown = vars.getInGlobalVariable("inpShown", "ReportInvoiceVendorDimensionalAnalysesJR|shown", ""); String strOrg = vars.getGlobalVariable("inpOrg", - "ReportInvoiceVendorDimensionalAnalysesJR|Org", "0"); + "ReportInvoiceVendorDimensionalAnalysesJR|Org", ""); String strOrder = vars.getGlobalVariable("inpOrder", "ReportInvoiceVendorDimensionalAnalysesJR|order", "Normal"); String strMayor = vars.getGlobalVariable("inpMayor", @@ -111,8 +111,8 @@ "ReportInvoiceVendorDimensionalAnalysesJR|product"); String strNotShown = vars.getInStringParameter("inpNotShown"); String strShown = vars.getInStringParameter("inpShown"); - String strOrg = vars.getGlobalVariable("inpOrg", - "ReportInvoiceVendorDimensionalAnalysesJR|Org", "0"); + String strOrg = vars.getRequestGlobalVariable("inpOrg", + "ReportInvoiceVendorDimensionalAnalysesJR|Org"); String strOrder = vars.getRequestGlobalVariable("inpOrder", "ReportInvoiceVendorDimensionalAnalysesJR|order"); String strMayor = vars.getStringParameter("inpMayor", ""); @@ -145,8 +145,8 @@ "ReportInvoiceVendorDimensionalAnalysesJR|product"); String strNotShown = vars.getInStringParameter("inpNotShown"); String strShown = vars.getInStringParameter("inpShown"); - String strOrg = vars.getGlobalVariable("inpOrg", - "ReportInvoiceVendorDimensionalAnalysesJR|Org", "0"); + String strOrg = vars.getRequestGlobalVariable("inpOrg", + "ReportInvoiceVendorDimensionalAnalysesJR|Org"); String strOrder = vars.getRequestGlobalVariable("inpOrder", "ReportInvoiceVendorDimensionalAnalysesJR|order"); String strMayor = vars.getStringParameter("inpMayor", ""); @@ -338,6 +338,7 @@ String[] discard1 = { "selEliminarBody1", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard" }; + if (strOrg.equals("")) strOrg = vars.getOrg(); if (strComparative.equals("Y")) discard1[0] = "selEliminarBody2"; String strTitle = ""; diff -r 6e8a345631a3 -r 89bb61b36cb4 src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesJR.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesJR.java Wed Apr 08 23:24:47 2009 +0200 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesJR.java Thu Apr 09 10:35:27 2009 -0400 @@ -74,7 +74,7 @@ String strShown = vars.getInGlobalVariable("inpShown", "ReportMaterialDimensionalAnalysesJR|shown", ""); String strOrg = vars.getGlobalVariable("inpOrg", "ReportMaterialDimensionalAnalysesJR|org", - "0"); + ""); String strOrder = vars.getGlobalVariable("inpOrder", "ReportMaterialDimensionalAnalysesJR|order", "Normal"); String strMayor = vars.getGlobalVariable("inpMayor", @@ -112,8 +112,7 @@ "ReportMaterialDimensionalAnalysesJR|product"); String strNotShown = vars.getInStringParameter("inpNotShown"); String strShown = vars.getInStringParameter("inpShown"); - String strOrg = vars.getGlobalVariable("inpOrg", "ReportMaterialDimensionalAnalysesJR|org", - "0"); + String strOrg = vars.getRequestGlobalVariable("inpOrg", "ReportMaterialDimensionalAnalysesJR|org"); String strOrder = vars.getRequestGlobalVariable("inpOrder", "ReportMaterialDimensionalAnalysesJR|order"); String strMayor = vars.getStringParameter("inpMayor", ""); @@ -144,8 +143,7 @@ "ReportMaterialDimensionalAnalysesJR|product"); String strNotShown = vars.getInStringParameter("inpNotShown"); String strShown = vars.getInStringParameter("inpShown"); - String strOrg = vars.getGlobalVariable("inpOrg", "ReportMaterialDimensionalAnalysesJR|org", - "0"); + String strOrg = vars.getRequestGlobalVariable("inpOrg", "ReportMaterialDimensionalAnalysesJR|org"); String strOrder = vars.getRequestGlobalVariable("inpOrder", "ReportMaterialDimensionalAnalysesJR|order"); String strMayor = vars.getStringParameter("inpMayor", ""); @@ -318,6 +316,7 @@ String[] discard1 = { "selEliminarBody1", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard" }; + if (strOrg.equals("")) strOrg = vars.getOrg(); if (strComparative.equals("Y")) discard1[0] = "selEliminarBody2"; String strTitle = ""; diff -r 6e8a345631a3 -r 89bb61b36cb4 src/org/openbravo/erpCommon/ad_reports/ReportPurchaseDimensionalAnalysesJR.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportPurchaseDimensionalAnalysesJR.java Wed Apr 08 23:24:47 2009 +0200 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportPurchaseDimensionalAnalysesJR.java Thu Apr 09 10:35:27 2009 -0400 @@ -75,7 +75,7 @@ String strShown = vars.getInGlobalVariable("inpShown", "ReportPurchaseDimensionalAnalysesJR|shown", ""); String strOrg = vars.getGlobalVariable("inpOrg", "ReportPurchaseDimensionalAnalysesJR|org", - "0"); + ""); String strOrder = vars.getGlobalVariable("inpOrder", "ReportPurchaseDimensionalAnalysesJR|order", "Normal"); String strMayor = vars.getGlobalVariable("inpMayor", @@ -113,8 +113,7 @@ "ReportPurchaseDimensionalAnalysesJR|product"); String strNotShown = vars.getInStringParameter("inpNotShown"); String strShown = vars.getInStringParameter("inpShown"); - String strOrg = vars.getGlobalVariable("inpOrg", "ReportPurchaseDimensionalAnalysesJR|org", - "0"); + String strOrg = vars.getRequestGlobalVariable("inpOrg", "ReportPurchaseDimensionalAnalysesJR|org"); String strOrder = vars.getRequestGlobalVariable("inpOrder", "ReportPurchaseDimensionalAnalysesJR|order"); String strMayor = vars.getStringParameter("inpMayor", ""); @@ -145,8 +144,7 @@ "ReportPurchaseDimensionalAnalysesJR|product"); String strNotShown = vars.getInStringParameter("inpNotShown"); String strShown = vars.getInStringParameter("inpShown"); - String strOrg = vars.getGlobalVariable("inpOrg", "ReportPurchaseDimensionalAnalysesJR|org", - "0"); + String strOrg = vars.getRequestGlobalVariable("inpOrg", "ReportPurchaseDimensionalAnalysesJR|org"); String strOrder = vars.getRequestGlobalVariable("inpOrder", "ReportPurchaseDimensionalAnalysesJR|order"); String strMayor = vars.getStringParameter("inpMayor", ""); @@ -321,6 +319,7 @@ String[] discard1 = { "selEliminarBody1", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard" }; + if (strOrg.equals("")) strOrg = vars.getOrg(); if (strComparative.equals("Y")) discard1[0] = "selEliminarBody2"; String strTitle = ""; diff -r 6e8a345631a3 -r 89bb61b36cb4 src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalyses.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalyses.java Wed Apr 08 23:24:47 2009 +0200 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalyses.java Thu Apr 09 10:35:27 2009 -0400 @@ -80,7 +80,7 @@ String strShown = vars.getInGlobalVariable("inpShown", "ReportRefundSalesDimensionalAnalyses|shown", ""); String strOrg = vars.getGlobalVariable("inpOrg", "ReportRefundSalesDimensionalAnalyses|org", - "0"); + ""); String strsalesrepId = vars.getGlobalVariable("inpSalesrepId", "ReportRefundSalesDimensionalAnalyses|salesrep", ""); String strmWarehouseId = vars.getGlobalVariable("inpmWarehouseId", @@ -127,8 +127,7 @@ "ReportRefundSalesDimensionalAnalyses|product"); String strNotShown = vars.getInStringParameter("inpNotShown"); String strShown = vars.getInStringParameter("inpShown"); - String strOrg = vars.getGlobalVariable("inpOrg", "ReportRefundSalesDimensionalAnalyses|org", - "0"); + String strOrg = vars.getRequestGlobalVariable("inpOrg", "ReportRefundSalesDimensionalAnalyses|org"); String strsalesrepId = vars.getRequestGlobalVariable("inpSalesrepId", "ReportRefundSalesDimensionalAnalyses|salesrep"); String strmWarehouseId = vars.getRequestGlobalVariable("inpmWarehouseId", @@ -348,6 +347,7 @@ "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard" }; + if (strOrg.equals("")) strOrg = vars.getOrg(); if (strComparative.equals("Y")) discard1[0] = "selEliminarBody2"; String strTitle = ""; diff -r 6e8a345631a3 -r 89bb61b36cb4 src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalysesPDF.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalysesPDF.java Wed Apr 08 23:24:47 2009 +0200 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalysesPDF.java Thu Apr 09 10:35:27 2009 -0400 @@ -70,8 +70,7 @@ "ReportRefundSalesDimensionalAnalyses|product"); String strNotShown = vars.getInStringParameter("inpNotShown"); String strShown = vars.getInStringParameter("inpShown"); - String strOrg = vars.getGlobalVariable("inpOrg", "ReportRefundSalesDimensionalAnalyses|org", - "0"); + String strOrg = vars.getRequestGlobalVariable("inpOrg", "ReportRefundSalesDimensionalAnalyses|org"); String strsalesrepId = vars.getRequestGlobalVariable("inpSalesrepId", "ReportRefundSalesDimensionalAnalyses|salesrep"); String strmWarehouseId = vars.getRequestGlobalVariable("inpmWarehouseId", @@ -112,6 +111,7 @@ "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard" }; + if (strOrg.equals("")) strOrg = vars.getOrg(); if (strComparative.equals("Y")) discard1[0] = "selEliminarBody2"; String strTitle = ""; diff -r 6e8a345631a3 -r 89bb61b36cb4 src/org/openbravo/erpCommon/ad_reports/ReportSalesDimensionalAnalyzeJR.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportSalesDimensionalAnalyzeJR.java Wed Apr 08 23:24:47 2009 +0200 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportSalesDimensionalAnalyzeJR.java Thu Apr 09 10:35:27 2009 -0400 @@ -76,7 +76,7 @@ "ReportSalesDimensionalAnalyzeJR|notShown", ""); String strShown = vars.getInGlobalVariable("inpShown", "ReportSalesDimensionalAnalyzeJR|shown", ""); - String strOrg = vars.getGlobalVariable("inpOrg", "ReportSalesDimensionalAnalyzeJR|org", "0"); + String strOrg = vars.getGlobalVariable("inpOrg", "ReportSalesDimensionalAnalyzeJR|org", ""); String strsalesrepId = vars.getGlobalVariable("inpSalesrepId", "ReportSalesDimensionalAnalyzeJR|salesrep", ""); String strOrder = vars.getGlobalVariable("inpOrder", "ReportSalesDimensionalAnalyzeJR|order", @@ -121,7 +121,7 @@ "ReportSalesDimensionalAnalyzeJR|warehouse"); String strNotShown = vars.getInStringParameter("inpNotShown"); String strShown = vars.getInStringParameter("inpShown"); - String strOrg = vars.getGlobalVariable("inpOrg", "ReportSalesDimensionalAnalyzeJR|org", "0"); + String strOrg = vars.getRequestGlobalVariable("inpOrg", "ReportSalesDimensionalAnalyzeJR|org"); String strsalesrepId = vars.getRequestGlobalVariable("inpSalesrepId", "ReportSalesDimensionalAnalyzeJR|salesrep"); String strOrder = vars.getRequestGlobalVariable("inpOrder", @@ -158,7 +158,7 @@ "ReportSalesDimensionalAnalyzeJR|warehouse"); String strNotShown = vars.getInStringParameter("inpNotShown"); String strShown = vars.getInStringParameter("inpShown"); - String strOrg = vars.getGlobalVariable("inpOrg", "ReportSalesDimensionalAnalyzeJR|org", "0"); + String strOrg = vars.getRequestGlobalVariable("inpOrg", "ReportSalesDimensionalAnalyzeJR|org"); String strsalesrepId = vars.getRequestGlobalVariable("inpSalesrepId", "ReportSalesDimensionalAnalyzeJR|salesrep"); String strOrder = vars.getRequestGlobalVariable("inpOrder", @@ -384,6 +384,7 @@ "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard" }; + if (strOrg.equals("")) strOrg = vars.getOrg(); if (strComparative.equals("Y")) discard1[0] = "selEliminarBody2"; String strTitle = ""; diff -r 6e8a345631a3 -r 89bb61b36cb4 src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJR.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJR.java Wed Apr 08 23:24:47 2009 +0200 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJR.java Thu Apr 09 10:35:27 2009 -0400 @@ -74,7 +74,7 @@ String strShown = vars.getInGlobalVariable("inpShown", "ReportShipmentDimensionalAnalyzeJR|shown", ""); String strOrg = vars.getGlobalVariable("inpOrg", "ReportShipmentDimensionalAnalyzeJR|org", - "0"); + ""); String strmWarehouseId = vars.getGlobalVariable("inpmWarehouseId", "ReportShipmentDimensionalAnalyzeJR|warehouse", ""); String strsalesrepId = vars.getGlobalVariable("inpSalesrepId", @@ -121,8 +121,7 @@ String strShown = vars.getInStringParameter("inpShown"); String strmWarehouseId = vars.getRequestGlobalVariable("inpmWarehouseId", "ReportShipmentDimensionalAnalyzeJR|warehouse"); - String strOrg = vars.getGlobalVariable("inpOrg", "ReportShipmentDimensionalAnalyzeJR|org", - "0"); + String strOrg = vars.getRequestGlobalVariable("inpOrg", "ReportShipmentDimensionalAnalyzeJR|org"); String strsalesrepId = vars.getRequestGlobalVariable("inpSalesrepId", "ReportShipmentDimensionalAnalyzeJR|salesrep"); String strOrder = vars.getRequestGlobalVariable("inpOrder", @@ -159,8 +158,7 @@ String strShown = vars.getInStringParameter("inpShown"); String strmWarehouseId = vars.getRequestGlobalVariable("inpmWarehouseId", "ReportShipmentDimensionalAnalyzeJR|warehouse"); - String strOrg = vars.getGlobalVariable("inpOrg", "ReportShipmentDimensionalAnalyzeJR|org", - "0"); + String strOrg = vars.getRequestGlobalVariable("inpOrg", "ReportShipmentDimensionalAnalyzeJR|org"); String strsalesrepId = vars.getRequestGlobalVariable("inpSalesrepId", "ReportShipmentDimensionalAnalyzeJR|salesrep"); String strOrder = vars.getRequestGlobalVariable("inpOrder", @@ -399,6 +397,7 @@ "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard", "discard" }; + if (strOrg.equals("")) strOrg = vars.getOrg(); if (strComparative.equals("Y")) discard1[0] = "selEliminarBody2"; String strTitle = ""; diff -r 6e8a345631a3 -r 89bb61b36cb4 src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceJR.java --- a/src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceJR.java Wed Apr 08 23:24:47 2009 +0200 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceJR.java Thu Apr 09 10:35:27 2009 -0400 @@ -57,7 +57,7 @@ if (vars.commandIn("DEFAULT")) { String strDateFrom = vars.getGlobalVariable("inpDateFrom", "ReportTaxInvoiceJR|DateFrom", ""); String strDateTo = vars.getGlobalVariable("inpDateTo", "ReportTaxInvoiceJR|DateTo", ""); - String strOrg = vars.getGlobalVariable("inpOrg", "ReportTaxInvoiceJR|Org", "0"); + String strOrg = vars.getGlobalVariable("inpOrg", "ReportTaxInvoiceJR|Org", ""); String strDetail = vars.getStringParameter("inpDetalle", "-1"); String strSales = vars.getStringParameter("inpSales", "S"); printPageDataSheet(response, vars, strDateFrom, strDateTo, strOrg, strDetail, strSales); @@ -66,8 +66,6 @@ "ReportTaxInvoiceJR|DateFrom"); String strDateTo = vars.getRequestGlobalVariable("inpDateTo", "ReportTaxInvoiceJR|DateTo"); String strOrg = vars.getRequestGlobalVariable("inpOrg", "ReportTaxInvoiceJR|Org"); - if (strOrg.equals("")) - strOrg = "0"; String strDetail = vars.getStringParameter("inpDetalle"); String strSales = vars.getStringParameter("inpSales"); printPageDataHtml(response, vars, strDateFrom, strDateTo, strOrg, strDetail, strSales, "html"); @@ -76,8 +74,6 @@ "ReportTaxInvoiceJR|DateFrom"); String strDateTo = vars.getRequestGlobalVariable("inpDateTo", "ReportTaxInvoiceJR|DateTo"); String strOrg = vars.getRequestGlobalVariable("inpOrg", "ReportTaxInvoiceJR|Org"); - if (strOrg.equals("")) - strOrg = "0"; String strDetail = vars.getStringParameter("inpDetalle"); String strSales = vars.getStringParameter("inpSales"); printPageDataHtml(response, vars, strDateFrom, strDateTo, strOrg, strDetail, strSales, "xls"); @@ -93,6 +89,7 @@ response.setContentType("text/html; charset=UTF-8"); String strSale = ""; String strPurchase = ""; + if (strOrg.equals("")) strOrg = vars.getOrg(); if (log4j.isDebugEnabled()) log4j.debug("****** strSales: " + strSales + " fecha desde: " + strDateFrom + " fecha hasta: " + strDateTo + " detalle: " + strDetail); ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits