Fix sundry creditors ageing with signed FIFO reconstruction

This commit is contained in:
A R R R Associates
2026-09-10 16:22:58 +05:30
parent 960eb87fca
commit baac27597d
2 changed files with 140 additions and 78 deletions
@@ -5,7 +5,7 @@
<div>
<p class="text-xs font-semibold uppercase tracking-[0.16em] text-brand-600">Accounting · Audit Analysis</p>
<h1 class="mt-1 text-2xl font-semibold text-slate-900">Sundry Creditors – 180 Day Analysis</h1>
<p class="mt-1 max-w-4xl text-sm text-slate-500">Analyses closing Sundry Creditors into ≤180 days and &gt;180 days from the local Accounting Mirror. The selected-FY closing balance and ageing are reconstructed from the Accounting Mirror on FIFO: debit-side settlements clear the oldest balances first, so the newest credit-side additions form the unpaid closing balance. Bill-reference allocations are not yet stored in the .act mirror.</p>
<p class="mt-1 max-w-4xl text-sm text-slate-500">Analyses closing Sundry Creditors into ≤180 days and &gt;180 days from the local Accounting Mirror. The selected-FY closing balance is reconstructed from the ledger opening plus selected-FY movements. FIFO ageing is performed forward: Purchase credits create payable lots and debit-side payments/sales/adjustments clear the oldest payable lots first. Receipt/other credits are not presented as purchase bills. Bill-reference allocations are not yet stored in the .act mirror.</p>
</div>
<a href="/tools/tally{% if selected_client %}?client_id={{ selected_client.id }}{% endif %}" class="rounded-xl border border-slate-300 bg-white px-4 py-2 text-sm font-semibold text-slate-700 hover:bg-slate-50">Back to Tally Accounting</a>
</div>
@@ -51,7 +51,7 @@
<div class="rounded-2xl border border-slate-200 bg-white">
<div class="border-b border-slate-100 px-4 py-3 text-xs text-slate-500">
Click a <strong>party name</strong> to see all surviving FIFO lots, or click the <strong>≤180</strong> / <strong>&gt;180</strong> amount to drill directly into that age bucket. Purchase vouchers, opening/brought-forward balances and subsequent-payment status are shown from the same FIFO calculation used by the summary.
Click a <strong>party name</strong> to see all surviving FIFO components, or click the <strong>≤180</strong> / <strong>&gt;180</strong> amount to drill directly into that age bucket. Genuine Purchase vouchers and opening/brought-forward balances are shown as payable lots; any surviving Receipt/other credit is separately labelled as Other credit / advance and is never presented as a purchase bill.
</div>
<div class="overflow-x-auto">
<table class="min-w-full text-sm">
@@ -81,7 +81,7 @@
<div class="rounded-xl border border-slate-200 bg-white">
<div class="flex flex-wrap items-center justify-between gap-3 border-b border-slate-100 px-4 py-3">
<div>
<div class="font-semibold text-slate-900">{{ row.party_name }} · FIFO Purchase Bill Drill-down</div>
<div class="font-semibold text-slate-900">{{ row.party_name }} · FIFO Outstanding Drill-down</div>
<div class="mt-1 text-xs text-slate-500">Closing ₹ {{ '%.2f'|format(row.closing_balance) }} · ≤180 ₹ {{ '%.2f'|format(row.within_180) }} · &gt;180 ₹ {{ '%.2f'|format(row.over_180) }}</div>
</div>
<div class="flex flex-wrap gap-2">
@@ -122,7 +122,7 @@
</table>
</div>
<div class="border-t border-slate-100 px-4 py-3 text-xs text-slate-500">
<strong>Note:</strong> “Opening / brought forward” represents an old balance for which the originating purchase voucher is outside the selected FY/mirror history. Purchase-voucher rows are FIFO-derived outstanding purchase bills from the same closing-balance control used in the party summary; Receipt/Sales/other credit movements are not presented as purchase bills. These are not Tally bill-reference allocations.
<strong>Note:</strong> “Opening / brought forward” represents an old balance whose originating bill is outside the selected FY/mirror history. “Purchase voucher” rows are FIFO-derived outstanding purchase bills. “Other credit / advance” is disclosed separately only when a non-purchase credit remains in the ledger closing after FIFO netting; it is not represented as a purchase bill. These are not Tally bill-reference allocations.
</div>
</div>
</td>