Bug fixed [1827543] Fixed some calendars
authorDavid Baz Fayos <david.baz@openbravo.com>
Sat, 23 Feb 2008 00:38:19 +0000
changeset 475 b9a386144263
parent 474 ef3bf2575248
child 476 ecdccb4bbdd9
Bug fixed [1827543] Fixed some calendars
src/org/openbravo/erpCommon/ad_reports/GenerateModel347.java
src/org/openbravo/erpCommon/ad_reports/GenerateModel347.xml
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceDiscountEdit.html
src/org/openbravo/erpCommon/ad_reports/ReportPendingProductionEditJr.html
src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderOpenItem.html
src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvidedJR.html
src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvidedJR.java
src/org/openbravo/erpCommon/ad_reports/ReportShipmentEditionJR.java
src/org/openbravo/erpCommon/ad_reports/ReportShipmentFilterJR.html
src/org/openbravo/erpCommon/ad_reports/ReportShipmentFilterJR.xml
--- a/src/org/openbravo/erpCommon/ad_reports/GenerateModel347.java	Fri Feb 22 16:59:39 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/GenerateModel347.java	Sat Feb 23 00:38:19 2008 +0000
@@ -42,7 +42,9 @@
 
     if (vars.commandIn("DEFAULT")) {
       String strType = vars.getStringParameter("inpReportType", "New");
-      printPageDataSheet(response, vars, strType);
+      String strDateFrom = vars.getStringParameter("inpDateFrom");
+      String strDateTo = vars.getStringParameter("inpDateTo");
+      printPageDataSheet(response, vars, strType, strDateFrom, strDateTo);
     } else if (vars.commandIn("FIND")){
       String strDateFrom = vars.getStringParameter("inpDateFrom");
       String strDateTo = vars.getStringParameter("inpDateTo");
@@ -53,7 +55,7 @@
     }else pageError(response);
   }
 
-  void printPageDataSheet(HttpServletResponse response, VariablesSecureApp vars, String strType)
+  void printPageDataSheet(HttpServletResponse response, VariablesSecureApp vars, String strType, String strDateFrom, String strDateTo)
     throws IOException, ServletException {
     if (log4j.isDebugEnabled()) log4j.debug("Output: dataSheet");
     response.setContentType("text/html; charset=UTF-8");
@@ -94,8 +96,13 @@
       }
     }
 
-
     xmlDocument.setParameter("calendar", vars.getLanguage().substring(0,2));
+    xmlDocument.setParameter("dateFrom", strDateFrom);
+    xmlDocument.setParameter("dateFromdisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+    xmlDocument.setParameter("dateFromsaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+    xmlDocument.setParameter("dateTo", strDateTo);
+    xmlDocument.setParameter("dateTodisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+    xmlDocument.setParameter("dateTosaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
     xmlDocument.setParameter("direction", "var baseDirection = \"" + strReplaceWith + "/\";\n");
     xmlDocument.setParameter("paramLanguage", "LNG_POR_DEFECTO=\"" + vars.getLanguage() + "\";");
     xmlDocument.setParameter("newType", strType);
@@ -126,7 +133,6 @@
       strLinea = dataLines[i].constant1 + dataLines[i].model + dataLines[i].ejercicio + dataLines[i].nifDeclarante + dataLines[i].nifDeclarado + dataLines[i].nifRepresentante + dataLines[i].nombreSocial + dataLines[i].tipoDeclaracion + dataLines[i].codigoProvincia + dataLines[i].codigoPais + dataLines[i].claveCodigo + dataLines[i].importe + dataLines[i].operacionSeguro + dataLines[i].arrendamiento + dataLines[i].blancos;
       strBuf = strBuf.append("\r\n").append(strLinea);
     }
-
     out.print(strBuf.toString());
     out.close();
   }
--- a/src/org/openbravo/erpCommon/ad_reports/GenerateModel347.xml	Fri Feb 22 16:59:39 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/GenerateModel347.xml	Sat Feb 23 00:38:19 2008 +0000
@@ -21,6 +21,12 @@
   <template file="GenerateModel347.html"/>
   <PARAMETER id="paramToolBar" name="toolbar" default=""/>
   <PARAMETER id="fieldCalendar" name="calendar" attribute="src" replace="es" default="en"/>
+  <PARAMETER id="paramDateFrom" name="dateFrom" attribute="value"/>
+  <PARAMETER id="paramDateFrom" name="dateFromdisplayFormat" attribute="displayformat" replace="xx"/>
+  <PARAMETER id="paramDateFrom" name="dateFromsaveFormat" attribute="saveformat" replace="yy"/>
+  <PARAMETER id="paramDateTo" name="dateTo" attribute="value"/>
+  <PARAMETER id="paramDateTo" name="dateTodisplayFormat" attribute="displayformat" replace="xx"/>
+  <PARAMETER id="paramDateTo" name="dateTosaveFormat" attribute="saveformat" replace="yy"/>
   <PARAMETER id="paramDirection" name="direction" default=""/>
   <PARAMETER id="paramLanguage" name="paramLanguage" default=""/>
   <PARAMETER id="paramAD_ORGID" name="adOrgId" default=""/>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceDiscountEdit.html	Fri Feb 22 16:59:39 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportInvoiceDiscountEdit.html	Sat Feb 23 00:38:19 2008 +0000
@@ -41,6 +41,7 @@
       <script language="JavaScript" src="../utility/MessagesJS.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/String.js" type="text/javascript"></script>
       <script language="JavaScript" src="../../../../../web/js/TypeAheadCombo.js" type="text/javascript"></script>
       <script language="JavaScript" src="../../../../../web/js/dojoConfig.js" type="text/javascript"></script>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportPendingProductionEditJr.html	Fri Feb 22 16:59:39 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportPendingProductionEditJr.html	Sat Feb 23 00:38:19 2008 +0000
@@ -39,8 +39,9 @@
       <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/MessagesJS.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/calendar.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/lang/calendar-es.js" type="text/javascript" id="fieldCalendar"></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/String.js" type="text/javascript"></script>
       <script language="JavaScript" src="../../../../../web/js/TypeAheadCombo.js" type="text/javascript"></script>
       <script language="JavaScript" src="../../../../../web/js/dojoConfig.js" type="text/javascript"></script>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderOpenItem.html	Fri Feb 22 16:59:39 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderOpenItem.html	Sat Feb 23 00:38:19 2008 +0000
@@ -42,6 +42,7 @@
       <script language="JavaScript" src="../utility/MessagesJS.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/String.js" type="text/javascript"></script>
       <script language="JavaScript" src="../../../../../web/js/TypeAheadCombo.js" type="text/javascript"></script>
       <script language="JavaScript" src="../../../../../web/js/dojoConfig.js" type="text/javascript"></script>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvidedJR.html	Fri Feb 22 16:59:39 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvidedJR.html	Sat Feb 23 00:38:19 2008 +0000
@@ -232,7 +232,7 @@
                     <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
                       <TR>
                         <TD class="TextBox_ContentCell">
-                          <INPUT dojoType="openbravo:DateTextbox" lowerThan="paramDateTo" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width required" required="true" type="text" name="inpDateFrom" id="paramDateFrom" size="10" maxlength="10" value="" onkeyup="auto_completar_fecha(this.textbox);return true;"></INPUT><script>djConfig.searchIds.push("paramDateFrom");</script>
+                          <INPUT dojoType="openbravo:DateTextbox" lowerThan="paramDateTo" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width required" required="true" type="text" name="inpDateFrom" id="paramDateFrom" size="10" maxlength="10" value="" onkeyup="auto_complete_date(this.textbox, this.displayFormat);return true;"></INPUT><script>djConfig.searchIds.push("paramDateFrom");</script>
                         </TD>
                         <TD class="FieldButton_bg">
                           <a class="FieldButtonLink" href="#" onfocus="this.className='FieldButtonLink_hover'; window.status='Calendar'; return true;" onblur="this.className='FieldButtonLink'; window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_hover'; return true;"  onclick="showCalendar('frmMain.inpDateFrom', document.frmMain.inpDateFrom.value, false);return false;" >
@@ -254,7 +254,7 @@
                     <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
                       <TR>
                         <TD class="TextBox_ContentCell">
-                          <INPUT dojoType="openbravo:DateTextbox" greaterThan="paramDateFrom" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width required" required="true" type="text" name="inpDateTo" id="paramDateTo" size="10" maxlength="10" value="" onkeyup="auto_completar_fecha(this.textbox);return true;"></INPUT><script>djConfig.searchIds.push("paramDateTo");</script>
+                          <INPUT dojoType="openbravo:DateTextbox" greaterThan="paramDateFrom" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width required" required="true" type="text" name="inpDateTo" id="paramDateTo" size="10" maxlength="10" value="" onkeyup="auto_complete_date(this.textbox, this.displayFormat);return true;"></INPUT><script>djConfig.searchIds.push("paramDateTo");</script>
                         </TD>
                         <TD class="FieldButton_bg">
                           <a class="FieldButtonLink" href="#" onfocus="this.className='FieldButtonLink_hover'; window.status='Calendar'; return true;" onblur="this.className='FieldButtonLink'; window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_hover'; return true;" onclick="showCalendar('frmMain.inpDateTo', document.frmMain.inpDateTo.value, false);return false;" >
--- a/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvidedJR.java	Fri Feb 22 16:59:39 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportSalesOrderProvidedJR.java	Sat Feb 23 00:38:19 2008 +0000
@@ -108,11 +108,11 @@
 
       xmlDocument.setParameter("calendar", vars.getLanguage().substring(0,2));
       xmlDocument.setParameter("dateFrom", strdateFrom);
-    xmlDocument.setParameter("dateFromdisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
-    xmlDocument.setParameter("dateFromsaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+      xmlDocument.setParameter("dateFromdisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+      xmlDocument.setParameter("dateFromsaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
       xmlDocument.setParameter("dateTo", strdateTo);
-    xmlDocument.setParameter("dateTodisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
-    xmlDocument.setParameter("dateTosaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+      xmlDocument.setParameter("dateTodisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+      xmlDocument.setParameter("dateTosaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
       xmlDocument.setParameter("paramBPartnerId", strcBpartnerId);
       xmlDocument.setParameter("mWarehouseId", strmWarehouseId);
       xmlDocument.setParameter("cProjectId", strcProjectId);
--- a/src/org/openbravo/erpCommon/ad_reports/ReportShipmentEditionJR.java	Fri Feb 22 16:59:39 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportShipmentEditionJR.java	Sat Feb 23 00:38:19 2008 +0000
@@ -95,7 +95,11 @@
     xmlDocument.setParameter("language", "LNG_POR_DEFECTO=\"" + vars.getLanguage() + "\";");
     xmlDocument.setParameter("direction", "var baseDirection = \"" + strReplaceWith + "/\";\n");
     xmlDocument.setParameter("dateFrom", strdateFrom);
+    xmlDocument.setParameter("dateFromdisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+    xmlDocument.setParameter("dateFromsaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
     xmlDocument.setParameter("dateTo", strdateTo);
+    xmlDocument.setParameter("dateTodisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+    xmlDocument.setParameter("dateTosaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
     xmlDocument.setParameter("paramBPartnerId", "");
     xmlDocument.setParameter("mWarehouseId", "");
     xmlDocument.setParameter("cProjectId", "");
--- a/src/org/openbravo/erpCommon/ad_reports/ReportShipmentFilterJR.html	Fri Feb 22 16:59:39 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportShipmentFilterJR.html	Sat Feb 23 00:38:19 2008 +0000
@@ -40,8 +40,9 @@
       <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/MessagesJS.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/calendar.js" type="text/javascript"></script>
-      <script language="JavaScript" src="../../../../../web/js/lang/calendar-es.js" type="text/javascript" id="fieldCalendar"></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/String.js" type="text/javascript"></script>
       <script language="JavaScript" src="../../../../../web/js/TypeAheadCombo.js" type="text/javascript"></script>
       <script language="JavaScript" src="../../../../../web/js/dojoConfig.js" type="text/javascript"></script>
@@ -216,7 +217,7 @@
                     <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
                       <TR>
                         <TD class="TextBox_ContentCell">
-                          <INPUT dojoType="openbravo:DateTextbox" lowerThan="paramDateTo" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width" type="text" name="inpDateFrom" id="paramDateFrom" size="10" maxlength="10" value="" onkeyup="auto_completar_fecha(this.textbox);return true;"></INPUT><script>djConfig.searchIds.push("paramDateFrom");</script>
+                          <INPUT dojoType="openbravo:DateTextbox" lowerThan="paramDateTo" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width" type="text" name="inpDateFrom" id="paramDateFrom" size="10" maxlength="10" value="" onkeyup="auto_complete_date(this.textbox, this.displayFormat);return true;"></INPUT><script>djConfig.searchIds.push("paramDateFrom");</script>
                         </TD>
                         <TD class="FieldButton_bg">
                           <a class="FieldButtonLink" href="#" onfocus="this.className='FieldButtonLink_hover'; window.status='Calendar'; return true;" onblur="this.className='FieldButtonLink'; window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_hover'; return true;"  onclick="showCalendar('frmMain.inpDateFrom', document.frmMain.inpDateFrom.value, false);return false;">
@@ -238,7 +239,7 @@
                     <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
     <TR> 
                         <TD class="TextBox_ContentCell">
-                          <INPUT dojoType="openbravo:DateTextbox" greaterThan="paramDateFrom" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width" type="text" name="inpDateTo" id="paramDateTo" size="10" maxlength="10" value="" onkeyup="auto_completar_fecha(this.textbox);return true;"></INPUT><script>djConfig.searchIds.push("paramDateTo");</script>
+                          <INPUT dojoType="openbravo:DateTextbox" greaterThan="paramDateFrom" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width" type="text" name="inpDateTo" id="paramDateTo" size="10" maxlength="10" value="" onkeyup="auto_complete_date(this.textbox, this.displayFormat);return true;"></INPUT><script>djConfig.searchIds.push("paramDateTo");</script>
                         </TD>
                         <TD class="FieldButton_bg">
                           <a class="FieldButtonLink" href="#" onfocus="this.className='FieldButtonLink_hover'; window.status='Calendar'; return true;" onblur="this.className='FieldButtonLink'; window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_hover'; return true;" onclick="showCalendar('frmMain.inpDateTo', document.frmMain.inpDateTo.value, false);return false;" >
--- a/src/org/openbravo/erpCommon/ad_reports/ReportShipmentFilterJR.xml	Fri Feb 22 16:59:39 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportShipmentFilterJR.xml	Sat Feb 23 00:38:19 2008 +0000
@@ -24,11 +24,11 @@
   <PARAMETER id="paramLanguage" name="language" default=""/>
   <PARAMETER id="paramDirection" name="direction" default=""/>
   <PARAMETER id="paramDateFrom" name="dateFrom" attribute="value"/>
-	<PARAMETER id="paramDateFrom" name="dateFromdisplayFormat" attribute="displayFormat" replace="xx"/>
-	<PARAMETER id="paramDateFrom" name="dateFromsaveFormat" attribute="saveFormat" replace="yy"/>
+  <PARAMETER id="paramDateFrom" name="dateFromdisplayFormat" attribute="displayformat" replace="xx"/>
+  <PARAMETER id="paramDateFrom" name="dateFromsaveFormat" attribute="saveformat" replace="yy"/>
   <PARAMETER id="paramDateTo" name="dateTo" attribute="value"/>
-	<PARAMETER id="paramDateTo" name="dateTodisplayFormat" attribute="displayFormat" replace="xx"/>
-	<PARAMETER id="paramDateTo" name="dateTosaveFormat" attribute="saveFormat" replace="yy"/>
+  <PARAMETER id="paramDateTo" name="dateTodisplayFormat" attribute="displayformat" replace="xx"/>
+  <PARAMETER id="paramDateTo" name="dateTosaveFormat" attribute="saveformat" replace="yy"/>
   <PARAMETER id="paramBPartnerId" name="paramBPartnerId" attribute="value"/>
   <PARAMETER id="paramM_WAREHOUSE_ID" name="mWarehouseId" attribute=""/>
   <PARAMETER id="C_PROJECT_ID" name="cProjectId" attribute="value"/>