From e389fd7d7c749380b40d3cc0afcda30ed4e44662 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 27 Dec 2022 08:49:00 +0100 Subject: [PATCH] Remove liabilities from net worth --- app/Api/V1/Controllers/Summary/BasicController.php | 2 +- app/Helpers/Report/NetWorth.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Api/V1/Controllers/Summary/BasicController.php b/app/Api/V1/Controllers/Summary/BasicController.php index 3a23fc4b6d..5f56706121 100644 --- a/app/Api/V1/Controllers/Summary/BasicController.php +++ b/app/Api/V1/Controllers/Summary/BasicController.php @@ -358,7 +358,7 @@ class BasicController extends Controller /** @var NetWorthInterface $netWorthHelper */ $netWorthHelper = app(NetWorthInterface::class); $netWorthHelper->setUser($user); - $allAccounts = $this->accountRepository->getActiveAccountsByType([AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE]); + $allAccounts = $this->accountRepository->getActiveAccountsByType([AccountType::ASSET]); // filter list on preference of being included. $filtered = $allAccounts->filter( diff --git a/app/Helpers/Report/NetWorth.php b/app/Helpers/Report/NetWorth.php index b0158d1b9f..f8fc20d47f 100644 --- a/app/Helpers/Report/NetWorth.php +++ b/app/Helpers/Report/NetWorth.php @@ -183,7 +183,7 @@ class NetWorth implements NetWorthInterface */ private function getAccounts(): Collection { - $accounts = $this->accountRepository->getAccountsByType([AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE, AccountType::DEFAULT, AccountType::CREDITCARD]); + $accounts = $this->accountRepository->getAccountsByType([AccountType::ASSET, AccountType::DEFAULT]); $filtered = new Collection(); /** @var Account $account */ foreach ($accounts as $account) {