Returns the amount of the <code>currency</code> in this balance that is available to trade.

@return the amount that is available to trade.
511739
public BigDecimal getAvailable() {

    if (available == null) {
      return total
          .subtract(frozen)
          .subtract(loaned)
          .add(borrowed)
          .subtract(withdrawing)
          .subtract(depositing);
    } else {
      return available;
    }
  }
374943
public static function GetBaseCurrency()
    {
        static $oInstance = null;
        if (null === $oInstance) {
            $oInstance = TdbPkgShopCurrency::GetNewInstance();
            if (false === $oInstance->LoadFromField('is_base_currency', '1')) {
                $oInstance = false;
            }
        }

        return $oInstance;
    }
1172442
public function getCurrency()
    {
        $currency = Currency::getCurrencyInstance($this->getOrder()->source->id_currency);
        $result = array (
            Meta::Currency => $currency->iso_code,
            Meta::CurrencyRate => (float) $this->source->conversion_rate,
            Meta::CurrencyDoConvert => true,
        );
        return $result;
    }
913373
public static Currency getInstance(String currencyCode) {

    Currency currency = getInstanceNoCreate(currencyCode.toUpperCase());

    if (currency == null) {
      return createCurrency(currencyCode.toUpperCase(), null, null);
    } else {
      return currency;
    }
  }
642410
public double getAndSet(double amount) {
    long v = value.getAndSet(Double.doubleToLongBits(amount));
    return Double.longBitsToDouble(v);
  }
730401
private function getCurrencies()
    {
        if (null === self::$currencies) {
            self::$currencies = $this->loadCurrencies();
        }

        return self::$currencies;
    }
178939
public double getSum() {
        double sum = s.zero();
        for (int c = 0; c < this.values.length; c++) {
            sum = s.plus(sum, values[c]);
        }
        return sum;
    }
1198963
public T allocate()
  {
    T value = _freeRing.allocate();
    
    if (value != null) {
      return value;
    }
    
    return _freeRingSoft.allocate();
  }
1167556
public com.google.protobuf.ByteString
      getCurrencyCodeBytes() {
    java.lang.Object ref = currencyCode_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      currencyCode_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
797984
protected function getCurrency()
    {
        if (null === $this->currency) {
            $this->currency = $this->getSession() ? $this->getSession()->getCurrency(true) : Currency::getDefaultCurrency();
        }

        return $this->currency;
    }
538903
public Coin getOutputSum() {
        Coin totalOut = Coin.ZERO;

        for (TransactionOutput output: outputs) {
            totalOut = totalOut.add(output.getValue());
        }

        return totalOut;
    }
437025
public static Waehrung of(Currency currency) {
        String key = currency.getCurrencyCode();
        return CACHE.computeIfAbsent(key, t -> new Waehrung(currency));
    }
1072616
public static CurrencyUnit getCurrency(CurrencyQuery query) {
        return Optional.ofNullable(MONETARY_CURRENCIES_SINGLETON_SPI()).orElseThrow(
                () -> new MonetaryException("No MonetaryCurrenciesSingletonSpi loaded, check your system setup."))
                .getCurrency(query);
    }
267679
def sum_to_balance(self):
        
        result = self.values("amount_currency").annotate(total=models.Sum("amount"))
        return Balance([Money(r["total"], r["amount_currency"]) for r in result])
282148
public Class<? extends MonetaryAmount> getAmountType() {
        Class<?> clazz = get(AMOUNT_TYPE, Class.class);
        return clazz.asSubclass(MonetaryAmount.class);
    }
769153
public function getCurrency()
    {
        if (! empty($this->currency)) {
            return $this->currency;
        }

        return $this->setCurrency(config('currency.default'))->getCurrency();
    }
286814
public function getAdminEditionCurrency()
    {
        $currency = $this->get('thelia.admin.edition.currency', null);

        if (null === $currency) {
            $currency =  Currency::getDefaultCurrency();
        }

        return $currency;
    }