Compare commits

...

2 Commits

Author SHA1 Message Date
361671a362
Merge pull request 'use the DateTime object when comparing dates in ExhcnageRateCalculator' (!49) from bugfix/fix-current-exchange-rate-calculation into master
All checks were successful
rvr-nextgen/pipeline/head This commit looks good
Reviewed-on: #49
2023-05-06 13:44:09 +02:00
b2babcf30f
use the DateTime object when comparing dates in ExhcnageRateCalculator
All checks were successful
rvr-nextgen/pipeline/pr-master This commit looks good
2023-05-06 13:41:17 +02:00

View File

@ -41,7 +41,7 @@ class ExchangeRateCalculator
$currentExchangeRate = null; $currentExchangeRate = null;
foreach ($this->exchangeRates[$currency->getId()] as $exchangeRate) { foreach ($this->exchangeRates[$currency->getId()] as $exchangeRate) {
if ($exchangeRate->getValidFrom() > $time) { if ($exchangeRate->getValidFromDate() > $time) {
break; break;
} }
$currentExchangeRate = $exchangeRate; $currentExchangeRate = $exchangeRate;