From efe324815bb3e4679bf6d4d0a7d234971997e891 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Thu, 14 May 2026 23:15:26 +0000 Subject: [PATCH] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/invoices.$invoiceId.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/routes/invoices.$invoiceId.tsx b/src/routes/invoices.$invoiceId.tsx index 0568b1b..2455df9 100644 --- a/src/routes/invoices.$invoiceId.tsx +++ b/src/routes/invoices.$invoiceId.tsx @@ -193,14 +193,15 @@ function InvoiceDetail() { load(); }; - const addManualItem = async (caseId: string | null) => { + const addManualItem = async (caseId: string | null, kind: "manual" | "expense" = "manual") => { setSavingItem(true); const sort_order = items.length ? Math.max(...items.map((i) => i.sort_order)) + 1 : 0; const { error } = await supabase.from("invoice_line_items").insert({ invoice_id: invoiceId, case_id: caseId, - kind: "manual", + kind, description: "New line", + work_date: new Date().toISOString().slice(0, 10), quantity: 1, rate: 0, amount: 0,