The Purchase Order list is roughly twelve times faster, deleted lines stay deleted, requisition totals are correct, and a discounted line is billed at its net price.
GR / IR Report Reads Each Line’s Own Receiving Document
A service line billed against a posted Service Entry Sheet was reported as “invoiced, goods not received” for the full invoice value. A service is never receivable into stock and an asset receipt is its own document, so neither can produce a goods movement — the report was looking only at goods movements. Each line now resolves its received quantity from the document that actually receives it, so the report ties back to the GR/IR account.
A Deleted Requisition or Order Line Came Back
Deleting a line worked, but the line reappeared on the next load and was still counted in the document total — one requisition served six lines for five live ones and totalled ₹5,02,000 instead of ₹4,72,000. Removed lines are now filtered everywhere they are read.
Requisition Total Was One Line Behind
The stored requisition total was always missing the most recently added line, which is why every single-line requisition stored zero. One live requisition held ₹4,35,072.75 against seven lines worth ₹5,67,882.00. The total is now recomputed including the line being saved.
A Discounted Purchase Order Line Was Billed at the Gross Price
The goods receipt correctly valued a discounted line at its net price, but the vendor invoice proposal offered the gross price, so the invoice billed more than the receipt had accrued and left a permanent unexplained residue in the GR/IR clearing account. The proposal, the price-difference check and the reporting all now read the net price.
Purchase Order List: 10.4s → 0.9s
Measured on a live workspace with 292 orders and 1,710 lines, the Purchase Order list went from 4,825 database queries and a 1.86 MB response to 2 queries and 176 KB — a total of 10.4 seconds down to 0.9. The list no longer ships every line of every order; an expanded row fetches the one order it opens. Header totals are computed once rather than five queries per row.