Deprecated 'auto_completar_numero' in utils.js
authorDavid Baz Fayos <david.baz@openbravo.com>
Mon, 21 Apr 2008 09:42:24 +0000
changeset 699 39d08e914302
parent 698 35e38e532cde
child 700 5de9de5dc989
Deprecated 'auto_completar_numero' in utils.js
src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder_F1.html
src/org/openbravo/erpCommon/ad_actionButton/CreateFromMultiple_Receipt.html
src/org/openbravo/erpCommon/ad_actionButton/CreateFromMultiple_Shipment.html
src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Settlement.html
src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.html
src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder.html
src/org/openbravo/erpCommon/ad_forms/ShowSessionPreferences.html
src/org/openbravo/erpCommon/businessUtility/Buscador.java
src/org/openbravo/erpCommon/info/AttributeSetInstance.java
web/js/utils.js
--- a/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder_F1.html	Mon Apr 21 09:35:49 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder_F1.html	Mon Apr 21 09:42:24 2008 +0000
@@ -399,8 +399,8 @@
                         <TD width="9%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT type="hidden" name="inpmAttributesetinstanceIdxx" id="fieldmAttributesetinstanceId" value=""></INPUT><span id="fieldDescription">xxExtraLarge</span></TD>
                         <TD width="11%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT type="hidden" name="inpmOfferIdxx" id="fieldMofferid" value=""></INPUT><span id="fieldOffername">xx15%descuentoFebrero</span></TD>
                         <TD width="9%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT type="hidden" name="inpmPricestdvaluexx" id="fieldPricestdvalue" value=""></INPUT><span id="fieldPricestd">xx15.345</span></TD>
-                        <TD width="9%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT class="dojoValidateValid readonly" style="font-weight: normal;" name="inpLastpricesoxx" type="text" id="fieldLastpriceso" size="6" value="" onkeyup="auto_completar_numero(this, true, true);return true;" disabled="" class="xx"></INPUT></TD>
-                        <TD width="7%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT class="dojoValidateValid readonly" style="font-weight: normal;" name="inpquantityxx" type="text" id="fieldQty" size="5" value="0" onkeyup="auto_completar_numero(this, true, true);return true;" disabled="" ></INPUT></TD>
+                        <TD width="9%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT class="dojoValidateValid readonly" style="font-weight: normal;" name="inpLastpricesoxx" type="text" id="fieldLastpriceso" size="6" value="" onkeyup="auto_complete_number(this, true, true);return true;" disabled="" class="xx"></INPUT></TD>
+                        <TD width="7%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT class="dojoValidateValid readonly" style="font-weight: normal;" name="inpquantityxx" type="text" id="fieldQty" size="5" value="0" onkeyup="auto_complete_number(this, true, true);return true;" disabled="" ></INPUT></TD>
                         <TD width="13%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT type="hidden" name="inpcUOMIdxx" id="fieldUomid" value=""></INPUT><span id="fieldUomsymbol">xxKg</span></TD>
                         <TD width="11%" class="DataGrid_Body_Cell" onmouseover="HoverCell(this);" onmouseout="unHoverCell(this);"><INPUT type="hidden" name="inpcTaxIdxx" id="fieldTaxid" value=""></INPUT><span id="fieldNametax">xx16%</span></TD>
                       </TR>
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFromMultiple_Receipt.html	Mon Apr 21 09:35:49 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFromMultiple_Receipt.html	Mon Apr 21 09:42:24 2008 +0000
@@ -185,7 +185,7 @@
       <TD > <SPAN >Quantity:</SPAN></TD>
       <TD > <TABLE border="0" cellspacing="0" cellpadding="0" summary="">
           <TR> 
-            <TD > <INPUT type="text" onkeydown="auto_completar_numero(this, true, true);return true;" size="10"  maxlength="10" name="inpmovementqty"></INPUT>
+            <TD > <INPUT type="text" onkeydown="auto_complete_number(this, true, true);return true;" size="10"  maxlength="10" name="inpmovementqty"></INPUT>
             </TD>
             <TD > <A href="#" onclick="calculator('frmMain.inpmovementqty', document.frmMain.inpmovementqty.value, false);return false;" onmouseout="window.status='';return true;" onmouseover="window.status='Show calculator';return true;" > 
               <img  alt="Calculator" title="Calculator" width="16" height="16" border="0" src="../../../../../web/images/Calc.jpg"></IMG></A></TD>
@@ -199,7 +199,7 @@
       <TD > <SPAN >Order Qty</SPAN></TD>
       <TD > <TABLE border="0" cellspacing="0" cellpadding="0" summary="">
           <TR> 
-            <TD > <INPUT type="text" onkeydown="auto_completar_numero(this, true, true);return true;" size="10"  maxlength="10" name="inpquantityorder"></INPUT>
+            <TD > <INPUT type="text" onkeydown="auto_complete_number(this, true, true);return true;" size="10"  maxlength="10" name="inpquantityorder"></INPUT>
             </TD>
             <TD > <A href="#" onclick="calculator('frmMain.inpmovementqty', document.frmMain.inpmovementqty.value, false);return false;" onmouseout="window.status='';return true;" onmouseover="window.status='Show calculator';return true;" > 
               <img  alt="Calculator" title="Calculator" width="16" height="16" border="0" src="../../../../../web/images/Calc.jpg"></IMG></A></TD>
@@ -243,7 +243,7 @@
         <td ><span >No. lines:&nbsp;</span></td>
       <TD colspan="3" > <TABLE border="0" cellspacing="0" cellpadding="0" summary="">
           <TR> 
-            <TD > <INPUT type="text" onkeydown="auto_completar_numero(this, false, false);return true;" size="10"  maxlength="10" name="inpnumerolineas"></INPUT>
+            <TD > <INPUT type="text" onkeydown="auto_complete_number(this, false, false);return true;" size="10"  maxlength="10" name="inpnumerolineas"></INPUT>
             </TD>
             <TD > <A href="#" onclick="calculator('frmMain.inpnumerolineas', document.frmMain.inpnumerolineas.value, false);return false;" onmouseout="window.status='';return true;" onmouseover="window.status='Show calculator';return true;" > 
               <img  alt="Calculator" title="Calculator" width="16" height="16" border="0" src="../../../../../web/images/Calc.jpg"></IMG></A></TD>
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFromMultiple_Shipment.html	Mon Apr 21 09:35:49 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFromMultiple_Shipment.html	Mon Apr 21 09:42:24 2008 +0000
@@ -177,10 +177,10 @@
         <TD id="fieldProduct">xx</TD>
     <td  id="fieldLocator">xx</td>
         <TD id="fieldAttribute">xx</TD>
-        <TD > <INPUT name="inpmovementqtyxx" type="text" id="fieldMovementQty" size="8" value="0" onkeyup="auto_completar_numero(this, true, true);return true;" disabled="" ></INPUT>
+        <TD > <INPUT name="inpmovementqtyxx" type="text" id="fieldMovementQty" size="8" value="0" onkeyup="auto_complete_number(this, true, true);return true;" disabled="" ></INPUT>
         </TD>
         <TD id="fieldUOM">xx</TD>
-        <TD > <INPUT name="inpquantityorderxx" type="text" id="fieldQuantityOrder" size="8" value="0" onkeyup="auto_completar_numero(this, true, true);return true;" disabled="" ></INPUT>
+        <TD > <INPUT name="inpquantityorderxx" type="text" id="fieldQuantityOrder" size="8" value="0" onkeyup="auto_complete_number(this, true, true);return true;" disabled="" ></INPUT>
         </TD>
         <TD id="fieldProductUOM">xx</TD>
       </TR>
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Settlement.html	Mon Apr 21 09:35:49 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Settlement.html	Mon Apr 21 09:42:24 2008 +0000
@@ -510,7 +510,7 @@
                 <TD class="DataGrid_Body_Cell" id="fieldPlannedDate">xxP</TD>
                 <TD class="DataGrid_Body_Cell" id="fieldAmount">xx</TD>
                 <TD class="DataGrid_Body_Cell" id="fieldCurrency">xx</TD>
-                <TD class="DataGrid_Body_Cell"><INPUT name="inpwriteoffxx" type="text" id="fieldWriteOff" size="8" value="0" onkeyup="auto_completar_numero(this, true, true);return true;"></INPUT></TD>
+                <TD class="DataGrid_Body_Cell"><INPUT name="inpwriteoffxx" type="text" id="fieldWriteOff" size="8" value="0" onkeyup="auto_complete_number(this, true, true);return true;"></INPUT></TD>
                 <TD class="DataGrid_Body_Cell"><SPAN class="Checkbox_container_NOT_Focused"><INPUT type="checkbox" name="inpispaidxx" value="Y" id="fieldIsPaid"></INPUT></SPAN></TD></TR></DIV></TABLE>
               </TR>
             </DIV>
--- a/src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.html	Mon Apr 21 09:35:49 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.html	Mon Apr 21 09:42:24 2008 +0000
@@ -426,7 +426,7 @@
                   <TD width="409" class="DataGrid_Body_Cell" id="fieldProductName">xx</TD>
                   <TD width="198" class="DataGrid_Body_Cell" id="fieldDescription">xx</TD>
                   <TD width="146" class="DataGrid_Body_Cell" id="fieldTotalQty">xx</TD>
-                  <TD width="131" class="DataGrid_Body_Cell"> <INPUT name="inpQtyorderedxx" type="text" id="fieldQtyordered" size="5" value="0" onkeyup="auto_completar_numero(this, true, true);return true;" class="dojoValidateValid readonly" disabled></INPUT>
+                  <TD width="131" class="DataGrid_Body_Cell"> <INPUT name="inpQtyorderedxx" type="text" id="fieldQtyordered" size="5" value="0" onkeyup="auto_complete_number(this, true, true);return true;" class="dojoValidateValid readonly" disabled></INPUT>
                   </TD>
                   <TD class="DataGrid_Body_Cell">
                     <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
--- a/src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder.html	Mon Apr 21 09:35:49 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder.html	Mon Apr 21 09:42:24 2008 +0000
@@ -485,8 +485,8 @@
                                         <td class="DataGrid_Body_Cell" id="fieldSelNeedByDate">xx02-02-2010</td>
                                         <td class="DataGrid_Body_Cell" id="fieldReqQty">xx30.00</td>
                                         <td class="DataGrid_Body_Cell" id="fieldMatchedQty">xx30.00</td>
-                                        <td class="TextBox_ContentCell"> <input name="inpQtyxx" id="fieldSelQty" type="text" size="5" value="" onkeyup="auto_completar_numero(this, true, true);return true;" class="dojoValidateValid readonly" disabled></input></td>
-                                        <td class="TextBox_ContentCell"> <input name="inpPricexx" id="fieldSelPrice" type="text" size="5" value="" onkeyup="auto_completar_numero(this, true, true);return true;" class="dojoValidateValid readonly" disabled></input></td>
+                                        <td class="TextBox_ContentCell"> <input name="inpQtyxx" id="fieldSelQty" type="text" size="5" value="" onkeyup="auto_complete_number(this, true, true);return true;" class="dojoValidateValid readonly" disabled></input></td>
+                                        <td class="TextBox_ContentCell"> <input name="inpPricexx" id="fieldSelPrice" type="text" size="5" value="" onkeyup="auto_complete_number(this, true, true);return true;" class="dojoValidateValid readonly" disabled></input></td>
                                         <td class="DataGrid_Body_Cell" id="fieldPriceList">xx300</td>
                                       </tr>
                                     </div>
--- a/src/org/openbravo/erpCommon/ad_forms/ShowSessionPreferences.html	Mon Apr 21 09:35:49 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/ShowSessionPreferences.html	Mon Apr 21 09:42:24 2008 +0000
@@ -253,7 +253,7 @@
                     <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
                       <TR>
                         <TD class="TextBox_ContentCell">
-                          <INPUT dojoType="openbravo:RealNumberTextbox" class="TextBox_btn_OneCell_width" type="text" name="inpRecordRange" id="RecordRange" value="xx" maxlength="10" onkeydown="auto_completar_numero(this, true, true);return true;"></INPUT><script>djConfig.searchIds.push("RecordRange");</script>
+                          <INPUT dojoType="openbravo:RealNumberTextbox" class="TextBox_btn_OneCell_width" type="text" name="inpRecordRange" id="RecordRange" value="xx" maxlength="10" onkeydown="auto_complete_number(this, true, true);return true;"></INPUT><script>djConfig.searchIds.push("RecordRange");</script>
                         </TD>
                         <TD class="FieldButton_ContentCell">
                           <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Calculator'; return true;" onblur="window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"   onclick="calculator('frmMain.inpRecordRange', document.frmMain.inpRecordRange.value, false);return false;">
@@ -274,7 +274,7 @@
                     <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
                       <TR>
                         <TD class="TextBox_ContentCell">
-                          <INPUT dojoType="openbravo:RealNumberTextbox" class="TextBox_btn_OneCell_width" type="text" name="inpTransactionalRange" id="paramTransactionalRange" value="xx" maxlength="10" onkeydown="auto_completar_numero(this, true, true);return true;"></INPUT><script>djConfig.searchIds.push("paramTransactionalRange");</script>
+                          <INPUT dojoType="openbravo:RealNumberTextbox" class="TextBox_btn_OneCell_width" type="text" name="inpTransactionalRange" id="paramTransactionalRange" value="xx" maxlength="10" onkeydown="auto_complete_number(this, true, true);return true;"></INPUT><script>djConfig.searchIds.push("paramTransactionalRange");</script>
                         </TD>
                         <TD class="FieldButton_ContentCell">
                           <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Calculator'; return true;" onblur="window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"   onclick="calculator('frmMain.inpTransactionalRange', document.frmMain.inpTransactionalRange.value, false);return false;">
@@ -295,7 +295,7 @@
                     <TABLE border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
                       <TR>
                         <TD class="TextBox_ContentCell">
-                          <INPUT dojoType="openbravo:RealNumberTextbox" class="TextBox_btn_OneCell_width" type="text" name="inpRecordRangeInfo" id="RecordRangeInfo" value="xx" maxlength="10" onkeydown="auto_completar_numero(this, true, true);return true;"></INPUT><script>djConfig.searchIds.push("RecordRangeInfo");</script>
+                          <INPUT dojoType="openbravo:RealNumberTextbox" class="TextBox_btn_OneCell_width" type="text" name="inpRecordRangeInfo" id="RecordRangeInfo" value="xx" maxlength="10" onkeydown="auto_complete_number(this, true, true);return true;"></INPUT><script>djConfig.searchIds.push("RecordRangeInfo");</script>
                         </TD>
                         <TD class="FieldButton_ContentCell">
                           <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Calculator'; return true;" onblur="window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"   onclick="calculator('frmMain.inpTransactionalRange', document.frmMain.inpTransactionalRange.value, false);return false;">
--- a/src/org/openbravo/erpCommon/businessUtility/Buscador.java	Mon Apr 21 09:35:49 2008 +0000
+++ b/src/org/openbravo/erpCommon/businessUtility/Buscador.java	Mon Apr 21 09:42:24 2008 +0000
@@ -400,8 +400,8 @@
         strHtml.append("name=\"inpParam").append(FormatUtilities.replace(fields[i].columnname)).append("\" ");
         strHtml.append("maxlength=\"").append(fields[i].fieldlength).append("\" ");
         strHtml.append("value=\"").append(fields[i].value).append("\" ");
-        if (Utility.isDecimalNumber(fields[i].reference)) strHtml.append("onkeydown=\"validateNumberBox(this.id);auto_completar_numero(this, true, true);return true;\" ");
-        else if (Utility.isIntegerNumber(fields[i].reference)) strHtml.append("onkeydown=\"validateNumberBox(this.id);auto_completar_numero(this, false, false);return true;\" ");
+        if (Utility.isDecimalNumber(fields[i].reference)) strHtml.append("onkeydown=\"validateNumberBox(this.id);auto_complete_number(this, true, true);return true;\" ");
+        else if (Utility.isIntegerNumber(fields[i].reference)) strHtml.append("onkeydown=\"validateNumberBox(this.id);auto_complete_number(this, false, false);return true;\" ");
         strHtml.append(">");
         if (Utility.isDecimalNumber(fields[i].reference) || Utility.isIntegerNumber(fields[i].reference)) {
           strHtml.append("<td class=\"FieldButton_ContentCell\">\n");
@@ -435,10 +435,10 @@
         strHtml.append("value=\"").append(fields[i].value).append("\" ");
         if (Utility.isDecimalNumber(fields[i].reference)) {
           scriptCalculator = true;
-          strHtml.append("onkeydown=\"auto_completar_numero(this, true, true);return true;\" ");
+          strHtml.append("onkeydown=\"auto_complete_number(this, true, true);return true;\" ");
         } else if (Utility.isIntegerNumber(fields[i].reference)) {
           scriptCalculator = true;
-          strHtml.append("onkeydown=\"auto_completar_numero(this, false, false);return true;\" ");
+          strHtml.append("onkeydown=\"auto_complete_number(this, false, false);return true;\" ");
         }
         strHtml.append(">");
         strHtml.append("</td>");//<td class=\"FieldButton_bg\">");
@@ -460,8 +460,8 @@
           strHtml.append("name=\"inpParam").append(FormatUtilities.replace(fields[i].columnname)).append("_f\" ");
           strHtml.append("maxlength=\"").append(fields[i].fieldlength).append("\" ");
           strHtml.append("value=\"").append(value).append("\" ");
-          if (Utility.isDecimalNumber(fields[i].reference)) strHtml.append("onkeydown=\"validateNumberBox(this.id);auto_completar_numero(this, true, true);return true;\" ");
-          else if (Utility.isIntegerNumber(fields[i].reference)) strHtml.append("onkeydown=\"validateNumberBox(this.id);auto_completar_numero(this, false, false);return true;\" ");
+          if (Utility.isDecimalNumber(fields[i].reference)) strHtml.append("onkeydown=\"validateNumberBox(this.id);auto_complete_number(this, true, true);return true;\" ");
+          else if (Utility.isIntegerNumber(fields[i].reference)) strHtml.append("onkeydown=\"validateNumberBox(this.id);auto_complete_number(this, false, false);return true;\" ");
           strHtml.append(">");
 
           strHtml.append("<td class=\"FieldButton_ContentCell\">\n<TABLE class=\"FieldButton\" onclick=\"calculator('frmMain.");
--- a/src/org/openbravo/erpCommon/info/AttributeSetInstance.java	Mon Apr 21 09:35:49 2008 +0000
+++ b/src/org/openbravo/erpCommon/info/AttributeSetInstance.java	Mon Apr 21 09:42:24 2008 +0000
@@ -380,7 +380,7 @@
       strHtml.append("name=\"inplot\" ");
       strHtml.append("maxlength=\"20\" ");
       strHtml.append("class=\"dojoValidateValid TextBox_OneCell_width");
-      //strHtml.append("onkeydown=\"auto_completar_numero(this, true, true);return true;\" ");
+      //strHtml.append("onkeydown=\"auto_complete_number(this, true, true);return true;\" ");
       if (!fields[0].mLotctlId.equals("") && strIsSOTrx.equals("N")) {
         strHtml.append(" readonly\" readonly=true ");
       } else {
@@ -399,7 +399,7 @@
       strHtml.append("name=\"inpserno\" ");
       strHtml.append("maxlength=\"20\" ");
       strHtml.append("class=\"dojoValidateValid TextBox_OneCell_width");
-      //strHtml.append("onkeydown=\"auto_completar_numero(this, true, true);return true;\" ");
+      //strHtml.append("onkeydown=\"auto_complete_number(this, true, true);return true;\" ");
       if (!fields[0].mSernoctlId.equals("") && strIsSOTrx.equals("N")) {
         strHtml.append(" readonly\" readonly=true ");
       } else {
--- a/web/js/utils.js	Mon Apr 21 09:35:49 2008 +0000
+++ b/web/js/utils.js	Mon Apr 21 09:42:24 2008 +0000
@@ -2790,25 +2790,25 @@
 * @type Boolean
 * @see #obtainKeyCode
 */
-function auto_completar_numero(obj, bolDecimal, bolNegativo, evt) {
-  var numero;
+function auto_complete_number(obj, bolDecimal, bolNegativo, evt) {
+  var number;
   if (document.all) evt = window.event;
-  if (document.layers) { numero = evt.which; }
-  if (document.all)    { numero = evt.keyCode;}
-  if (numero != obtainKeyCode("ENTER") && numero != obtainKeyCode("LEFTARROW") && numero != obtainKeyCode("RIGHTARROW") && numero != obtainKeyCode("UPARROW") && numero != obtainKeyCode("DOWNARROW") && numero != obtainKeyCode("DELETE") && numero != obtainKeyCode("BACKSPACE") && numero != obtainKeyCode("END") && numero != obtainKeyCode("HOME") && !evt["ctrlKey"]) {
-    if (numero>95 && numero <106) { //Teclado numérico
-      numero = numero - 96;
-      if(isNaN(numero)) {
+  if (document.layers) { number = evt.which; }
+  if (document.all)    { number = evt.keyCode;}
+  if (number != obtainKeyCode("ENTER") && number != obtainKeyCode("LEFTARROW") && number != obtainKeyCode("RIGHTARROW") && number != obtainKeyCode("UPARROW") && number != obtainKeyCode("DOWNARROW") && number != obtainKeyCode("DELETE") && number != obtainKeyCode("BACKSPACE") && number != obtainKeyCode("END") && number != obtainKeyCode("HOME") && !evt["ctrlKey"]) {
+    if (number>95 && number <106) { //Teclado numérico
+      number = number - 96;
+      if(isNaN(number)) {
         if (document.all) evt.returnValue = false;
         return false;
       }
-    } else if (numero!=obtainKeyCode("DECIMAL") && numero != obtainKeyCode("NUMBERDECIMAL") && numero != obtainKeyCode("NEGATIVE") && numero != obtainKeyCode("NUMBERNEGATIVE")) { //No es "-" ni "."
-      numero = String.fromCharCode(numero);
-      if(isNaN(numero)) {
+    } else if (number!=obtainKeyCode("DECIMAL") && number != obtainKeyCode("NUMBERDECIMAL") && number != obtainKeyCode("NEGATIVE") && number != obtainKeyCode("NUMBERNEGATIVE")) { //No es "-" ni "."
+      number = String.fromCharCode(number);
+      if(isNaN(number)) {
         if (document.all) evt.returnValue = false;
         return false;
       }
-    } else if (numero==obtainKeyCode("DECIMAL") || numero==obtainKeyCode("NUMBERDECIMAL")) { //Es "."
+    } else if (number==obtainKeyCode("DECIMAL") || number==obtainKeyCode("NUMBERDECIMAL")) { //Es "."
       if (bolDecimal) {
         if (obj.value==null || obj.value=="") return true;
         else {
@@ -3472,7 +3472,6 @@
   return true;
 }
 
-
 /**
 * Deprecated in 2.40: Defines a defult action on each page, the one that will be executed when the user hit the ENTER key. This function is shared in pages containing frames.
 * @param {String} accion Default command to be executed when the user hit the ENTER key.
@@ -3490,7 +3489,6 @@
   return true;
 }
 
-
 /**
 * Deprecated in 2.40: Builds the keys array on each screen. Each key that we want to use should have this structure.
 * @param {Sting} tecla A text version of the handled key.
@@ -3505,7 +3503,6 @@
   this.teclaAuxiliar = teclaAuxiliar;
 }
 
-
 /**
 * Deprecated in 2.40: Returns the ASCII code of the given key
 * @param {String} codigo Text version of a key
@@ -3555,7 +3552,6 @@
   }
 }
 
-
 /**
 * Deprecated in 2.40: Handles the events execution of keys pressed, based on the events registered in the arrTeclas global array.   
 * @param {Event} CodigoTecla Code of the key pressed.
@@ -3653,5 +3649,55 @@
 }
 
 /**
+* Deprecated in 2.40: Handles the onKeyDown and onKeyUp event, for an specific numeric typing control.
+* @param {Object} obj Field where the numeric typing will be evaluated.
+* @param {Boolean} bolDecimal Defines if a float number is allowed.
+* @param {Boolean} bolNegativo Defines if a negative number is allowed.
+* @param {Event} evt The event handling object associated with the field.
+* @returns True if is an allowed number, otherwise false.
+* @type Boolean
+* @see #obtenerCodigoTecla
+*/
+function auto_completar_numero(obj, bolDecimal, bolNegativo, evt) {
+  var numero;
+  if (document.all) evt = window.event;
+  if (document.layers) { numero = evt.which; }
+  if (document.all)    { numero = evt.keyCode;}
+  if (numero != obtenerCodigoTecla("ENTER") && numero != obtenerCodigoTecla("LEFTARROW") && numero != obtenerCodigoTecla("RIGHTARROW") && numero != obtenerCodigoTecla("UPARROW") && numero != obtenerCodigoTecla("DOWNARROW") && numero != obtenerCodigoTecla("DELETE") && numero != obtenerCodigoTecla("BACKSPACE") && numero != obtenerCodigoTecla("END") && numero != obtenerCodigoTecla("HOME") && !evt["ctrlKey"]) {
+    if (numero>95 && numero <106) { //Teclado numérico
+      numero = numero - 96;
+      if(isNaN(numero)) {
+        if (document.all) evt.returnValue = false;
+        return false;
+      }
+    } else if (numero!=obtenerCodigoTecla("DECIMAL") && numero != obtenerCodigoTecla("NUMBERDECIMAL") && numero != obtenerCodigoTecla("NEGATIVE") && numero != obtenerCodigoTecla("NUMBERNEGATIVE")) { //No es "-" ni "."
+      numero = String.fromCharCode(numero);
+      if(isNaN(numero)) {
+        if (document.all) evt.returnValue = false;
+        return false;
+      }
+    } else if (numero==obtenerCodigoTecla("DECIMAL") || numero==obtenerCodigoTecla("NUMBERDECIMAL")) { //Es "."
+      if (bolDecimal) {
+        if (obj.value==null || obj.value=="") return true;
+        else {
+          var point = obj.value.indexOf(".");
+          if (point != -1) {
+            point = obj.value.indexOf(".", point+1);
+            if (point==-1) return true;
+          } else return true;
+        }
+      }
+      if (document.all) evt.returnValue = false;
+      return false;
+    } else { //Es "-"
+      if (bolNegativo && (obj.value==null || obj.value.indexOf("-")==-1)) return true;
+      if (document.all) evt.returnValue = false;
+      return false;
+    }
+  }
+  return true;
+}
+
+/**
 * End of deprecated functions in 2.40
 */
\ No newline at end of file