* Calculate team's actual historical collection metrics from paid invoices. * Used to adjust collection probability based on real payment behavior.
| 2487 | * Used to adjust collection probability based on real payment behavior. |
| 2488 | */ |
| 2489 | interface TeamCollectionMetrics { |
| 2490 | onTimeRate: number; // Percentage paid on or before due date |
| 2491 | avgDaysToPay: number; // Average days from issue to payment |
| 2492 | sampleSize: number; // Number of invoices in calculation |
| 2493 | } |
| 2494 | |
| 2495 | async function getTeamCollectionMetrics( |
| 2496 | db: Database, |
nothing calls this directly
no outgoing calls
no test coverage detected