Kitting#

Kitting is the process of allocating and issuing every component the BOM calls for to a specific work order. In ManexCloud, kitting is the point at which inventory is reserved against a WO; actual consumption is recorded later as SFT completes.

Data flow#

WO + BOM  →  KitHelper.Pick  →  KA_MAIN / KA_DETAIL  →  INVTRES reservations
                                                    ↘ InvtSer / InvtLot locks for serial / lot-tracked parts
  • KA_MAIN / KA_DETAIL are the kit allocation header and lines (one line per BOM component).
  • INVTRES is the inventory reservation table — kitting adds rows here, unkitting / cancellation removes them.
  • For serialised or lot-tracked parts, specific serials / lots are locked via IReserveSerialHelper, IRecSerialHelper, and InvtLotHelper.

Pick flow (KitHelper.Pick)#

Called when a user or job starts kitting a WO. The helper (MnxEFModel/Helper/Kit/KitHelper.cs):

  1. Zero-pads the WO number (CheckWorkOrderNumberPadding).
  2. Looks up the WO. Throws WorkOrderNumberDoesNotExists if missing.
  3. Rejects the pick if OPENCLOS == "Mfg Hold".
  4. Opens a TransactionScope.
  5. Explodes the WO’s BOM (including phantoms) and generates KA_DETAIL rows.
  6. For each component, walks the primary AVL then alternates, respecting anti-AVL, until the required quantity is reserved.
  7. Writes INVTRES reservations and, for serial / lot-tracked parts, per-unit locks.
  8. Commits the transaction — a failure at any step rolls back the whole allocation.

The related helper KitUpdateHelper handles partial re-picks and adjustments to an existing allocation. KaDetailHelper exposes the detail lines for the UI grid.

Auto-kit#

AutoKitModel (view model in MnxEFModel/ProcedureClasses/AutoKitModel.cs) is used by the “auto-kit” flow that kits many WOs in a single job — typically driven from Production Control.

Business rules#

  • Never kit during Mfg Hold. Enforced at helper level, not just UI.
  • AVL / anti-AVL is authoritative. The allocator will not pick an anti-AVL’d part even if it’s the only stock available — the shortage is reported instead.
  • Serial / lot lock is a reservation, not an issue. The physical inventory only leaves stock at issue-to-WO time; until then the serial appears “reserved” not “consumed”.
  • Reversal must be transactional. Un-kitting or cancelling a WO must remove INVTRES, KA_DETAIL, and any serial locks together — never one without the others.

Where it lives#

LayerFile
ControllernewSite/Controllers/KitController.cs, KitApiController.cs, BOMtoKITUploadController.cs
HelperMnxEFModel/Helper/Kit/KitHelper.cs, KaDetailHelper.cs, KitUpdateHelper.cs, InvtResHelper.cs, IReserveSerialHelper.cs, IRecSerialHelper.cs, InvtLotHelper.cs
Stored procsTSQL/KitAllocate_sp.sql
RelatedWork Orders, BOM & EBOM, Inventory & SCM