Improved check for number parameter, check also for NaN
authorIván Perdomo <ivan.perdomo@openbravo.com>
Fri, 31 Dec 2010 10:06:45 +0100
changeset 9507 b60bcce81c3a
parent 9506 cfca6a9741cb
child 9508 f27092744645
child 9509 19e6880578da
Improved check for number parameter, check also for NaN
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-utilities.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-utilities.js	Fri Dec 31 09:22:25 2010 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-utilities.js	Fri Dec 31 10:06:45 2010 +0100
@@ -761,7 +761,7 @@
 // Return:
 // * The OB formatted number.
 OB.Utilities.Number.JSToOBMasked = function(number, maskNumeric, decSeparator, groupSeparator, groupInterval){
-  if (typeof number !== 'number') {
+  if (!isc.isA.Number(number)) {
     return '';
   }
   var formattedNumber = number;