return self::formatNumericByFormat($amount, '%!.' . $numberOfPlaces . 'i');
}
$money = Money::of($amount, CRM_Core_Config::singleton()->defaultCurrency, new CustomContext($numberOfPlaces), RoundingMode::CEILING);
- $formatter = new \NumberFormatter(CRM_Core_I18n::getLocale(), NumberFormatter::CURRENCY);
+ // @todo - we specify en_US here because we don't want this function to do
+ // currency replacement at the moment because
+ // formatLocaleNumericRoundedByPrecision is doing it and if it
+ // is done there then it is swapped back in there.. This is a short term
+ // fix to allow us to resolve formatLocaleNumericRoundedByPrecision
+ // and to make the function comments correct - but, we need to reconsider this
+ // in master as it is probably better to use locale than our currency separator fields.
+ $formatter = new \NumberFormatter('en_US', NumberFormatter::CURRENCY);
$formatter->setSymbol(\NumberFormatter::CURRENCY_SYMBOL, '');
$formatter->setAttribute(\NumberFormatter::MIN_FRACTION_DIGITS, $numberOfPlaces);
return $money->formatWith($formatter);