From 61b9933beaccf4871be2f4ba417763780a345823 Mon Sep 17 00:00:00 2001 From: renee-png Date: Tue, 16 Jun 2026 22:49:52 -0400 Subject: [PATCH] AR Aging (Property): exclude archived owner-ledger entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fetchOwnerLedger pulled all entries regardless of is_archived, so the accounting AR Aging / Prepaid / batch reports still counted archived (voided/duplicate) charges — e.g. 2455-VL showed $4K in violations instead of $3K. Exclude archived entries at the source. Co-Authored-By: Claude Opus 4.8 --- src/pages/accounting/lib/ownerLedger.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/accounting/lib/ownerLedger.ts b/src/pages/accounting/lib/ownerLedger.ts index 16ae243..38e1e6b 100644 --- a/src/pages/accounting/lib/ownerLedger.ts +++ b/src/pages/accounting/lib/ownerLedger.ts @@ -49,6 +49,7 @@ export async function fetchOwnerLedger(associationId: string, asOf: string): Pro .from("owner_ledger_entries") .select("unit_id, owner_id, date, transaction_type, debit, credit") .eq("association_id", associationId) + .not("is_archived", "is", true) .lte("date", asOf) .order("id", { ascending: true }) .range(offset, offset + PAGE - 1);