Skip to main content

Issue Parts to a Work Order

When parts are issued against a maintenance work order, the stock movement and the job are linked: you can see what each repair consumed, what it cost, and which work orders drove a part's usage.

This lesson uses the Machine 1 - Coolant leak work order from Raise a One-Time Work Order. If you haven't taken the Maintenance course, read along.

Issue hose to the coolant leak work order
  1. In Maintenance → Work Orders, open Machine 1 - Coolant leak.

  2. Open the Parts Used tab and click Add.

  3. Fill in the transaction:

    FieldValue
    Transaction TypeIssue from inventory
    Part #CF-HOSE-075
    Inventory LocationParts Room
    AssetMachine 1
    Qty6
  4. Click Save. The issue is listed on the Parts Used tab.

  5. In Inventory → Parts, expand CF-HOSE-075. On hand is now 19, and the issue references the work order.

The issue records two assets: the inventory location the hose came from (Parts Room) and the asset it was used on (Machine 1). That's what lets you report parts consumption by machine as well as by storeroom.

To issue parts from your own screen or another system, the same thing can be scripted with system.kanoa.inventory.issuePartToWorkOrderEvent: see Script Parts and Stock.

Reference Materials: Issue Against a Maintenance Work Order

Issue Against a Maintenance Work Order​

Parts consumed during a maintenance activity can be tracked directly against the work order event. This provides full traceability between stock consumption and maintenance history.

In the UI, open the work order in Maintenance → Work Orders, go to its Parts Used tab and click Add. Choose Issue from inventory as the Transaction Type, then the Part #, the Inventory Location it came from, the Asset it's used on and the Qty, and save. The tab lists every part issued to the work order.

Via script:

inventoryTransactionId, err = system.kanoa.inventory.issuePartToWorkOrderEvent({
'partId': partId,
'quantity': 2,
'workOrderEventId': workOrderEventId,
'inventoryAssetId': warehouseAssetId,
'assetId': maintainedAssetId,
'usedBy': technicianUserId,
'unitCost': 3.75,
}, userId)

To retrieve all parts consumed against a set of work order events:

data = system.kanoa.inventory.getPartsUsedByWorkOrderEvents({
'workOrderEventId': workOrderEventId,
})