diff --git a/app/Support/JsonApi/Enrichments/RecurringEnrichment.php b/app/Support/JsonApi/Enrichments/RecurringEnrichment.php index beba7dde9b..989e9ea924 100644 --- a/app/Support/JsonApi/Enrichments/RecurringEnrichment.php +++ b/app/Support/JsonApi/Enrichments/RecurringEnrichment.php @@ -309,7 +309,7 @@ class RecurringEnrichment implements EnrichmentInterface if (true === $this->convertToPrimary && $currencyId !== (int)$this->primaryCurrency->id) { $pcAmount = $converter->convert($this->currencies[$currencyId], $this->primaryCurrency, today(), $transaction['amount']); } - if (null !== $transaction['foreign_amount']) { + if (null !== $transaction['foreign_amount'] && null !== $transaction['foreign_currency_id']) { $foreignCurrencyId = $transaction['foreign_currency_id']; if ($foreignCurrencyId !== $this->primaryCurrency->id) { $pcForeignAmount = $converter->convert($this->currencies[$foreignCurrencyId], $this->primaryCurrency, today(), $transaction['foreign_amount']);