refactor: simplify KPI to 4 metrics and update CLAUDE.md (#83)
KPI page: removed operational grid (Intäktstillväxt, Kostnadsandel, Snittbetaltid — all usually empty or redundant). Now shows 4 cards (Resultat, Kassa, Kundfordringar, Moms) + trend chart. Removed unused fields from KPIReport type and simplified API route. CLAUDE.md: documented MCP server extension, API key infrastructure, OAuth 2.1 flow, gnubok-mcp npm package, KPI page, cookieless Supabase client, and updated migration count (65 → 70). Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1999,15 +1999,10 @@ export interface VatBreakdownItem {
|
||||
|
||||
// KPI Report
|
||||
export interface KPIReport {
|
||||
grossMargin: number | null // percentage, null if no revenue
|
||||
netResult: number // SEK
|
||||
cashPosition: number // SEK (sum of 19xx account balances)
|
||||
outstandingReceivables: number // SEK
|
||||
overdueReceivables: number // SEK
|
||||
revenueGrowth: number | null // percentage, null if no prior period or current period incomplete
|
||||
expenseRatio: number | null // percentage, null if no revenue
|
||||
avgPaymentDays: number | null // days, null if < 5 paid invoices with paid_at
|
||||
paidInvoiceCount: number // how many invoices had paid_at data (for gating)
|
||||
vatLiability: number // SEK, ruta 49 (positive = owe, negative = refund)
|
||||
totalRevenue: number // SEK
|
||||
totalExpenses: number // SEK
|
||||
|
||||
Reference in New Issue
Block a user