Helper function to get a formatted price for a given currency and locale.

@param int $price
@param string $symbol
@param string $locale
@Groups({"cart"})

@return string price
432084
public function getFormattedPrice($price, $symbol = 'EUR', $locale = 'de')
    {
        return $this->priceFormatter->format(
            (float) $price,
            null,
            $locale,
            $symbol,
            PriceFormatter::CURRENCY_LOCATION_SUFFIX
        );
    }
242213
function getLocaleNumberSymbol(locale, symbol) {
    var data = findLocaleData(locale);
    var res = data[13 /* NumberSymbols */][symbol];
    if (typeof res === 'undefined') {
        if (symbol === NumberSymbol.CurrencyDecimal) {
            return data[13 /* NumberSymbols */][NumberSymbol.Decimal];
        }
        else if (symbol === NumberSymbol.CurrencyGroup) {
            return data[13 /* NumberSymbols */][NumberSymbol.Group];
        }
    }
    return res;
}
56561
public function formatByIntlLocalizedDecimal(
        $locale = null,
        Currencies $currencies = null,
        $style = NumberFormatter::CURRENCY
    ) {
        $numberFormatter = new NumberFormatter($locale ?: static::getLocale(), $style);
        $formatter = new IntlLocalizedDecimalFormatter($numberFormatter, $currencies ?: static::getCurrencies());

        return $this->formatByFormatter($formatter);
    }
250118
protected function getFormatter($locale) {
		if (! isset($this->formatters[$locale])) {
			$this->formatters[$locale] = new NumberFormatter($locale, NumberFormatter::CURRENCY);
		}
		
		return $this->formatters[$locale];
	}
996340
public function getNetShippingCostsFormatted($locale = null)
    {
        return $this->priceFormatter->format((float)$this->entity->getNetShippingCosts(), null, $locale);
    }
285629
public function getScalePriceForCurrency($currency = 'EUR')
    {
        $scalePrice = null;
        $prices = $this->entity->getPrices();
        if ($prices) {
            foreach ($prices as $price) {
                if ($price->getCurrency()->getCode() == $currency) {
                    $scalePrice[] = $price;
                }
            }
        }

        return $scalePrice;
    }
969777
def get_price(ctx, currency):
    """"""
    appid = ctx.obj['appid']
    title = ctx.obj['title']

    item_ = Item(appid, title)
    item_.get_price_data(currency)

    click.secho('Lowest price: %s %s' % (item_.price_lowest, item_.price_currency), fg='green')
770335
private function retrievePriceByCurrency(array &$prices, $currencyId)
    {
        /** @var ProductPrice $price */
        foreach ($prices as $index => $price) {
            if ($currencyId === $price->getCurrency()->getId()) {
                unset($prices[$index]);

                return $price;
            }
        }

        return null;
    }
45039
public function format($locale = null, Currencies $currencies = null, $style = NumberFormatter::CURRENCY)
    {
        return $this->formatByIntl($locale, $currencies, $style);
    }
1143210
public function getPrice($currency = self::DEFAULT_CURRENCY)
    {
        $priceKey = 'price_'.strtolower($currency);
        $response = $this->request(sprintf('ticker/%s/?convert=%s', static::DECRED_TICKER, $currency));

        if (!isset($response[$priceKey])) {
            throw new \RuntimeException(sprintf('Missing currency rate %s!', $currency));
        }

        return $response[$priceKey];
    }
1199244
public function getSpecialPriceForCurrency($currency = 'EUR')
    {
        $specialPrices = $this->entity->getSpecialPrices();
        if ($specialPrices) {
            foreach ($specialPrices as $specialPriceEntity) {
                if ($specialPriceEntity->getCurrency()->getCode() == $currency) {
                    $startDate = $specialPriceEntity->getStartDate();
                    $endDate = $specialPriceEntity->getEndDate();
                    $now = new \DateTime();
                    if (($now >= $startDate && $now <= $endDate) ||
                        ($now >= $startDate && empty($endDate)) ||
                        (empty($startDate) && empty($endDate))
                    ) {
                        return $specialPriceEntity;
                    }
                }
            }
        }

        return null;
    }
227196
public function getBasePriceForCurrency($currency = 'EUR')
    {
        $prices = $this->entity->getPrices();
        if ($prices) {
            foreach ($prices as $price) {
                if ($price->getCurrency()->getCode() == $currency && $price->getMinimumQuantity() == 0) {
                    return new ProductPrice($price, $this->locale);
                }
            }
        }

        return null;
    }
684096
public function formatMoney(Money $money, $decPoint = ',', $thousandsSep = ' ')
    {
        $symbol = $this->formatCurrency($money);
        $amount = $this->formatAmount($money, $decPoint, $thousandsSep);
        $price = $amount." ".$symbol;

        return $price;
    }
1115535
public function formatPrice($price)
    {
        $currencies = new ISOCurrencies();

        $numberFormatter = new \NumberFormatter($this->locale, \NumberFormatter::CURRENCY);
        $moneyFormatter = new IntlMoneyFormatter($numberFormatter, $currencies);

        return $moneyFormatter->format($price);
    }
823482
public function getCurrencyCode($currency = null)
    {
        if ($currency === null) {
            $currency = $this->_currency;
        }

        $code = KlarnaCurrency::getCode($currency);
        return (string) $code;
    }
478229
public static function priceToStringLong($price, $keepFloat = true, $currency = "uah", $language = null) {
        if ($language == null) $language = self::$_defaultLanguage;
        if (empty(self::$_numbersScript[$language]) || empty(self::$_numbersScript[$language]['sign'][$currency])) {
            trigger_error('You do not have a "'.$language.'/'.$currency.'" version for price labels. Add it via Inflector::addNumberLocalization');
        }

        $segments = array_merge(self::$_numbersScript[$language]['sign'][$currency], self::$_numbersScript[$language]['segments']);

        return self::_numberToString($price, self::$_numbersScript[$language]['forms'], self::$_numbersScript[$language]['sex'], $segments, $keepFloat);
    }
869913
public function getBulkPriceForCurrency($quantity, $currency = 'EUR')
    {
        $bulkPrice = null;
        $prices = $this->entity->getPrices();
        if ($prices) {
            $bestDifference = PHP_INT_MAX;
            foreach ($prices as $price) {
                if ($price->getCurrency()->getCode() == $currency &&
                    $price->getMinimumQuantity() <= $quantity &&
                    ($quantity - $price->getMinimumQuantity()) < $bestDifference
                ) {
                    $bestDifference = $quantity - $price->getMinimumQuantity();
                    $bulkPrice = $price;
                }
            }
        }

        return $bulkPrice;
    }