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

W105: Complete in-transit transfer

Records the inbound leg of an in-transit FG transfer, closing the pair. Triggered from the Finished Goods Inventory Transfers page, "Mark complete". Mirrors W098 with one difference: the unit cost carries over from the outbound TRANSFER row instead of being recomputed.

Steps

  1. Confirm the transfer is in transit. Call FinishedGoodsInventory.listEntriesByRef(ref). The outbound TRANSFER row must exist; no matching RECEIVE row may exist yet.

  2. Write the paired RECEIVE row. Call FinishedGoodsInventory.recordReceipt({ skuId, locationId: to_location_id (from outbound), quantity, ref, eventDate, notes, unitCost: outbound.unitCost }). Quantity is positive per the L1 invariant; RECEIVE encodes inflow. The unit cost is the same value the outbound TRANSFER carried; FG transfers preserve cost rather than re-deriving it at the destination.

Returns

The inbound RECEIVE row.

Business rules

  • Destination comes from the outbound row. Same as W098.
  • Unit cost is inherited. The inbound RECEIVE copies the outbound row's unitCost verbatim — null for manual transfers.
  • No undo in v1. Same as W098.

Errors

  • NotFoundError. The ref is unknown.
  • InvalidTransitionError. The transfer has already been completed.