Skip to content

Commit

Permalink
ESEB-67: Use exchange rate created before contribution date
Browse files Browse the repository at this point in the history
  • Loading branch information
olayiwola-compucorp committed Nov 10, 2023
1 parent c4437e5 commit ce8a726
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private function updateSalesTaxCurrency() {
$exchangeRate = \Civi\Api4\ExchangeRate::get(FALSE)
->addOrderBy('exchange_date', 'ASC')
->addWhere('base_currency', '=', $salesTaxCurrency)
->addWhere('exchange_date', '<=', $contribution['receive_date'])
->addWhere('exchange_date', '<', $contribution['receive_date'])
->addWhere('conversion_currency', '=', $contribution['currency'])
->setLimit(1)
->execute()
Expand Down

0 comments on commit ce8a726

Please sign in to comment.