diff --git a/backend/src/services/simpleDocumentProcessor.ts b/backend/src/services/simpleDocumentProcessor.ts index c62c0c7..8ca5bb7 100644 --- a/backend/src/services/simpleDocumentProcessor.ts +++ b/backend/src/services/simpleDocumentProcessor.ts @@ -536,9 +536,9 @@ Focus on finding these specific fields in the document. Extract exact values, nu const otherValues = otherPeriods .map(p => { const val = extractNumericValue(financials[p]!.revenue || ''); - return val !== null && val > 0 ? { period: p, value: val } : null; + return val !== null && val > 0 ? { period: p as 'fy3' | 'fy2' | 'fy1' | 'ltm', value: val } : null; }) - .filter((v): v is { period: string; value: number } => v !== null); + .filter((v): v is { period: 'fy3' | 'fy2' | 'fy1' | 'ltm'; value: number } => v !== null); if (otherValues.length > 0) { const avgOtherValue = otherValues.reduce((a, b) => a + b.value, 0) / otherValues.length;