From 0fd454b60a66d0033a7b43e07b790a9d70c19802 Mon Sep 17 00:00:00 2001 From: monishdeb Date: Thu, 9 Apr 2015 22:02:14 +0530 Subject: [PATCH] improvement and format fixes --- templates/CRM/Batch/Form/Entry.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/CRM/Batch/Form/Entry.js b/templates/CRM/Batch/Form/Entry.js index fcf5b4ecb5..5a5ce82dce 100755 --- a/templates/CRM/Batch/Form/Entry.js +++ b/templates/CRM/Batch/Form/Entry.js @@ -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) : ""); -- 2.25.1