From 12c9a1a093b6539c8f15702882ea980dd89f9392 Mon Sep 17 00:00:00 2001 From: Krao Hasanee Date: Tue, 9 Jun 2026 23:24:37 -0500 Subject: [PATCH] fix: report Version Status shows work state only, billing leak collapsed to approved Co-Authored-By: Claude Opus 4.8 --- src/pages/team/TeamReports.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/team/TeamReports.jsx b/src/pages/team/TeamReports.jsx index 3a4ecd0..9e5fb8d 100644 --- a/src/pages/team/TeamReports.jsx +++ b/src/pages/team/TeamReports.jsx @@ -33,7 +33,11 @@ function versionStateFor(task, versionNumber) { const currentVersion = Number(task?.current_version || 0); const version = Number(versionNumber || 0); if (version < currentVersion) return 'completed'; - return task?.status || 'not_started'; + const status = task?.status || 'not_started'; + // invoiced/paid are billing states (legacy leak) — collapse to the work state + // they imply. Billing is shown separately in the Billing column. + if (status === 'invoiced' || status === 'paid') return 'client_approved'; + return status; } function rowSort(a, b) {