diff --git a/backend/api/public.py b/backend/api/public.py index 9faef9a..689f9b6 100644 --- a/backend/api/public.py +++ b/backend/api/public.py @@ -483,6 +483,14 @@ async def get_revenue_forecast( lunch_forecast * get_spend_by_period('lunch', 'wet') + dinner_forecast * get_spend_by_period('dinner', 'wet') ) + # If spend settings aren't configured, covers * 0 = 0 — fall back to DOW + dow = current.isoweekday() + if dry_forecast == 0: + dry_otb = 0 + dry_forecast = dow_dry.get(dow, 0) + if wet_forecast == 0: + wet_otb = 0 + wet_forecast = dow_wet.get(dow, 0) else: # No covers data — fall back to DOW average from recent 8 weeks dow = current.isoweekday() # 1=Mon … 7=Sun