details:   https://code.openbravo.com/erp/devel/pi/rev/1c75a6afca4e
changeset: 26127:1c75a6afca4e
user:      Augusto Mauch <augusto.mauch <at> openbravo.com>
date:      Thu Mar 05 10:49:36 2015 +0100
summary:   Related with issue 29113: Avoid using isc in 
OB.Utilities.Number.roundJSNumber

The OB.Utilities.Number.roundJSNumber function is used in the mobile core 
module, but smartclient is not available there. 
OB.Utilities.Number.roundJSNumber should not be used there (see [1]), but in 
the meantime we are going to avoid using smartclient functions in roundJSNumber.

isc.isA.String has been replaced with (typeof num === 'string')

[1] https://issues.openbravo.com/view.php?id=29139

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-number.js
 |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r e9d73be9949d -r 1c75a6afca4e 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-number.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-number.js
 Thu Mar 05 10:15:41 2015 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-number.js
 Thu Mar 05 10:49:36 2015 +0100
@@ -39,7 +39,7 @@
   if (isNaN(num)) {
     return NaN;
   }
-  strNum = (isc.isA.String(num) ? num : String(num));
+  strNum = ((typeof num === 'string') ? num : String(num));
   return parseFloat(new BigDecimal(strNum).setScale(dec, 
BigDecimal.prototype.ROUND_HALF_UP));
 };
 

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to