From 1c377ed6344cf7dd0e62cea55ec0257493dff93f Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 19 Apr 2026 16:25:24 +0000 Subject: [PATCH] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/components/timer/header-timer.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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);