Go to file
google-labs-jules[bot] b0100a2e96 Fix: Ensure financial accuracy in cost splitting and balances
I've refactored the group balance summary logic to correctly account for
SettlementActivity. A SettlementActivity now reduces your
effective total_share_of_expenses, ensuring that net balances within
a group sum to zero. Previously, SettlementActivity amounts were
incorrectly added to total_settlements_paid, skewing balance
calculations.

I updated the existing `test_group_balance_summary_with_settlement_activity`
to assert the corrected balance outcomes.

I also added an extensive suite of API-level tests for:
- All expense splitting types (EQUAL, EXACT_AMOUNTS, PERCENTAGE, SHARES, ITEM_BASED),
  covering various scenarios and input validations.
- Group balance summary calculations, including multiple scenarios with
  SettlementActivity, partial payments, multiple expenses, and
  interactions with generic settlements. All balance tests verify that
  the sum of net balances is zero.

The CRUD operations for expenses and settlement activities were reviewed
and found to be sound, requiring no changes for this fix.

This resolves the flawed logic identified in
`be/tests/api/v1/test_costs.py` (test_group_balance_summary_with_settlement_activity)
and ensures that backend financial calculations are provably correct.
2025-05-22 17:04:46 +00:00
.cursor/rules Add FastAPI database transaction management strategy and update requirements 2025-05-20 01:19:37 +02:00
.gitea/workflows end of phase 3 2025-03-30 19:42:32 +02:00
be Fix: Ensure financial accuracy in cost splitting and balances 2025-05-22 17:04:46 +00:00
docs feat: Implement recurring expenses feature with scheduling and management 2025-05-22 16:37:14 +02:00
fe feat: Implement recurring expenses feature with scheduling and management 2025-05-22 16:37:14 +02:00
docker-compose.yml feat: Implement chore management feature with personal and group chores 2025-05-21 18:18:22 +02:00
mitlist_doc.md feat: Implement recurring expenses feature with scheduling and management 2025-05-22 16:37:14 +02:00