export interface AgingBucket { key: string; label: string; /** Días vencidos desde (inclusive). `current` usa -Infinity..0. */ from: number; /** Días vencidos hasta (inclusive). `null` = sin tope. */ to: number | null; } export declare const DEFAULT_AGING_BUCKETS: AgingBucket[]; export interface AgingDoc { party_id: string; party_name?: string; due_at: string | null; issued_at: string; balance: number; } export interface AgingRow { party_id: string; party_name?: string; buckets: Record; total: number; overdue: number; oldest_overdue_days: number; } /** Días vencidos al corte (negativo = falta para vencer). Fechas en ISO (día). */ export declare function daysOverdue(dueISO: string, asOfISO: string): number; export declare function bucketFor(days: number, buckets?: readonly AgingBucket[]): string; /** Agrupa por contraparte y tramo. Saldos ≤ 0 se ignoran (anticipos van aparte). */ export declare function computeAging(docs: readonly AgingDoc[], asOfISO: string, buckets?: readonly AgingBucket[]): { rows: AgingRow[]; totals: Record; total: number; }; //# sourceMappingURL=aging.d.ts.map