mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 01:40:01 +00:00
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:
@@ -49,6 +49,7 @@ export async function fetchOwnerLedger(associationId: string, asOf: string): Pro
|
|||||||
.from("owner_ledger_entries")
|
.from("owner_ledger_entries")
|
||||||
.select("unit_id, owner_id, date, transaction_type, debit, credit")
|
.select("unit_id, owner_id, date, transaction_type, debit, credit")
|
||||||
.eq("association_id", associationId)
|
.eq("association_id", associationId)
|
||||||
|
.not("is_archived", "is", true)
|
||||||
.lte("date", asOf)
|
.lte("date", asOf)
|
||||||
.order("id", { ascending: true })
|
.order("id", { ascending: true })
|
||||||
.range(offset, offset + PAGE - 1);
|
.range(offset, offset + PAGE - 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user