feat(added column) - tooth number column added
This commit is contained in:
@@ -181,6 +181,7 @@ export function PatientFinancialsModal({
|
|||||||
<TableHead className="w-24">Type</TableHead>
|
<TableHead className="w-24">Type</TableHead>
|
||||||
<TableHead className="w-36">Date</TableHead>
|
<TableHead className="w-36">Date</TableHead>
|
||||||
<TableHead>Procedures Codes</TableHead>
|
<TableHead>Procedures Codes</TableHead>
|
||||||
|
<TableHead className="w-28">Tooth Number</TableHead>
|
||||||
<TableHead className="text-right w-28">Billed</TableHead>
|
<TableHead className="text-right w-28">Billed</TableHead>
|
||||||
<TableHead className="text-right w-28">Paid</TableHead>
|
<TableHead className="text-right w-28">Paid</TableHead>
|
||||||
<TableHead className="text-right w-28">Adjusted</TableHead>
|
<TableHead className="text-right w-28">Adjusted</TableHead>
|
||||||
@@ -192,14 +193,14 @@ export function PatientFinancialsModal({
|
|||||||
<TableBody>
|
<TableBody>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell colSpan={8} className="text-center py-12">
|
<TableCell colSpan={9} className="text-center py-12">
|
||||||
<LoadingScreen />
|
<LoadingScreen />
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
) : rows.length === 0 ? (
|
) : rows.length === 0 ? (
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell
|
<TableCell
|
||||||
colSpan={8}
|
colSpan={9}
|
||||||
className="text-center py-8 text-muted-foreground"
|
className="text-center py-8 text-muted-foreground"
|
||||||
>
|
>
|
||||||
No records found.
|
No records found.
|
||||||
@@ -212,12 +213,26 @@ export function PatientFinancialsModal({
|
|||||||
const adjusted = Number(r.total_adjusted ?? 0);
|
const adjusted = Number(r.total_adjusted ?? 0);
|
||||||
const totalDue = Number(r.total_due ?? 0);
|
const totalDue = Number(r.total_due ?? 0);
|
||||||
|
|
||||||
|
const serviceLines = r.service_lines || [];
|
||||||
|
|
||||||
const procedureCodes =
|
const procedureCodes =
|
||||||
(r.service_lines || [])
|
serviceLines.length > 0
|
||||||
.map((sl: any) => sl.procedureCode)
|
? serviceLines
|
||||||
.filter(Boolean)
|
.map((sl: any) => sl.procedureCode)
|
||||||
.join(", ") ||
|
.filter(Boolean)
|
||||||
(r.linked_payment_id ? "No Codes Given" : "-");
|
.join(", ")
|
||||||
|
: r.linked_payment_id
|
||||||
|
? "No Codes Given"
|
||||||
|
: "-";
|
||||||
|
|
||||||
|
const toothNumbers =
|
||||||
|
serviceLines.length > 0
|
||||||
|
? serviceLines
|
||||||
|
.map((sl: any) =>
|
||||||
|
sl.toothNumber ? String(sl.toothNumber) : "-"
|
||||||
|
)
|
||||||
|
.join(", ")
|
||||||
|
: "-";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TableRow
|
<TableRow
|
||||||
@@ -236,6 +251,9 @@ export function PatientFinancialsModal({
|
|||||||
<TableCell className="text-sm text-muted-foreground">
|
<TableCell className="text-sm text-muted-foreground">
|
||||||
{procedureCodes}
|
{procedureCodes}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
<TableCell className="text-sm text-muted-foreground">
|
||||||
|
{toothNumbers}
|
||||||
|
</TableCell>
|
||||||
<TableCell className="text-right">
|
<TableCell className="text-right">
|
||||||
{billed.toFixed(2)}
|
{billed.toFixed(2)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|||||||
Reference in New Issue
Block a user