diff --git a/apps/Frontend/src/components/payments/payments-recent-table.tsx b/apps/Frontend/src/components/payments/payments-recent-table.tsx index 05112cb7..03b8d8f6 100755 --- a/apps/Frontend/src/components/payments/payments-recent-table.tsx +++ b/apps/Frontend/src/components/payments/payments-recent-table.tsx @@ -718,61 +718,33 @@ export default function PaymentsRecentTable({
{(() => { - const { label, color, icon } = getStatusInfo( - payment.status - ); - const switchableStatuses: PaymentStatus[] = [ - "PENDING", - "PARTIALLY_PAID", - "PAID", - ]; - const isSwitchable = switchableStatuses.includes( - payment.status as PaymentStatus - ); - if (isSwitchable) { + // VOID and DENIED are manual decisions — show as-is + if (payment.status === "VOID" || payment.status === "DENIED" || payment.status === "OVERPAID") { + const { label, color, icon } = getStatusInfo(payment.status); return ( - + + {icon}{label} + + ); + } + // Compute status from numbers + if (totalDue === 0) { + return ( + + Paid in Full + + ); + } + if (totalCollected > 0) { + return ( + + Partially Paid + ); } return ( - - - {icon} - {label} - + + Pending ); })()} @@ -977,9 +949,9 @@ export default function PaymentsRecentTable({ )} - {/* When NOT PAID and NOT VOID → Void */} - {payment.status !== "PAID" && - payment.status !== "VOID" && ( + {/* Show Void unless already voided or denied */} + {payment.status !== "VOID" && + payment.status !== "DENIED" && ( - )} - {/* When VOID → Unvoid */} {payment.status === "VOID" && (