This commit is contained in:
nakorn
2021-10-05 22:26:47 +07:00
parent e5cb49c75e
commit be227895a5
28 changed files with 2446 additions and 62 deletions

View File

@@ -23,10 +23,15 @@
//=====================================================
function formatNumber(num) {
if(num === "" || num === null) return "";
if (num === "" || num === null || isNaN(num)) return "";
return num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
}
function formatNumber2(num, d) {
if (num === "" || num === null || isNaN(num)) return "";
return num.toFixed(d).replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,')
}
function formatNumberTemp(num) {
if(num === "" || num === null) return "";
return num.toString();