Skip to content

Firefly III: a personal finances manager

Fix #9871

James Cole2e3669a32fc1
diff --git a/app/Support/JsonApi/Enrichments/AccountEnrichment.php b/app/Support/JsonApi/Enrichments/AccountEnrichment.php
index 92a2bb3476..4e62c1c0cd 100644
--- a/app/Support/JsonApi/Enrichments/AccountEnrichment.php
+++ b/app/Support/JsonApi/Enrichments/AccountEnrichment.php
@@ -234,7 +234,7 @@ class AccountEnrichment implements EnrichmentInterface
private function collectMetaData(): void
{
- $set = AccountMeta::whereIn('name', ['is_multi_currency', 'currency_id', 'account_role', 'account_number', 'liability_direction', 'interest', 'interest_period', 'current_debt'])
+ $set = AccountMeta::whereIn('name', ['is_multi_currency', 'include_net_worth','currency_id', 'account_role', 'account_number', 'liability_direction', 'interest', 'interest_period', 'current_debt'])
->whereIn('account_id', $this->accountIds)
->get(['account_meta.id', 'account_meta.account_id', 'account_meta.name', 'account_meta.data'])->toArray()
;
diff --git a/app/Transformers/AccountTransformer.php b/app/Transformers/AccountTransformer.php
index e536f078c6..e48f0205b4 100644
--- a/app/Transformers/AccountTransformer.php
+++ b/app/Transformers/AccountTransformer.php
@@ -92,7 +92,7 @@ class AccountTransformer extends AbstractTransformer
$decimalPlaces = (int) $account->meta['currency']?->decimal_places;
$decimalPlaces = 0 === $decimalPlaces ? 2 : $decimalPlaces;
$openingBalance = Steam::bcround($openingBalance, $decimalPlaces);
- $includeNetWorth = '0' !== ($account->meta['include_net_worth'] ?? null);
+ $includeNetWorth = 1 === (int) ($account->meta['include_net_worth'] ?? 0);
$longitude = $account->meta['location']['longitude'] ?? null;
$latitude = $account->meta['location']['latitude'] ?? null;
$zoomLevel = $account->meta['location']['zoom_level'] ?? null;