Tax withheld at source was being recorded as though payments had been allocated against the invoice, so an unpaid invoice looked part-settled with no explanation anywhere on the ledger.
Withheld Tax Is Recorded as TDS, Not as an Allocation
An invoice showing ₹10,32,500 credited and ₹10,15,000 outstanding with no payment against it was explaining nothing: the ₹17,500 difference was TDS withheld at posting, and the whole withheld amount had been pushed into the allocated column because that was the only lever that made the outstanding figure come out right.
So the sub-ledger reported an allocation that never happened and could not say why an unpaid invoice was part-closed. The general ledger was never wrong.
TDS is now stored as TDS, the allocated column goes back to meaning what payments actually cleared, and the Vendor Ledger grid has a TDS column — without which filling in the field would still have shown the operator nothing. Historical rows compute the same outstanding figure either way.
Administrators: run backfill_vendor_ledger_tds --tenant <id> to restate existing invoices. It reports by default and writes only with --apply. No balance changes — an amount only stops being called an allocation and starts being called TDS.