diff --git a/backend/src/modules/health-scores/health-scores.service.ts b/backend/src/modules/health-scores/health-scores.service.ts index cece9be..6d0e3c9 100644 --- a/backend/src/modules/health-scores/health-scores.service.ts +++ b/backend/src/modules/health-scores/health-scores.service.ts @@ -220,20 +220,12 @@ export class HealthScoresService { missing.push(`No budget found for ${year}. Upload or create an annual budget.`); } - // Should have reserve components (warn but don't block) - const components = await qr.query( - `SELECT COUNT(*) as cnt FROM reserve_components`, - ); - if (parseInt(components[0].cnt) === 0) { - missing.push('No reserve components found. Add reserve components (roof, parking, pool, etc.) with replacement costs for an accurate funded-ratio calculation.'); - } - - // Should have capital projects (warn but don't block) + // Should have reserve-funded projects with estimated costs (warn but don't block) const projects = await qr.query( - `SELECT COUNT(*) as cnt FROM projects WHERE is_active = true`, + `SELECT COUNT(*) as cnt FROM projects WHERE is_active = true AND fund_source = 'reserve'`, ); if (parseInt(projects[0].cnt) === 0) { - missing.push('No capital projects found. Add planned capital projects for a more accurate reserve health assessment.'); + missing.push('No reserve-funded projects found. Add projects with estimated costs for an accurate funded-ratio calculation.'); } }