Returns the configured currency
963046
def get_currency(self):
        
        bika_setup = api.get_bika_setup()
        currency = bika_setup.getCurrency()
        currencies = locales.getLocale('en').numbers.currencies
        return currencies[currency]
797984
protected function getCurrency()
    {
        if (null === $this->currency) {
            $this->currency = $this->getSession() ? $this->getSession()->getCurrency(true) : Currency::getDefaultCurrency();
        }

        return $this->currency;
    }
1095813
public static function getLoacleconv() {
        if (setlocale(LC_MONETARY, \Yii::$app->language)) {
            $arr = localeconv();

            //\Yii::error($arr['currency_symbol'] . setlocale(LC_MONETARY,0). '    ' . bin2hex($arr['mon_thousands_sep']));

            $arr['currency_symbol'] = iconv("Windows-1252", "UTF-8", $arr['currency_symbol']);
            $arr['mon_thousands_sep'] = iconv("Windows-1252", "UTF-8", $arr['mon_thousands_sep']);
            return $arr;
        } else {
            throw new \yii\base\Exception('Cannot set locale ' . \Yii::$app->language . '. Maybe the local is not installed. See php manual for further information');
        }
    }
1365890
public static String currency (double value, Locale locale)
    {
        return currency(value, NumberFormat.getCurrencyInstance(locale));
    }
360566
public static CurrencyUnit of(Locale locale) {
        MoneyUtils.checkNotNull(locale, "Locale must not be null");
        CurrencyUnit currency = currenciesByCountry.get(locale.getCountry());
        if (currency == null) {
            throw new IllegalCurrencyException("No currency found for locale '" + locale + '\'');
        }
        return currency;
    }
664413
protected function getCurrencyArgument()
    {
        // Get the user entered value
        $value = preg_replace('/\s+/', '', $this->argument('currency'));

        // Return all currencies if requested
        if ($value === 'all') {
            return array_keys($this->currencies);
        }

        return explode(',', $value);
    }
1049820
def get_default_currency(self) -> Commodity:
        
        result = None

        if self.default_currency:
            result = self.default_currency
        else:
            def_currency = self.__get_default_currency()
            self.default_currency = def_currency
            result = def_currency

        return result
76680
def get_rate(currency):
    """"""
    source = get_rate_source()
    try:
        return Rate.objects.get(source=source, currency=currency).value
    except Rate.DoesNotExist:
        raise CurrencyConversionException(
            "Rate for %s in %s do not exists. "
            "Please run python manage.py update_rates" % (
                currency, source.name))
596860
public function getDefaultCurrency()
    {
        Piwik::checkUserHasSomeAdminAccess();
        $defaultCurrency = Option::get(self::OPTION_DEFAULT_CURRENCY);
        if ($defaultCurrency) {
            return $defaultCurrency;
        }
        return 'USD';
    }
1275786
def setCurrency( self, currency ):
        
        self._currency = currency
        self.setValue(self.value())
1183971
def get_conversion_rate(from_currency: str, to_currency: str) -> Decimal:
    
    reverse_rate = False
    if to_currency == BASE_CURRENCY:
        # Fetch exchange rate for base currency and use 1 / rate for conversion
        rate_currency = from_currency
        reverse_rate = True
    else:
        rate_currency = to_currency
    rate = get_rate_from_db(rate_currency)

    if reverse_rate:
        conversion_rate = Decimal(1) / rate
    else:
        conversion_rate = rate
    return conversion_rate
220496
public function it_returns_the_default_currency()
    {
        $currency = new Currency('XXX', 2);

        $this->setDefaultCurrency($currency);

        $this->getDefaultCurrency()->shouldReturn($currency);
    }
751986
public function getCurrencyCode()
    {
        $currency = $this->paymentBridge->getCurrency();

        $constantName = sprintf('%s::%s', Currency::class, strtoupper($currency));

        if (!defined($constantName)) {
            throw new CurrencyNotSupportedException();
        }

        return constant($constantName);
    }
695728
def currencies(self):
        """"""
        return [m.currency.code for m in self.monies() if m.amount]
922356
public function it_returns_the_default_currency_from_the_money_factory()
    {
        $currency = new Currency('GBP', 2);

        $this->moneyFactory->getDefaultCurrency()->shouldBeCalled()->willReturn($currency);

        $this->getDefaultCurrency()->shouldReturn($currency);
    }
760473
public function getCurrencyCode()
    {
        try {
            return $this->getConfiguration()->currency->code;
        } catch (Exception $e) {
            throw new Doozr_I18n_Service_Exception(
                'Error reading currency code from L10N configuration.', null, $e
            );
        }
    }
21813
private CurrencyData getCurrencyData(String code) {
    CurrencyData data = currencies.get(code);
    if (data == null) {
      data = new CurrencyData();
      data.setCode(code);
      currencies.put(code, data);
    }
    return data;
  }