src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.html
author Atul Gaware <atul.gaware@openbravo.com>
Wed, 23 Nov 2016 22:45:47 +0530
changeset 30880 9129ff0ef022
parent 29857 e368bb414b7e
permissions -rw-r--r--
Fixes issue 34308: Performance issue in Opening Balance Sheet and P&L Structure

Problem is with loading Organization and Year combo in default method. Now
this Org combos is loaded on change in accounting report and general ledger.
Year combo is loaded on change in Organization selection.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
<!--
 *************************************************************************
 * 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-2016 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************
-->
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>General accounting plan statements</title>
    <link rel="shortcut icon" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Openbravo_ERP_250.css" id="paramCSS" />
    <script language="JavaScript" type="text/javascript" id="paramDirectory">
      var baseDirectory = "../../../../../web/";
      </script>
      <script language="JavaScript" src="../utility/DynamicJS.js" type="text/javascript"></script>
      <script language="JavaScript" type="text/javascript" id="paramLanguage">
        var defaultLang = "en_US";
      </script>
      <script language="JavaScript" src="../../../../../web/js/shortcuts.js" type="text/javascript"></script>
      <script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
      <script language="JavaScript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
      <script language="JavaScript" src="../../../../../web/js/searchs.js" type="text/javascript"></script>
      <script language="JavaScript" src="../../../../../web/js/ajax.js" type="text/javascript"></script>
      <script language="JavaScript" src="../../../../../web/js/default/MessageBox.js" type="text/javascript"></script>
      <script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></script>
      <script language="JavaScript" src="../utility/DynamicJS.js" type="text/javascript"></script>
      <script language="JavaScript" src="../../../../../web/js/jscalendar/calendar.js" type="text/javascript"></script>
      <script language="JavaScript" src="../../../../../web/js/jscalendar/lang/calendar-es.js" type="text/javascript" id="fieldCalendar"></script>
      <script language="JavaScript" src="../../../../../web/js/default/DateTextBox.js" type="text/javascript"></script>
      <script language="JavaScript" src="../../../../../web/js/dojoConfig.js" type="text/javascript"></script>
      <script language="JavaScript" src="../../../../../web/js/dojo/dojo.js" type="text/javascript"></script>
      <script type="text/javascript">
        dojo.hostenv.writeIncludes(); //makes debugging in Venkman possible
      </script>
<script language="JavaScript" type="text/javascript">
function displayLogic() {
     var frm = document.frmMain;
     if (frm.inpcElementvalueId.value.substring(0,1) == 'N') {
           displayLogicElement('tdFromDateLabel', true);
           displayLogicElement('tdFromDate', true);
           displayLogicElement('tdToDateLabel', true);
           displayLogicElement('tdToDate', true);
           displayLogicElement('tdFromRefDateLabel', true);
           displayLogicElement('tdFromRefDate', true);
           displayLogicElement('tdToRefDateLabel', true);
           displayLogicElement('tdToRefDate', true);
           displayLogicElement('tdAsToDateLabel', false);
           displayLogicElement('tdAsToDate', false);
           displayLogicElement('tdAsToRefDateLabel', false);
           displayLogicElement('tdAsToRefDate', false);
     } else {
           displayLogicElement('tdFromDateLabel', false);
           displayLogicElement('tdFromDate', false);
           displayLogicElement('tdToDateLabel', false);
           displayLogicElement('tdToDate', false);
           displayLogicElement('tdFromRefDateLabel', false);
           displayLogicElement('tdFromRefDate', false);
           displayLogicElement('tdToRefDateLabel', false);
           displayLogicElement('tdToRefDate', false);
           displayLogicElement('tdAsToDateLabel', true);
           displayLogicElement('tdAsToDate', true);
           displayLogicElement('tdAsToRefDateLabel', true);
           displayLogicElement('tdAsToRefDate', true);
     }
}

function validate(command) {
	var frm = document.frmMain;
	if (frm.inpAgno.value == null || frm.inpAgno.value == "") {
		setWindowElementFocus(frm.inpAgno);
		showJSMessage(7);
		return false;
	} else if (frm.inpCompareTo.checked && (frm.inpAgnoRef.value == null || frm.inpAgnoRef.value == "")) {
		setWindowElementFocus(frm.inpAgnoRef);
		showJSMessage(7);
		return false;
	} else if (frm.inpOrganizacion.value == ""){
		setWindowElementFocus(frm.inpOrganizacion);
		showJSMessage(1);
		return false;
	} else if (frm.inpcAcctSchemaId.value == ""){
		setWindowElementFocus(frm.inpcAcctSchemaId);
		showJSMessage(1);
		return false;
	} else if (frm.inpcElementvalueId.value == ""){
		setWindowElementFocus(frm.inpcElementvalueId);
		showJSMessage(1);
		return false;
	} else if (frm.inpLevel.value == ""){
		setWindowElementFocus(frm.inpLevel);
		showJSMessage(1);
		return false;
	}
	return true;
}

function refreshComboReports() {
  var cmbAccountSchema = document.frmMain.inpcAcctSchemaId;
  var cmbAccountingReports = document.frmMain.inpcElementvalueId;
  var cmbOrganization = document.frmMain.inpOrganizacion;
  var cmbYear = document.frmMain.inpAgno;
  var cmbYearRef = document.frmMain.inpAgnoRef;
  changeComboData(cmbAccountingReports, arrAccountingReports, cmbAccountSchema.options[cmbAccountSchema.selectedIndex].value, true);
  changeComboData(cmbOrganization, arrOrgs, "", true);
  changeComboData(cmbYear, arrOrgs, "", true);
  changeComboData(cmbYearRef, arrOrgs, "", true);
  return true;
}

function callbackCmbOrg(paramXMLParticular, XMLHttpRequestObj) {
  var strText = "";
  if (getReadyStateHandler(XMLHttpRequestObj)) {
    try {
      if (XMLHttpRequestObj.responseText) {
        strText = XMLHttpRequestObj.responseText;
        createCombo(document.getElementById('inpOrganizacion'), strText);
      }
    } catch (e) {
      console.log(e);
    }
  }
  return true;
}

function callbackCmbYear(paramXMLParticular, XMLHttpRequestObj) {
  var strText = "";
  if (getReadyStateHandler(XMLHttpRequestObj)) {
    try {
      if (XMLHttpRequestObj.responseText) {
        strText = XMLHttpRequestObj.responseText;
        createCombo(document.getElementById('paramAgno'), strText);
        createCombo(document.getElementById('paramAgnoRef'), strText);
      }
    } catch (e) {
      console.log(e);
    }
  }
  return true;
}

function createCombo(node, jsonstring) {
  try {
    var objson = eval(jsonstring);
    node.options.length = 0;
    if (typeof objson !== undefined) {
      var rowslength = objson.optionlist.length;
      for (i=0; i<rowslength; i++) {
        var option = document.createElement('OPTION');
        option.setAttribute("value",objson.optionlist[i].value);
        if (objson.optionlist[i].selected === "true") {
          option.setAttribute("selected", "selected");
        }
        var textin = document.createTextNode(objson.optionlist[i].text);
        option.appendChild(textin);
        node.appendChild(option);
      }
    }
  } catch(e) {
    console.log(e);
  }
}

function refreshComboOrgs() {
  try {
    var paramXMLReq = null;
    document.getElementById('inpOrganizacion').innerHTML = '';
    return submitXmlHttpRequest(callbackCmbOrg, document.frmMain, "CMBORG", "GeneralAccountingReports.html", false, null, paramXMLReq);
  } catch (e) {
    console.log(e);
  }
}

function refreshComboYears() {
  try {
    var paramXMLReq = null;
    return submitXmlHttpRequest(callbackCmbYear, document.frmMain, "CMBYEAR", "GeneralAccountingReports.html", false, null, paramXMLReq);
  } catch (e) {
    console.log(e);
  }
}

function callbackLedger(paramXMLParticular, XMLHttpRequestObj) {
    var strText = "";
    if (getReadyStateHandler(XMLHttpRequestObj)) {
        try {
            if (XMLHttpRequestObj.responseText) {
                strText = XMLHttpRequestObj.responseText;
                if (strText) {
                    document.getElementById('inpcAcctSchemaId').value = strText;
                    refreshComboReports();
                }
            }
       } catch (e) {
       }
    }
    return true;
}

function setDefaultLedger() {
    try {
        var paramXMLReq = null;
        return submitXmlHttpRequest(callbackLedger, document.frmMain, "LEDGER", "GeneralAccountingReports.html", false, null, paramXMLReq);
    } catch (e) {
        alert(e);
    }
}

function onClickCompare() {
	if(document.frmMain.inpCompareTo.checked)
		displayLogicElement('trReferenceDetails', true);
	else
		displayLogicElement('trReferenceDetails', false);
}

function onloadFunctions() {
}
</script>

<script language="JavaScript" type="text/javascript" id="paramArrayAccountingReports">
var arrAccountingReports=null;
</script>

<script language="JavaScript" type="text/javascript" id="paramArrayOrg">
var arrOrgs=null;
</script>

<script language="JavaScript" type="text/javascript" id="paramArrayYears">
var arrYears=null;
</script>

<script language="JavaScript" type="text/javascript">
function onLoadDo(){
	this.windowTables = new Array(
	  new windowTableId('client', 'buttonPDF')
	);
	setWindowTableParentElement();
	this.tabsTables = new Array(
	  new tabTableId('tdtopTabs')
	);
	setTabTableParentElement();
	enableShortcuts('edition');
	setBrowserAutoComplete(false);
	resizeArea();
	updateMenuIcon('buttonMenu');

	setWindowElementFocus('firstElement');
	setDefaultLedger();
	displayLogic();
}

function onResizeDo(){
	resizeArea();
}
</script>
</head>
    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="onLoadDo();" onresize="onResizeDo();">
      <form method="post" action="GeneralAccountingReports.pdf" name="frmMain" target="background_target" id="form">
        <input type="hidden" name="Command" />

  <table height="100%" border="0" cellpadding="0" cellspacing="0" id="main">
    <tr>
      <td valign="top" id="tdleftTabs"></td>
      <td valign="top">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_Left">
          <tr><td class="Main_NavBar_bg_left" id="tdleftSeparator"></td></tr>
          <tr><td class="Main_ToolBar_bg_left" valign="top"></td></tr>
          <tr><td class="Main_Client_bg_left"></td></tr>
          <tr><td class="Main_Bottom_bg_left"></td></tr>
        </table>
      </td>
      <td valign="top">
        <div class="Main_ContentPane_NavBar" id="tdtopButtons"></div>
        <div class="Main_ContentPane_ToolBar" id="paramToolBar"></div>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_TabPane" id="tdtopTabs">
          <tr id="paramParentTabContainer"></tr>
          <tr id="paramMainTabContainer"></tr>
          <tr id="paramChildTabContainer"></tr>
        </table>
        <div class="Main_ContentPane_Client" style="overflow: auto; display: none;" id="client">
                <table class="dojoTabContainer" border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
                  <tr>
                    <td>
                      <table class="dojoTabPaneWrapper" border="0" cellpadding="0" cellspacing="0" width="100%" summary="">
                        <tr>
                          <td>
                            <!-- MessageBox -->

                            <table cellpadding="0" cellspacing="0" id="messageBoxID" class="MessageBoxyy">
                              <tbody>
                              <tr class="MessageBox_TopMargin">
                                <td class="MessageBox_LeftMargin"></td>
                                <td></td>
                                <td class="MessageBox_RightMargin"></td>
                              </tr>
                              <tr>
                                <td class="MessageBox_LeftMargin"></td>
                                <td>

                                  <table cellpadding="0" cellspacing="0" class="MessageBox_Container">
                                    <tbody>
                                    <tr>
                                      <td class="MessageBox_LeftTrans">
                                        <table style="width: 100%; height: 100%" cellpadding="0" cellspacing="0">
                                          <tbody>
                                          <tr>
                                            <td class="MessageBox_TopLeft"></td>
                                          </tr>
                                          <tr>
                                            <td class="MessageBox_Left"></td>
                                          </tr>
                                          </tbody>
                                        </table>
                                      </td>
                                      <td class="MessageBox_bg">

                                        <table class="MessageBox_Top">
                                        <tbody>
                                          <tr>
                                            <td>
                                              <span>
                                              <table cellpadding="0" cellspacing="0" class="MessageBox_Body_ContentCell">
                                                <tbody>
                                                <tr>
                                                  <td class="MessageBox_Icon_ContentCell">
                                                    <div class="MessageBox_Icon"></div>
                                                  </td>
                                                  <td style="vertical-align: top;" id="messageBoxIDContent">
                                                    <span>
                                                      <div class="MessageBox_TextTitle" id="messageBoxIDTitle">
                                                        xxInfo: AccessTableWithNoView
                                                      </div>
                                                      <div class="MessageBox_TextDescription" id="messageBoxIDMessage">
                                                        xxThe current information is empty.
                                                      </div>
                                                      <div class="MessageBox_TextSeparator"></div>
                                                    </span>
                                                  </td>
                                                </tr>
                                                </tbody>
                                              </table>
                                              </span>
                                            </td>
                                          </tr>
                                          </tbody>
                                        </table>

                                      </td>
                                      <td class="MessageBox_RightTrans">
                                        <table style="width: 100%; height: 100%" cellpadding="0" cellspacing="0">
                                          <tbody>
                                          <tr>
                                            <td class="MessageBox_TopRight"></td>
                                          </tr>
                                          <tr>
                                            <td class="MessageBox_Right"></td>
                                          </tr>
                                          </tbody>
                                        </table>
                                      </td>
                                    </tr>
                                    <tr>
                                      <td rowspan="2" class="MessageBox_BottomLeft">
                                      </td>
                                      <td class="MessageBox_BottomTrans MessageBox_bg">
                                      </td>
                                      <td rowspan="2" class="MessageBox_BottomRight">
                                      </td>
                                    </tr>
                                    <tr>
                                      <td class="MessageBox_Bottom">
                                      </td>
                                    </tr>
                                    </tbody>
                                  </table>

                                </td>
                                <td class="MessageBox_RightMargin"></td>
                              </tr>
                              <tr class="MessageBox_BottomMargin">
                                <td class="MessageBox_LeftMargin"></td>
                                <td></td>
                                <td class="MessageBox_RightMargin"></td>
                              </tr>
                              </tbody>
                            </table>
                            <!-- USER CONTROLS -->

              <table class="Main_Client_TableEdition">
                <tr>
                  <td class="TableEdition_OneCell_width"></td>
                  <td class="TableEdition_OneCell_width"></td>
                  <td class="TableEdition_OneCell_width"></td>
                  <td class="TableEdition_OneCell_width"></td>
                  <td class="TableEdition_OneCell_width"></td>
                  <td class="TableEdition_OneCell_width"></td>
                </tr>
                <tr>
                <td colspan="6">
                  <table class="FieldGroup" cellspacing="0" cellpadding="0" border="0">
                  <tbody>
                    <tr class="FieldGroup_TopMargin"/>
                    <tr>
                      <td class="FieldGroupTitle_Left"><img class="FieldGroupTitle_Left_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
                      <td class="FieldGroupTitle">Report Options</td>
                      <td class="FieldGroupTitle_Right"><img class="FieldGroupTitle_Right_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
                      <td class="FieldGroupContent"/>
                    </tr>
                    <tr class="FieldGroup_BottomMargin"/>
                  </tbody>
                  </table>
                </td>
                </tr>

                <tr>
                  <td class="TitleCell"> <span class="LabelText">General Ledger</span></td>
                  <td class="Combo_ContentCell" colspan="2"> <select name="inpcAcctSchemaId" id="inpcAcctSchemaId" class="ComboKey Combo_TwoCells_width" onchange="refreshComboReports(); logChanges(this); return true;">
                    <option value=""></option><div id="reportC_ACCTSCHEMA_ID"></div>
                  </select></td>
                  <td class="ContentCell"></td>
                  <td class="TitleCell"><span class="LabelText">Show only accounts with value</span></td>
                  <td class="Radio_Check_ContentCell"><input name="inpConImporte" type="checkbox" id="fieldConImporte" value="Y"></input></td>
                </tr>

                <tr>
                  <td class="TitleCell"><span class="LabelText">Accounting Report</span></td>
                  <td class="Combo_ContentCell" colspan="2"> <select name="inpcElementvalueId" id="inpcElementvalueId" class="ComboKey Combo_TwoCells_width" onchange="displayLogic(); refreshComboOrgs(); logChanges(this); return true;">
                    <option value=""></option><div id="reportC_ElementValue_ID"></div>
                  </select></td>
                  <td class="ContentCell"></td>
                  <td class="TitleCell"><span class="LabelText">Show Account codes</span></td>
                  <td class="Radio_Check_ContentCell"><input name="inpConCodigo" type="checkbox" id="fieldConCodigo" value="Y"></input></td>
                </tr>

                <tr>
                  <td class="TitleCell"><span class="LabelText">Organization</span></td>
                  <td class="Combo_ContentCell" colspan="2"> <select name="inpOrganizacion" id="inpOrganizacion" class="ComboKey Combo_TwoCells_width" onchange="refreshComboYears(); logChanges(this); return true;">
                      <option value=""></option><div id="reportC_Org_ID"></div>
                    </select></td>
                </tr>
                <td class="TitleCell"><span class="LabelText">Account Level</span></td>
                  <td class="Combo_ContentCell"> <select name="inpLevel" id="inpLevel" class="ComboKey Combo_OneCell_width" onchange="logChanges(this);return true;">
                    <option value=""></option><div id="reportLevel"></div>
                  </select></td>
                  <td class="ContentCell"></td>
                <tr>
                
                </tr>

                <tr>
                <td colspan="6">
                  <table class="FieldGroup" cellspacing="0" cellpadding="0" border="0">
                  <tbody>
                    <tr class="FieldGroup_TopMargin"/>
                    <tr>
                      <td class="FieldGroupTitle_Left"><img class="FieldGroupTitle_Left_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
                      <td class="FieldGroupTitle">Primary Filters</td>
                      <td class="FieldGroupTitle_Right"><img class="FieldGroupTitle_Right_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
                      <td class="FieldGroupContent"/>
                    </tr>
                    <tr class="FieldGroup_BottomMargin"/>
                  </tbody>
                  </table>
                </td>
                </tr>
                <tr>
                  <td class="TitleCell"><span class="LabelText">Year</span></td>
                  <td class="Combo_ContentCell"> <SELECT name="inpAgno" id="paramAgno" class="ComboKey Combo_OneCell_width" onchange="displayLogic(); return true;">
                      <OPTION value=""></OPTION>
                    </SELECT></TD>
                  <td class="TitleCell" id="tdFromDateLabel"><SPAN class="LabelText">From Date</SPAN></td>
                  <TD class="TextBox_btn_ContentCell" id="tdFromDate">
                    <table border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
                      <tr>
                        <td>
                          <input dojoType="openbravo:DateTextbox" lowerThan="paramDateTo" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width" type="text" name="inpDateFrom" id="paramDateFrom" maxlength="10" value="" onkeyup="autoCompleteDate(this.textbox, this.displayFormat);return true;"></input><script>djConfig.searchIds.push("paramDateFrom");</script>
                        </td>
                        <td valign="top">
                          <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Calendar'; return true;" onblur="window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="showCalendar('frmMain.inpDateFrom', document.frmMain.inpDateFrom.value, false);return false;">
                          <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='Show calendar';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;">
                            <tr>
                              <td class="FieldButton_bg">
                                <img alt="Calendar" class="FieldButton_Icon FieldButton_Icon_Calendar" title="Calendar" src="../../../../../web/images/blank.gif" border="0"></img>
                              </td>
                            </tr>
                          </table>
                          </a>
                        </td>
                      </tr>
                    </table>
                 </td>
                  <td class="TitleCell" id="tdToDateLabel"><span class="LabelText">To Date</span></td>
                  <td class="TextBox_btn_ContentCell" id="tdToDate">
                    <table border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
                      <tr>
                        <td>
                          <input dojoType="openbravo:DateTextbox" greaterThan="paramDateFrom" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width" type="text" name="inpDateTo" id="paramDateTo" maxlength="10" value="" onkeyup="autoCompleteDate(this.textbox, this.displayFormat);return true;"></input><script>djConfig.searchIds.push("paramDateTo");</script>
                        </td>
                        <td valign="top">
                          <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Calendar'; return true;" onblur="window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;" onclick="showCalendar('frmMain.inpDateTo', document.frmMain.inpDateTo.value, false);return false;" >
                          <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='Show calendar';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;">
                            <tr>
                              <td class="FieldButton_bg">
                                <img alt="Calendar" class="FieldButton_Icon FieldButton_Icon_Calendar" title="Calendar" src="../../../../../web/images/blank.gif" border="0"></img>
                              </td>
                            </tr>
                          </table>
                          </a>
                        </td>
                      </tr>
                    </table>
                  </td>
                  <td class="TitleCell" id="tdAsToDateLabel" colspan="2"><SPAN class="LabelText">As of Date</SPAN></td>
                  <TD class="TextBox_btn_ContentCell" id="tdAsToDate">
                    <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
                      <TR>
                        <TD>
                          <INPUT dojoType="openbravo:DateTextbox" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width" type="text" name="inpAsDateTo" id="paramAsDateTo" maxlength="10" value="" onkeyup="auto_complete_date(this.textbox, this.displayFormat);return true;"></INPUT><script>djConfig.searchIds.push("paramAsDateTo");</script>
                        </TD>
                        <TD valign="top">
                          <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Calendar'; return true;" onblur="window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;" onclick="showCalendar('frmMain.inpAsDateTo', document.frmMain.inpAsDateTo.value, false);return false;" >
                          <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='Show calendar';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;">
                            <TR>
                              <TD class="FieldButton_bg">
                                <IMG alt="Calendar" class="FieldButton_Icon FieldButton_Icon_Calendar" title="Calendar" src="../../../../../web/images/blank.gif" border="0"></IMG>
                              </TD>
                            </TR>
                          </TABLE>
                          </a>
                        </TD>
                      </TR>
                    </TABLE>
                  </TD>
                </tr>
                
                <!-- Improved Balance Sheet -->
                <tr>
                  <td class="TitleCell"><span class="LabelText">Compare To</span></td>
                  <td class="Radio_Check_ContentCell"><input name="inpCompareTo" type="checkbox" id="fieldCompareTo" value="Y" onclick="onClickCompare();"></input></td>
                </tr>
                <!-- Improved Balance Sheet -->

                <tr id="trReferenceDetails">
                <td class="TitleCell"><span class="LabelText">Reference Year</span></td>
                  <td class="Combo_ContentCell"> <SELECT name="inpAgnoRef" id="paramAgnoRef" class="ComboKey Combo_OneCell_width" onchange="displayLogic(); return true;">
                      <OPTION value=""></OPTION>
                    </SELECT></TD>
                  <td class="TitleCell" id="tdFromRefDateLabel"><SPAN class="LabelText">From Reference Date</SPAN></td>
                  <TD class="TextBox_btn_ContentCell" id="tdFromRefDate">
                    <table border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
                      <tr>
                        <td>
                          <input dojoType="openbravo:DateTextbox" lowerThan="paramDateToRef" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width" type="text" name="inpDateFromRef" id="paramDateFromRef" maxlength="10" value="" onkeyup="autoCompleteDate(this.textbox, this.displayFormat);return true;"></input><script>djConfig.searchIds.push("paramDateFromRef");</script>
                        </td>
                        <td valign="top">
                          <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Calendar'; return true;" onblur="window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="showCalendar('frmMain.inpDateFromRef', document.frmMain.inpDateFromRef.value, false);return false;">
                          <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='Show calendar';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;">
                            <tr>
                              <td class="FieldButton_bg">
                                <img alt="Calendar" class="FieldButton_Icon FieldButton_Icon_Calendar" title="Calendar" src="../../../../../web/images/blank.gif" border="0"></img>
                              </td>
                            </tr>
                          </table>
                          </a>
                        </td>
                      </tr>
                    </table>
                  </td>
                  <td class="TitleCell" id="tdToRefDateLabel"><span class="LabelText">To Reference Date</span></td>
                  <td class="TextBox_btn_ContentCell" id="tdToRefDate">
                    <table border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
                      <tr>
                        <td>
                          <input dojoType="openbravo:DateTextbox" greaterThan="paramDateFromRef" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width" type="text" name="inpDateToRef" id="paramDateToRef" maxlength="10" value="" onkeyup="autoCompleteDate(this.textbox, this.displayFormat);return true;"></input><script>djConfig.searchIds.push("paramDateToRef");</script>
                        </td>
                        <td valign="top">
                          <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Calendar'; return true;" onblur="window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="showCalendar('frmMain.inpDateToRef', document.frmMain.inpDateToRef.value, false);return false;">
                          <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='Show calendar';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;">
                            <tr>
                              <td class="FieldButton_bg">
                                <img alt="Calendar" class="FieldButton_Icon FieldButton_Icon_Calendar" title="Calendar" src="../../../../../web/images/blank.gif" border="0"></img>
                              </td>
                            </tr>
                          </table>
                          </a>
                        </td>
                      </tr>
                    </table>
                  </td>
                  <td class="TitleCell" id="tdAsToRefDateLabel" colspan="2"><SPAN class="LabelText">As of Reference Date</SPAN></td>
                  <TD class="TextBox_btn_ContentCell" id="tdAsToRefDate">
                    <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
                      <TR>
                        <TD>
                          <INPUT dojoType="openbravo:DateTextbox" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width" type="text" name="inpAsDateToRef" id="paramAsDateToRef" maxlength="10" value="" onkeyup="auto_complete_date(this.textbox, this.displayFormat);return true;"></INPUT><script>djConfig.searchIds.push("paramAsDateToRef");</script>
                        </TD>
                        <TD valign="top">
                          <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Calendar'; return true;" onblur="window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="showCalendar('frmMain.inpAsDateToRef', document.frmMain.inpAsDateToRef.value, false);return false;">
                          <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='Show calendar';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;">
                            <TR>
                              <TD class="FieldButton_bg">
                                <IMG alt="Calendar" class="FieldButton_Icon FieldButton_Icon_Calendar" title="Calendar" src="../../../../../web/images/blank.gif" border="0"></IMG>
                              </TD>
                            </TR>
                          </TABLE>
                          </a>
                        </TD>
                      </TR>
                    </TABLE>
                  </TD>
                </tr>
		<tr>
			<td class="TitleCell"><span class="LabelText">Initial page number</span></td>
              			<td class="TextBox_ContentCell"> <input dojoType="openbravo:Textbox"  class="dojoValidateValid TextBox_OneCell_width" type="text" name="inpPageNo" id="paramPageNo" size="10" maxlength="10" value=""></input><script>djConfig.searchIds.push("paramPageNo");</script>
              		</td>
		</tr>
                <tr>
                <td colspan="6">
                  <table class="FieldGroup" cellspacing="0" cellpadding="0" border="0">
                  <tbody>
                    <tr class="FieldGroup_TopMargin"/>
                    <tr>
                      <td class="FieldGroupTitle_Left"><img class="FieldGroupTitle_Left_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
                      <td class="FieldGroupTitle">View Results</td>
                      <td class="FieldGroupTitle_Right"><img class="FieldGroupTitle_Right_bg" border="0" src="../../../../../web/images/blank.gif"/></td>
                      <td class="FieldGroupContent"/>
                    </tr>
                    <tr class="FieldGroup_BottomMargin"/>
                  </tbody>
                  </table>
                </td>
                </tr>
                <tr>
                  <td class="Button_RightAlign_ContentCell" colspan="2">
                    <div>
                      <button type="button" 
                        id="buttonPDF" 
                        class="ButtonLink" 
                        onclick="submitCommandForm('FIND', true, null, 'GeneralAccountingReports.pdf', 'background_target');return false;" 
                        onfocus="buttonEvent('onfocus', this); window.status='Export Results to PDF Format'; return true;" 
                        onblur="buttonEvent('onblur', this);" 
                        onkeyup="buttonEvent('onkeyup', this);" 
                        onkeydown="buttonEvent('onkeydown', this);" 
                        onkeypress="buttonEvent('onkeypress', this);" 
                        onmouseup="buttonEvent('onmouseup', this);" 
                        onmousedown="buttonEvent('onmousedown', this);" 
                        onmouseover="buttonEvent('onmouseover', this); window.status='Export Results to PDF Format'; return true;" 
                        onmouseout="buttonEvent('onmouseout', this);">
                        <table class="Button">
                          <tr>
                            <td class="Button_left"><img class="Button_Icon Button_Icon_pdf" alt="Export Results to PDF Format" title="Export Results to PDF Format" src="../../../../../web/images/blank.gif" border="0" /></td>
                            <td class="Button_text">PDF Format</td>
                            <td class="Button_right"></td>
                          </tr>
                        </table>
                      </button>
                    </div>
                  </td>
                  <td class="TitleCell"></td>
                  <td class="TitleCell"></td>
                  <td class="TitleCell"></td>
                  <td class="TitleCell"></td>
                </tr>
</table>


                      <!-- USER CONTROLS -->
                </td>
              </tr>
              </table>
              </td>
            </tr>
          </table>
        </div>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="Menu_ContentPane_Bottom" id="tdbottomSeparator">
          <tr>
            <td class="Main_Bottom_bg"><img src="../../../../../web/images/blank.gif" border="0"></td>
          </tr>
        </table></td>
      <td valign="top">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="Main_ContentPane_Right" id="tdrightSeparator">
          <tr><td class="Main_NavBar_bg_right"></td></tr>
          <tr><td class="Main_ToolBar_bg_right" valign="top"></td></tr>
          <tr><td class="Main_Client_bg_right"></td></tr>
          <tr><td class="Main_Bottom_bg_right"></td></tr>
        </table>
      </td>
    </tr>
  </table>
</form>

<iframe name="background_target" id="background_target" height="0" width="0" style="display:none;"></iframe>

</body>
</html>