FInal commit before stripping down to use FAVA

This commit is contained in:
padreug 2025-11-09 21:12:19 +01:00
parent 0b64ffa54f
commit b9efd166a6

View file

@ -188,14 +188,15 @@ class BalanceCalculator:
total_balance -= balance total_balance -= balance
# Equity contributions don't affect what castle owes # Equity contributions don't affect what castle owes
# Merge inventories for fiat tracking # Merge inventories for fiat tracking (exclude equity)
for position in inventory.positions.values(): if account_type != AccountType.EQUITY:
# Adjust sign based on account type for position in inventory.positions.values():
if account_type == AccountType.ASSET: # Adjust sign based on account type
# For receivables, negate the position if account_type == AccountType.ASSET:
combined_inventory.add_position(position.negate()) # For receivables, negate the position
else: combined_inventory.add_position(position.negate())
combined_inventory.add_position(position) else:
combined_inventory.add_position(position)
fiat_balances = combined_inventory.get_all_fiat_balances() fiat_balances = combined_inventory.get_all_fiat_balances()