Data Definition Document: Finance Reporting
Domain: Finance (Ledger, Budget, AP, AR)
Logical Sub-Domain: Reporting (Analytics)
Physical Packages: @sd/mod-finance/reporting
Related Documents: Process Blueprint
Context: This document defines the Read-Models for Financial Statements.
Source: packages/modules/finance/src/reporting/types.ts
0. Entity Relationship Diagram (ERD)
erDiagram
BALANCE_SHEET ||--o{ ACCOUNT : "aggregates"
PROFIT_LOSS ||--o{ ACCOUNT : "aggregates"
BUDGET_VARIANCE ||--o{ BUDGET_LINE_ITEM : "compares"
BALANCE_SHEET {
date date
float assets
float liabilities
float equity
}
PROFIT_LOSS {
date startDate
date endDate
float netIncome
}
1. Primary Entities
Entity: BalanceSheet
Snapshot of financial position.
| Field | Type | Required | Description |
|---|---|---|---|
date |
Date |
Yes | As of date. |
assets |
object |
Yes | { accounts: [], total: 0 }. |
liabilities |
object |
Yes | { accounts: [], total: 0 }. |
equity |
object |
Yes | { accounts: [], total: 0 }. |
netWorth |
number |
Yes | Assets - Liabilities. |
Entity: ProfitAndLoss (Income Statement)
Performance over time.
| Field | Type | Required | Description |
|---|---|---|---|
revenue |
object |
Yes | Total Income. |
expenses |
object |
Yes | Total Cost. |
netIncome |
number |
Yes | Revenue - Expenses. |
Entity: BudgetVariance
Performance vs Plan.
| Field | Type | Required | Description |
|---|---|---|---|
fiscalYear |
number |
Yes | Config year. |
lineItems |
object[] |
Yes | List including varianceAmount and status (over_budget). |
totalVariance |
number |
Yes | Aggregate deviation. |
4. Changelog
| Date | Author | Description | Reference |
|---|---|---|---|
| 2026-01-24 | Antigravity | Initial creation | Implementation Plan |