From b9efd166a67a0493c7314e3db5435509e722462f Mon Sep 17 00:00:00 2001 From: padreug Date: Sun, 9 Nov 2025 21:12:19 +0100 Subject: [PATCH] FInal commit before stripping down to use FAVA --- core/balance.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/core/balance.py b/core/balance.py index d93c7c2..37a113c 100644 --- a/core/balance.py +++ b/core/balance.py @@ -188,14 +188,15 @@ class BalanceCalculator: total_balance -= balance # Equity contributions don't affect what castle owes - # Merge inventories for fiat tracking - for position in inventory.positions.values(): - # Adjust sign based on account type - if account_type == AccountType.ASSET: - # For receivables, negate the position - combined_inventory.add_position(position.negate()) - else: - combined_inventory.add_position(position) + # Merge inventories for fiat tracking (exclude equity) + if account_type != AccountType.EQUITY: + for position in inventory.positions.values(): + # Adjust sign based on account type + if account_type == AccountType.ASSET: + # For receivables, negate the position + combined_inventory.add_position(position.negate()) + else: + combined_inventory.add_position(position) fiat_balances = combined_inventory.get_all_fiat_balances()