diff --git a/src/components/cases/time-tab.tsx b/src/components/cases/time-tab.tsx index 5232bf0..ae88e15 100644 --- a/src/components/cases/time-tab.tsx +++ b/src/components/cases/time-tab.tsx @@ -186,9 +186,14 @@ export function CaseTimeTab({ caseRecord, onInvoice }: CaseTimeTabProps) { setSelectedFeeId(v); const fee = fees.find((f) => f.id === v); if (fee) { + // If the fee item has no rate set (0), fall back to the + // case's default rate or the user's profile hourly rate. + const fallback = + caseRecord.default_hourly_rate ?? profileRate ?? 0; + const rate = Number(fee.amount) > 0 ? fee.amount : fallback; setForm((f) => ({ ...f, - hourly_rate: String(fee.amount), + hourly_rate: rate ? String(rate) : f.hourly_rate, billable: fee.billable, description: fee.description || fee.name, }));