diff --git a/src/components/timer/header-timer.tsx b/src/components/timer/header-timer.tsx index 9ef5718..98031ba 100644 --- a/src/components/timer/header-timer.tsx +++ b/src/components/timer/header-timer.tsx @@ -101,8 +101,11 @@ export function HeaderTimer() { const isFlatFee = selectedFee?.pricing_type === "flat"; + // If a fee item has no rate (0), fall back to the case rate then the user's + // profile rate. Flat-fee items always use their own amount. + const feeRate = selectedFee && Number(selectedFee.amount) > 0 ? selectedFee.amount : null; const effectiveRate = - selectedFee?.amount ?? activeCase?.default_hourly_rate ?? profileRate ?? 0; + feeRate ?? activeCase?.default_hourly_rate ?? profileRate ?? 0; const handleSelectFee = (id: string) => { setFeeItemId(id);