Skip to main content
Version: v1.0.0(int)

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

  1. Validate the material and location. Confirm both exist.

  2. Write the ADJUST ledger entry. Call MaterialsInventory.recordAdjustment({ materialId, locationId, quantity, eventDate, notes }). quantity is positive (per the L1 quantity > 0 invariant); direction is encoded in the event type. ref is 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.