From b3461e1e008ca5b32b65af1f21673060f5c3b39a Mon Sep 17 00:00:00 2001 From: Potenz Date: Tue, 14 Oct 2025 00:05:16 +0530 Subject: [PATCH] feat(added column) - tooth number column added --- .../patients/patient-financial-modal.tsx | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/apps/Frontend/src/components/patients/patient-financial-modal.tsx b/apps/Frontend/src/components/patients/patient-financial-modal.tsx index 83f98af..42bd68c 100644 --- a/apps/Frontend/src/components/patients/patient-financial-modal.tsx +++ b/apps/Frontend/src/components/patients/patient-financial-modal.tsx @@ -181,6 +181,7 @@ export function PatientFinancialsModal({ Type Date Procedures Codes + Tooth Number Billed Paid Adjusted @@ -192,14 +193,14 @@ export function PatientFinancialsModal({ {loading ? ( - + ) : rows.length === 0 ? ( No records found. @@ -212,12 +213,26 @@ export function PatientFinancialsModal({ const adjusted = Number(r.total_adjusted ?? 0); const totalDue = Number(r.total_due ?? 0); + const serviceLines = r.service_lines || []; + const procedureCodes = - (r.service_lines || []) - .map((sl: any) => sl.procedureCode) - .filter(Boolean) - .join(", ") || - (r.linked_payment_id ? "No Codes Given" : "-"); + serviceLines.length > 0 + ? serviceLines + .map((sl: any) => sl.procedureCode) + .filter(Boolean) + .join(", ") + : r.linked_payment_id + ? "No Codes Given" + : "-"; + + const toothNumbers = + serviceLines.length > 0 + ? serviceLines + .map((sl: any) => + sl.toothNumber ? String(sl.toothNumber) : "-" + ) + .join(", ") + : "-"; return ( {procedureCodes} + + {toothNumbers} + {billed.toFixed(2)}