Browse Source

more minor improvements to currency display

fix-133-memory-crash
Dan Janosik 6 years ago
parent
commit
823fd04022
No known key found for this signature in database GPG Key ID: C6F8CE9FFDB2CED2
  1. 8
      app/utils.js

8
app/utils.js

@ -149,9 +149,9 @@ function formatCurrencyAmountWithForcedDecimalPlaces(amount, formatType, forcedD
var dec = new Decimal(amount); var dec = new Decimal(amount);
var decimalPlaces = formatInfo.decimalPlaces; var decimalPlaces = formatInfo.decimalPlaces;
if (decimalPlaces == 0 && dec < 1) { //if (decimalPlaces == 0 && dec < 1) {
decimalPlaces = 5; // decimalPlaces = 5;
} //}
if (forcedDecimalPlaces >= 0) { if (forcedDecimalPlaces >= 0) {
decimalPlaces = forcedDecimalPlaces; decimalPlaces = forcedDecimalPlaces;
@ -166,7 +166,7 @@ function formatCurrencyAmountWithForcedDecimalPlaces(amount, formatType, forcedD
if (global.exchangeRates != null && global.exchangeRates[formatInfo.multiplier] != null) { if (global.exchangeRates != null && global.exchangeRates[formatInfo.multiplier] != null) {
dec = dec.times(global.exchangeRates[formatInfo.multiplier]); dec = dec.times(global.exchangeRates[formatInfo.multiplier]);
return formatInfo.symbol + addThousandsSeparators(dec.toDecimalPlaces(decimalPlaces)); return addThousandsSeparators(dec.toDecimalPlaces(decimalPlaces)) + " " + formatInfo.name;
} }
} }
} }

Loading…
Cancel
Save