# PurchaseItem

## Description

PurchaseItem is the purchase module's own record for an item that may be procured. It holds the attributes that only procurement decides, apart from the shared item ledger in item-management.

The existence of the row *is* the decision. An item without a PurchaseItem cannot appear on a purchase order line at all; adopting an item for purchasing means creating its PurchaseItem, and withdrawing it means deleting that row.

Today PurchaseItem carries one purchasing default: `requiresPhysicalReceipt`, which says whether ordering this item is expected to produce a goods receipt. That fact belongs to the item, not to the buyer typing a line — a consulting engagement never produces a receipt and a pallet of shirts always does, regardless of who ordered it. Purchase order lines resolve the value from here at entry time and freeze it onto the line, so a later change to the master never rewrites what an open order agreed to.

## Domain Model Definitions

### Model type

Standard

### Command Definitions

- [createPurchaseItem](../command/CreatePurchaseItem.md) - Adopt an item for purchasing and set its purchasing defaults
- [updatePurchaseItem](../command/UpdatePurchaseItem.md) - Change the purchasing defaults of an already adopted item
- [deletePurchaseItem](../command/DeletePurchaseItem.md) - Withdraw an item from purchasing

### Query Definitions

None — order commands read the record through the repository; no consumer needs a standalone read yet.

### Models

- PurchaseItem

### Invariants

- Every PurchaseItem references exactly one item; `itemId` is required and unique, so an item has at most one purchasing record
- An item may only be ordered while it holds a PurchaseItem; purchase order lines are rejected for items without one
- `requiresPhysicalReceipt` always has a value — the purchasing record never leaves the receipt expectation undecided
- Changing or deleting a PurchaseItem never changes purchase order lines that already froze its values

### Relationships

- **Belongs To Item**: Each purchasing record extends exactly one [Item](../../../item-management/docs/model/Item.md) (1:1)
- **Referenced By PurchaseOrder**: [PurchaseOrder](./PurchaseOrder.md) lines resolve `requiresPhysicalReceipt` from the purchasing record of their item and snapshot it onto the line
