W099: Adjust inventory
Records a positive correction to materials on-hand. Triggered from the Materials Inventory page, "Adjust". Used when the physical count exceeds what the ledger says (the L1 enum reserves ADJUST for inflow-only corrections; reductions go through W100 Dispose).
Steps
-
Validate the material and location. Confirm both exist.
-
Write the ADJUST ledger entry. Call
MaterialsInventory.recordAdjustment({ materialId, locationId, quantity, eventDate, notes }).quantityis positive (per the L1quantity > 0invariant); direction is encoded in the event type.refis null on ADJUST rows.
Returns
The ledger entry.
Business rules
- Adjustments are unrefed by design. They are corrections, not movements tied to another document. The notes field is the audit trail.
- ADJUST is inflow-only. "I counted more than the ledger said" is ADJUST; "I counted less" is Dispose (W100). The L1 enum splits the two so reporting can separate found-stock from loss / scrap.
Errors
NotFoundError. The material or location was not found.