Browse Source
more minor improvements to currency display
fix-133-memory-crash
Dan Janosik
6 years ago
No known key found for this signature in database
GPG Key ID: C6F8CE9FFDB2CED2
1 changed files with
4 additions and
4 deletions
-
app/utils.js
|
|
@ -149,9 +149,9 @@ function formatCurrencyAmountWithForcedDecimalPlaces(amount, formatType, forcedD |
|
|
|
var dec = new Decimal(amount); |
|
|
|
|
|
|
|
var decimalPlaces = formatInfo.decimalPlaces; |
|
|
|
if (decimalPlaces == 0 && dec < 1) { |
|
|
|
decimalPlaces = 5; |
|
|
|
} |
|
|
|
//if (decimalPlaces == 0 && dec < 1) {
|
|
|
|
// decimalPlaces = 5;
|
|
|
|
//}
|
|
|
|
|
|
|
|
if (forcedDecimalPlaces >= 0) { |
|
|
|
decimalPlaces = forcedDecimalPlaces; |
|
|
@ -166,7 +166,7 @@ function formatCurrencyAmountWithForcedDecimalPlaces(amount, formatType, forcedD |
|
|
|
if (global.exchangeRates != null && global.exchangeRates[formatInfo.multiplier] != null) { |
|
|
|
dec = dec.times(global.exchangeRates[formatInfo.multiplier]); |
|
|
|
|
|
|
|
return formatInfo.symbol + addThousandsSeparators(dec.toDecimalPlaces(decimalPlaces)); |
|
|
|
return addThousandsSeparators(dec.toDecimalPlaces(decimalPlaces)) + " " + formatInfo.name; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|