diff --git a/src/Finance/ExchangeRateCalculator.php b/src/Finance/ExchangeRateCalculator.php index 1b170b0..68ab912 100644 --- a/src/Finance/ExchangeRateCalculator.php +++ b/src/Finance/ExchangeRateCalculator.php @@ -41,7 +41,7 @@ class ExchangeRateCalculator $currentExchangeRate = null; foreach ($this->exchangeRates[$currency->getId()] as $exchangeRate) { - if ($exchangeRate->getValidFrom() > $time) { + if ($exchangeRate->getValidFromDate() > $time) { break; } $currentExchangeRate = $exchangeRate;