application/Espo/Core/Utils/Database/Schema/rebuildActions/Currency.php
protected function exchangeRates($baseCurrency, $defaultCurrency, array $currencyRates)
    {
        $precision = 5;
        $defaultCurrencyRate = round(1 / $currencyRates[$defaultCurrency], $precision);

        $exchangedRates = array();
        $exchangedRates[$baseCurrency] = $defaultCurrencyRate;

        unset($currencyRates[$baseCurrency], $currencyRates[$defaultCurrency]);

        foreach ($currencyRates as $currencyName => $rate) {
            $exchangedRates[$currencyName] = round($rate * $defaultCurrencyRate, $precision);
        }

        return $exchangedRates;
    }
protected function exchangeRates($baseCurrency, $defaultCurrency, array $currencyRates)
    {
        $precision = 5;
        $defaultCurrencyRate = round(1 / $currencyRates[$defaultCurrency], $precision);

        $exchangedRates = array();
        $exchangedRates[$baseCurrency] = $defaultCurrencyRate;

        unset($currencyRates[$baseCurrency], $currencyRates[$defaultCurrency]);

        foreach ($currencyRates as $currencyName => $rate) {
            $exchangedRates[$currencyName] = round($rate * $defaultCurrencyRate, $precision);
        }

        return $exchangedRates;
    }
protected function exchangeRates ( $ baseCurrency , $ defaultCurrency , array $ currencyRates ) { $ precision = 5 ; $ defaultCurrencyRate = round ( 1 / $ currencyRates [ $ defaultCurrency ] , $ precision ) ; $ exchangedRates = array ( ) ; $ exchangedRates [ $ baseCurrency ] = $ defaultCurrencyRate ; unset ( $ currencyRates [ $ baseCurrency ] , $ currencyRates [ $ defaultCurrency ] ) ; foreach ( $ currencyRates as $ currencyName => $ rate ) { $ exchangedRates [ $ currencyName ] = round ( $ rate * $ defaultCurrencyRate , $ precision ) ; } return $ exchangedRates ; }
Calculate exchange rates if defaultCurrency doesn't equals baseCurrency

@param  string $baseCurrency
@param  string $defaultCurrency
@param  array $currencyRates   [description]
@return array  - List of new currency rates
Calculate exchange rates if defaultCurrency doesn t equals baseCurrency