details:   https://code.openbravo.com/erp/devel/pi/rev/38468b49552f
changeset: 31529:38468b49552f
user:      Armaignac <collazoandy4 <at> gmail.com>
date:      Tue Feb 14 15:06:17 2017 -0500
summary:   Fix for issue 35266: General Ledger filter removed when paginating 
in GL Report

The General Ledger filter was removed when paginating in General Ledger Report
in HTML view

Now the General Ledger filter it's save in the session by the FIND action and 
get in the DEFAULT action
for showing in the report page

diffstat:

 src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r a28822293fdd -r 38468b49552f 
src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java
--- a/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java   Thu Feb 
16 12:22:58 2017 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java   Tue Feb 
14 15:06:17 2017 -0500
@@ -11,7 +11,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-2016 Openbravo SLU
+ * All portions are Copyright (C) 2001-2017 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -28,6 +28,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.lang.StringUtils;
 import org.openbravo.base.filter.IsIDFilter;
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
@@ -61,7 +62,10 @@
 
     if (vars.commandIn("DEFAULT")) {
       String strOrg = vars.getGlobalVariable("inpOrg", 
"ReportGeneralLedger|Org", vars.getOrg());
-      String strcAcctSchemaId = OBLedgerUtils.getOrgLedger(strOrg);
+      String strcAcctSchemaId = 
vars.getSessionValue("ReportGeneralLedger|cAcctSchemaId");
+      if (StringUtils.equals(strcAcctSchemaId, "")) {
+        strcAcctSchemaId = OBLedgerUtils.getOrgLedger(strOrg);
+      }
       String strDateFrom = vars
           .getGlobalVariable("inpDateFrom", "ReportGeneralLedger|DateFrom", 
"");
       String strDateTo = vars.getGlobalVariable("inpDateTo", 
"ReportGeneralLedger|DateTo", "");
@@ -103,6 +107,7 @@
           "ReportGeneralLedger|cAcctSchemaId");
       String strDateFrom = vars.getRequestGlobalVariable("inpDateFrom",
           "ReportGeneralLedger|DateFrom");
+      vars.setSessionValue("ReportGeneralLedger|cAcctSchemaId", 
strcAcctSchemaId);
       String strDateTo = vars.getRequestGlobalVariable("inpDateTo", 
"ReportGeneralLedger|DateTo");
       String strPageNo = vars.getRequestGlobalVariable("inpPageNo", 
"ReportGeneralLedger|PageNo");
       String strAmtFrom = vars.getNumericParameter("inpAmtFrom");

------------------------------------------------------------------------------
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

Reply via email to