0.2.33: exited positions (secondary-sale edge case)

A member who sold/transferred their stake showed a phantom -100% loss
($0 ending balance, no distribution through the fund). Now:
- entity_access.exited_on (migration e1f2a3b4c5d6), set/cleared from the
  Partners tab (writer-only, inline date picker, audited)
- LP portal card shows a quiet "Exited <date>" badge, keeps documents,
  hides balance/gain
- portfolio summary excludes exited positions ("Excludes N exited")
- fund committed totals (rollup + Partners tab) skip exited members so
  seller + buyer are not double-counted

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Jonathan Kirkwood
2026-07-03 08:54:19 -05:00
co-authored by Claude Opus 4.8
parent 4215d4478f
commit a639ba14cf
14 changed files with 355 additions and 17 deletions
+8
View File
@@ -243,6 +243,9 @@ class CapitalAccountResponse(BaseModel):
ending_balance_cents: int
document_id: int | None
created_at: datetime
# Date the member sold/transferred this stake (from EntityAccess); the portal shows an
# "Exited" badge instead of a phantom -100% and drops the position from totals.
exited_on: date | None = None
# --- Partners (members of an entity) ---
@@ -260,6 +263,11 @@ class PartnerResponse(BaseModel):
latest_value_cents: int | None
latest_as_of: date | None
statements_count: int
exited_on: date | None = None
class PartnerExitUpdate(BaseModel):
exited_on: date | None # null clears the exit (marks the member active again)
# --- Access matrix ---