Skip to content

PRD: Purchase Orders

ModuleInventoryPRD IDPRD-PO-001
StatusSupersededFEATPO
EpicPlane
Date2026-07-13Versionv1.0
Packages@nx/inventoryURDPO
SurfaceClient · Owner/Mgr
OwnerPhát Nguyễn

What a purchase order is

A merchant orders from a vendor with a purchase order raised on the Client app: one vendor for the whole order, one inventory location that will receive the goods, and a list of items with quantity, unit price and purchase unit. Several merchants sit under one organizer.

The purchase order is the document behind every arrival of goods from outside. It is also the only place inventory valuation is born.

The four numbers in stock

Lifted from Stock locations & levels so there is no need to open another PRD. Every item at every location carries four numbers:

NumberWhat the system calls itMeaning
On-handon-handGoods physically sitting in the location
ReservedreservedAlready promised to another document, no longer sellable to anyone else
AvailableavailableThe part still sellable
IncomingincomingLeft the source location, not yet arrived at the destination

The invariant, true at every moment:

Available = On-hand - Reserved

Goods ordered from a vendor but not yet delivered are in none of these four numbers. Incoming only counts goods in transit between two locations inside the system.

Why every arrival needs a document behind it

Without a purchase order, every stock increase is a hand-typed number, and nobody can trace back why stock went up, or at what cost.

Goods arriving in batches is an ordinary day. You order 100 cases, the vendor drops 60 this morning and promises the rest next week. A system that demands a full receipt before it records anything gets worked around: staff type a number that fits and fix it later, or abandon the feature. So a purchase order is receivable in parts, and a short delivery is an ordinary event rather than an error.

One purchase order, end to end

Order 70 cases of milk at VND 50,000 a case. The location is empty. The vendor delivers in two batches, and the second batch is 5 cases over, at a price that has gone up.

What happensOrderedCumulatively receivedOn-handInventory valuation
Send the order to the vendor7000none yet
Batch 1: 50 cases at VND 50,000705050VND 50,000
Batch 2: 25 cases at VND 62,000707575VND 54,000
  • Goods are sellable the moment they land. The 50 cases of the first batch sell immediately, with no wait for the order to complete.
  • The second batch delivers 25 cases while only 20 were outstanding. The 5 surplus cases are still recorded: the goods are in the location, so the books have to say so.
  • Inventory valuation is blended by quantity weight: (50 × 50,000 + 25 × 62,000) divided by 75 is VND 54,000. Valuation only changes at receipt.
  • Every line has now received its full ordered quantity, so the order moves to Completed on its own, with nothing to click.

The easiest thing to get wrong

A Completed order cannot be cancelled

The goods are already in the location. Cancelling does not pull them back off the shelf, so cancelling a finished order is a meaningless action.

To send goods back to the vendor, raise a vendor-return ticket. A correction is a new document, never a state change on a document that is already closed.

Cancel only applies to an order that is still live: Draft, Sent, Received. And cancelling a partially received order does not reverse the stock already recorded: the goods that arrived stay in stock and the ledger lines stand untouched.

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.