improvement and format fixes
authormonishdeb <monish.deb@webaccessglobal.com>
Thu, 9 Apr 2015 16:32:14 +0000 (22:02 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Thu, 9 Apr 2015 16:32:14 +0000 (22:02 +0530)
templates/CRM/Batch/Form/Entry.js

index fcf5b4ecb5ea3a9a92b6aeaad52905a6c2ce1bbc..5a5ce82dcee77fc3048c0be3885897b50bf720f0 100755 (executable)
@@ -184,11 +184,12 @@ function formatMoney(amount) {
   var d = CRM.setting.monetaryDecimalPoint;
 
   c = isNaN(c = Math.abs(c)) ? 2 : c;
-  t = t === undefined ? "." : t, s = n < 0 ? "-" : "";
+  t = t === undefined ? "." : t;
   d = d === undefined ? "," : d;
 
   var n = amount,
     i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "",
+    s = n < 0 ? "-" : "",
     j = (j = i.length) > 3 ? j % 3 : 0;
 
   return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");