Function: recomputeDayEntry()
recomputeDayEntry(
svc,input):Promise<RecomputeResult>
Defined in: src/server/services/timeEntry.ts:35
Rebuild a day's time_entries row from its time_segments: hours = Σ closed-segment
durations, re-running the overage (→ pending_approval) and single-day anomaly logic. The daily
total stays the single source of truth every downstream consumer reads. Refuses to touch a
locked or approved day; clears the entry when the day has no time. Also refuses an invoiced day:
shrinking/deleting billed hours over-bills the facility with no drift backstop (ADR-0050).
Parameters
svc
SupabaseClient
input
Returns
Promise<RecomputeResult>