AR Aging (Property): exclude archived owner-ledger entries

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 <noreply@anthropic.com>
This commit is contained in:
2026-06-16 22:49:52 -04:00
parent 46b0855840
commit 61b9933bea
+1
View File
@@ -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);