clickup #6zrfkc

This commit is contained in:
Pairat Sangprasert
2021-04-15 16:09:50 +07:00
parent ddb4232254
commit ff22eababb
4 changed files with 25 additions and 13 deletions

View File

@@ -665,6 +665,16 @@ function coreFormatPrice(value, digits) {
var currency = 0;
if (value) {
currency = (value / 1).toFixed(digits);
} else {
currency = currency.toFixed(digits);
}
return currency.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
function coreCurrencyToDecimal(currency) {
var number = 0;
if (currency) {
number = Number(currency.replace(/[^0-9.-]+/g, ""));
}
return number;
}