import { getRevenueForecast12Months } from "@/lib/forecast-queries"; export const revalidate = 0; export default async function ForecastPage() { const forecast = await getRevenueForecast12Months(); const totalForecast = forecast.reduce((sum, m) => sum + m.total, 0); return (
Proiezione 12 mesi basata sulle offerte attive, i loro accepted_total e le durate in mesi. Ogni offerta distribuisce il suo totale equamente per i mesi di durata a partire dalla data di inizio.
| Mese | Fatturato previsto | Barra |
|---|---|---|
| {month.label} | {month.total > 0 ? `€${month.total.toFixed(2)}` : —} |
{month.total > 0 && (
|
| Totale 12 mesi | €{totalForecast.toFixed(2)} |
Nessuna offerta con accepted_total trovata. Assegna micro-offerte ai progetti e imposta il totale accettato.
)}