Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix #11443
James Cole04553f6fc5d8
diff --git a/app/Support/JsonApi/Enrichments/SubscriptionEnrichment.php b/app/Support/JsonApi/Enrichments/SubscriptionEnrichment.phpindex 4a97d262a6..60bf82b7c4 100644--- a/app/Support/JsonApi/Enrichments/SubscriptionEnrichment.php+++ b/app/Support/JsonApi/Enrichments/SubscriptionEnrichment.php@@ -321,7 +321,7 @@ class SubscriptionEnrichment implements EnrichmentInterface$array['foreign_currency_code'] = $entry->foreign_currency_code;$array['foreign_currency_symbol'] = $entry->foreign_currency_symbol;$array['foreign_currency_decimal_places'] = $entry->foreign_currency_decimal_places;- $array['foreign_amount'] = Steam::bcround($entry->foreign_amount, $entry->foreign_currency_decimal_places);+ $array['foreign_amount'] = Steam::bcround((string) $entry->foreign_amount, $entry->foreign_currency_decimal_places);}// convert to primary, but is already primary.if ($this->convertToPrimary && (int)$entry->transaction_currency_id === $this->primaryCurrency->id) {@@ -329,7 +329,7 @@ class SubscriptionEnrichment implements EnrichmentInterface}// convert to primary, but is NOT already primary.if ($this->convertToPrimary && (int)$entry->transaction_currency_id !== $this->primaryCurrency->id) {- $array['pc_amount'] = $converter->convert($entry->transactionCurrency, $this->primaryCurrency, $entry->date, $entry->amount);+ $array['pc_amount'] = $converter->convert($entry->transactionCurrency, $this->primaryCurrency, $entry->date, (string) $entry->amount);}// convert to primary, but foreign is already primary.if ($this->convertToPrimary && (int)$entry->foreign_currency_id === $this->primaryCurrency->id) {@@ -340,7 +340,7 @@ class SubscriptionEnrichment implements EnrichmentInterface// TODO this is very database intensive./** @var TransactionCurrency $foreignCurrency */$foreignCurrency = Amount::getTransactionCurrencyById($entry->foreign_currency_id);- $array['pc_foreign_amount'] = $converter->convert($foreignCurrency, $this->primaryCurrency, $entry->date, $entry->amount);+ $array['pc_foreign_amount'] = $converter->convert($foreignCurrency, $this->primaryCurrency, $entry->date, (string) $entry->amount);}$result[] = $array;}