Fixes issue 9346: General Ledger Journal do not show more than one window: arrows are not working
authorDavid Alsasua <david.alsasua@openbravo.com>
Fri, 05 Jun 2009 15:26:05 +0200
changeset 3971 69fae109edc5
parent 3970 0d78ebecd303
child 3972 03036acb18fe
Fixes issue 9346: General Ledger Journal do not show more than one window: arrows are not working
src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java
--- a/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java	Fri Jun 05 11:35:29 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java	Fri Jun 05 15:26:05 2009 +0200
@@ -72,6 +72,8 @@
       log4j.debug("********DEFAULT***************  strShowClosing: " + strShowClosing);
       log4j.debug("********DEFAULT***************  strShowReg: " + strShowReg);
       log4j.debug("********DEFAULT***************  strShowOpening: " + strShowOpening);
+      if (vars.getSessionValue("ReportGeneralLedgerJournal.initRecordNumber", "0").equals("0"))
+        vars.setSessionValue("ReportGeneralLedgerJournal.initRecordNumber", "0");
       printPageDataSheet(response, vars, strDateFrom, strDateTo, strDocument, strOrg, strTable,
           strRecord, "", strcAcctSchemaId, strShowClosing, strShowReg, strShowOpening);
     } else if (vars.commandIn("DIRECT")) {
@@ -196,7 +198,8 @@
     ToolBar toolbar = new ToolBar(this, vars.getLanguage(), "ReportGeneralLedgerJournal", false,
         "", "", "imprimir();return false;", false, "ad_reports", strReplaceWith, false, true);
     toolbar.setEmail(false);
-    if (vars.commandIn("FIND")) {
+    if (vars.commandIn("FIND") || vars.commandIn("DEFAULT")
+        && !vars.getSessionValue("ReportGeneralLedgerJournal.initRecordNumber").equals("0")) {
       String strCheck = buildCheck(strShowClosing, strShowReg, strShowOpening);
       String strTreeOrg = ReportGeneralLedgerJournalData.treeOrg(this, vars.getClient());
       String strOrgFamily = getFamily(strTreeOrg, strOrg);