Inventory
title: "Site Items (ITM)" ---
Site Items (ITM)
The itm submodule of inv owns the per-(site, item) configuration that says how an item is stocked, ordered, and sourced at each site — minimum stock and order quantities, default location reference, label count, and the workflow team responsible for material handling. It also defines a small family of in-memory QuantityRecord value types other inventory submodules use to carry composite (pieces + quantity + UoM) figures around. It depends on inv.loc for the site and cat.itm for the item.
Concepts
Site ItemA configuration row for one item at one site. Records the planning policy (order system / order policy / sourcing type), thresholds (minimum stock, minimum order), and the default storage location reference and material team for material handling.
Item Order SystemWhether the item is planned by MRP, by statistical inventory control (SIC), or manually.
Item Order PolicyWhether the item is replenished anonymously to stock or is ordered to a specific demand.
Item Sourcing TypeWhere the item comes from — purchase, manufacturing, or distribution.
Quantity RecordAn in-memory value type bundling pieces, quantity, and UoM. Three variants exist:
QuantityRecord(UoM-code),QuantityRecord2(with a fullUomentity), andSimpleQuantityRecord(no UoM).EconomicQuantityRecordaggregates three of them for on-order, on-hand, and allocated.
Entities
Site Item (SiteItem)
A per-(site, item) stocking configuration.
| Field | Description |
|---|---|
| Owning site (composite business key with |
| The catalogue item (final). |
| Optional number of labels printed per unit. Default |
| Optional default storage location reference at the site. |
| Optional minimum-stock threshold below which replenishment is needed. |
| Optional minimum-order threshold a replenishment must satisfy. |
| Planning system — see Order Systems below. |
| Replenishment policy — see Order Policies below. |
| Where the item comes from — see Sourcing Types below. |
| Optional workflow team responsible for material handling. |
Order Systems (ItemOrderSystem)
| Code | Name | Meaning |
|---|---|---|
| MRP | Planned by Material Requirements Planning. |
| Manual | Planned manually (replenishment decided per case). |
| SIC | Statistical Inventory Control — for items without planned demand (floorstock, consumables). |
Order Policies (ItemOrderPolicy)
| Code | Name | Meaning |
|---|---|---|
| Anonymous | Replenished to stock; not tied to a specific demand. |
| To-order | Replenished against a specific order. |
Sourcing Types (ItemSourcingType)
| Code | Name | Meaning |
|---|---|---|
| Purchase | Bought from a supplier. |
| Manufacturing | Produced internally. |
| Distribution | Distributed from another site. |
Functionality
Mandatory site-item lookup
INV_ITM_QueryApi.getSiteItemMandatory returns the SiteItem row for a (site, item) pair, raising a business exception when the row does not exist. Used by every flow that needs to know how the item is stocked at the site (stock issue, receipt, replenishment plan, …).
Site-item copy
SiteItemWriterService.copyAndPersistSiteItems clones every SiteItem row of an existing item and re-persists it under a new item, preserving the planning configuration (order system / policy / sourcing type), label count, location reference, and material team. Used by INV_ITM_CommandApi.copyAndPersistSiteItems when an item is duplicated at the catalogue level.
Public API
INV_ITM_QueryApi
Read-side facade.
| Method | Description |
|---|---|
| Returns the |
INV_ITM_CommandApi
Write-side facade.
| Method | Description |
|---|---|
| Copies every site-item row of an existing item to a new item and persists the copies. |
Quantity record value types
Other inventory submodules consume the QuantityRecord, QuantityRecord2, SimpleQuantityRecord, and EconomicQuantityRecord value types from this package directly — they are not entities and they are not exposed through the query/command API.
ViewModel actions
The submodule defines a view model for SiteItem but does not declare any custom UI actions.
title: "Sites and Warehouses (LOC)" ---
Sites and Warehouses (LOC)
The loc submodule of inv owns the physical-location reference data for inventory: sites, warehouses inside a site, locations inside a warehouse, the location-types that classify those locations, and the per-(warehouse, container-type) capacity rows. It depends on com.org for the company a site belongs to, on com.cal for the site’s working calendar, on com.log for the weight UoM, on com.par for the warehouse’s delivery address, and on inv.cnt for the container types pinned to location types and warehouse capacity. It also exposes the HasInventoryTransaction extension interface that every inventory-transaction row across the ERP implements.
Concepts
SiteA physical location of operations — typically a plant or distribution centre — owned by a finance company. Carries the working calendar and the default receipt/delivery warehouses.
WarehouseA storage facility within a site. Has a type (internal/transit/external) and a delivery address.
Warehouse LocationA storage spot inside a warehouse — a rack, a bay, a slot — classified by its
LocationType.Location TypeA reference type that names a class of storage spot (receipt, bulk, pick, work-in-progress, despatch). Drives which container types can sit in a location of this type.
Location Type ContainerA link row that says which
ContainerTyperows are allowed in a givenLocationType.Warehouse CapacityA per-(warehouse, container-type) capacity figure: how many bulk and pick units of the container type the warehouse can hold.
Inventory Posting TypeA binary classifier that says whether an inventory operation is a forward post or its reversal — used by the rollback flow to undo what a forward post did.
Inventory TransactionA common shape implemented by every entity that posts to inventory: when, where, who, what, and the optional external UoM. Other modules consume this through the
HasInventoryTransactioninterface.
Entities
Site (Site)
A physical operations location.
| Field | Description |
|---|---|
| Business key (up to 4 characters). |
| Human-readable name. |
| Owning finance company. |
| Working calendar. |
| Default weight UoM at the site. |
| Optional default warehouse used for inbound goods. |
| Optional default warehouse used for outbound goods. |
Warehouse (Warehouse)
A storage facility.
| Field | Description |
|---|---|
| Business key (up to 8 characters). |
| Human-readable name. |
| Owning site. |
| Internal, transit, or external — see Warehouse Types below. Default |
| The delivery address attached to the warehouse. |
Warehouse Types (WarehouseType)
| Code | Name | Meaning |
|---|---|---|
| Internal | A facility owned and operated by the company. |
| Transit | A transit/in-flight location for goods between facilities. |
| External | A third-party facility (3PL, supplier, …). |
Warehouse Location (WarehouseLocation)
A storage spot inside a warehouse.
| Field | Description |
|---|---|
| Owning warehouse (composite business key with |
| Location code (a |
| The class of spot. |
| Optional free-form description. |
Location Type (LocationType)
A class of storage spot.
| Field | Description |
|---|---|
| Business key (up to 6 characters). |
| Human-readable name. |
| What the spot is for — see Storage Types below. |
Storage Types (StorageType)
| Code | Name | Meaning |
|---|---|---|
| Receipt | Inbound goods sit here on arrival. |
| Bulk | Bulk-stored stock. |
| Pick | Pickable stock for outbound. |
| Work in process | Stock currently being worked on. |
| Despatch | Outbound goods staging. |
Location Roles (LocationRole)
| Code | Name | Meaning |
|---|---|---|
| Receipt | Used for inbound flows. |
| Stock | Used for stocking. |
| Expedition | Used for outbound flows. |
Location Type Container (LocationTypeContainer)
A link between a location type and a container type that may sit in it.
| Field | Description |
|---|---|
| Owning location type (composite business key with |
| The container type allowed in the location. |
Warehouse Capacity (WarehouseCapacity)
A per-(warehouse, container-type) capacity figure.
| Field | Description |
|---|---|
| Owning warehouse (composite business key with |
| The container type the figures apply to. |
| Bulk capacity in pieces. |
| Optional pick capacity in pieces. |
Functionality
Capacity and location lookup
INV_LOC_QueryApi exposes two thin lookups: warehouse capacity for a (warehouse, container type) pair, and a warehouse location by (warehouse, location code). Both return null when not found — callers decide whether absence is an error.
Inventory-transaction extension
HasInventoryTransaction is the seam every inventory-touching entity in the ERP implements. It standardises the question "what does this row do to inventory?" — exposing the transaction type, address, optional warehouse location, partner, inventory unit, pieces, internal quantity, and optional external UoM/quantity. Modules like inv.unt, acc.jrn, and the trade modules code against this interface so they don’t depend on the concrete entities.
Posting type
InventoryPostingType is a small enum (POST_TO_INVENTORY / UNDO_POST_TO_INVENTORY) used by inventory-posting flows to indicate whether the operation is a forward post or its reversal. The reversal flag is exposed via isReversal().
Public API
INV_LOC_QueryApi
Read-side facade.
| Method | Description |
|---|---|
| Capacity row for the pair, or |
| Warehouse location by code, or |
INV_LOC_CommandApi
This submodule does not provide a command API class. Sites, warehouses, locations, location types, and capacity rows are maintained through the standard CRUD pages.
HasInventoryTransaction extension
Cross-module seam every inventory-posting entity implements. Methods: getInventoryTransactionType, getInventoryAddress, getWarehouseLocation, getPartner, getInventoryUnit, getQuantityPcs, getQuantityInt, getQuantityUom, getQuantityExt.
ViewModel actions
The submodule defines view models for Site, Warehouse, WarehouseLocation, LocationType, LocationTypeContainer, and WarehouseCapacity but does not declare any custom UI actions.
title: "Lots (LOT)" ---
Lots (LOT)
The lot submodule of inv owns the lot/batch tracking entities: an ItemLot is a manufacturer-side lot of a specific item, a LotUnit is the link between an inventory unit and the lot it belongs to (one-to-one), and a SupplierLot is the supplier-side lot reference (with optional expiration date) attached to a supplier+item combination. The submodule depends on cat.itm for the item, inv.unt for the inventory unit, com.par for the supplier, and acc.doc for the lot date.
Concepts
Item LotA lot of a specific item — the in-house lot identifier under which one or more inventory units are grouped. Has its own lot date.
Lot UnitA 1-to-1 link between an
InventoryUnitand theItemLotit belongs to. Used by inventory queries to drill from a unit to the lot.Supplier LotThe supplier’s lot identifier for a (supplier, item) combination. Carries an optional expiration date.
Entities
Item Lot (ItemLot)
A manufacturer-side lot of an item.
| Field | Description |
|---|---|
| Owning item (composite business key with |
| Lot code — a 6-digit integer (final). |
| The lot’s date (final). |
Lot Unit (LotUnit)
The 1-to-1 link from an inventory unit to its lot.
| Field | Description |
|---|---|
| The inventory unit (one-to-one, business key, final). |
| The lot the unit belongs to (final). |
Supplier Lot (SupplierLot)
A supplier-side lot reference.
| Field | Description |
|---|---|
| Owning supplier (composite business key with |
| The item. |
| The supplier’s lot code (final). |
| Optional expiration date (operational). |
Functionality
The submodule does not currently expose hand-written Spring services from this package — every entity is read and written through its standard generated reader/writer. Lot creation typically happens as a side effect of inbound flows (purchase receipt, production completion); lot lookup by a (supplier, item, lotCode) tuple uses the generated reader directly.
Public API
INV_LOT_QueryApi and INV_LOT_CommandApi
This submodule does not provide query- or command-API classes. Other modules read the lot entities through the standard generated readers and create lot rows as part of inbound and production flows.
ViewModel actions
The submodule defines view models for ItemLot, LotUnit, and SupplierLot but does not declare any custom UI actions.
title: "Inventory Units (UNT)" ---
Inventory Units (UNT)
The unt submodule of inv owns the lowest-level identity-tracked inventory record: an InventoryUnit is one physical "thing" tracked by its cost-unit code (a coil, a roll, a pallet) plus its current location, supplier-lot, and a bundle of operational status flags. The submodule also owns the timestamped status-event and location-transaction streams that drive every status change and physical move. It depends on inv.loc for warehouse locations, inv.bun for the optional bundle a unit belongs to, inv.lot for the supplier lot and item lot, inv.lev for the on-hand inventory levels consulted before a move, acc.cst for the cost unit, and cat.itm for the item.
Concepts
Inventory UnitA single identity-tracked physical thing. Identified by its
CostUnit(one-to-one). Tracks the current location, the supplier lot, a derived availability status, and a small set of status flags (obsolete, complaint, reject, blocked, inspect).Inventory Unit StatusA reference type that maps a status code to two derived flags —
statusBlockedandstatusInspect— that a unit inherits when the status is applied.Inventory Unit Status EventAn immutable timestamped record of a status change on a unit, carrying the user, the (optional) new status, and a free-form description. Goes through
Draft→Processed.Inventory Location TransactionAn immutable timestamped record of a unit moving from one warehouse location to another, optionally as part of a bundle move. Goes through
Draft→Processed; processing flips the unit’s current location and rolls the bundle along when present.Inventory Availability StatusA derived enum (
UUnrestricted /BBlocked /IInspect) that other modules consult to decide whether a unit may participate in a flow.Inventory Transaction TypeThe classifier consumed by
HasInventoryTransaction(ininv.loc) to say what kind of inventory operation a row represents — see Inventory Transaction Types below.
Entities
Inventory Unit (InventoryUnit)
A single identity-tracked physical thing.
| Field | Description |
|---|---|
| The cost unit (one-to-one, business key, final). |
| Optional supplier lot. |
| Optional current warehouse location. |
| Operational flag: marked obsolete. Default |
| Operational flag: marked under complaint. Default |
| Operational flag: marked rejected. Default |
| Derived flag: blocked from outbound flows. |
| Derived flag: requires inspection before release. |
| Optional derived |
| Derived availability — |
| Internal shortcut to the cost unit’s item (business-information). |
A validation rule enforces that the cost unit’s item equals the supplier lot’s item.
Inventory Availability Statuses (InventoryAvailabilityStatus)
| Code | Name | Meaning |
|---|---|---|
| Unrestricted | Available for any flow. |
| Blocked | Not available for outbound flows. |
| Inspect | Quarantined pending inspection. |
Inventory Transaction Types (InventoryTransactionType)
These are the kinds of inventory operations carried by every HasInventoryTransaction implementation across the ERP.
| Code | Meaning |
|---|---|
| Purchase receipt |
| Sales delivery |
| Warehouse receipt |
| Warehouse issue |
| Production issue |
| Production receipt |
| Sales issue |
| Sales return / receipt |
| Subcontract issue |
| Subcontract receipt |
| Adjustment |
Inventory Unit Status (InventoryUnitStatus)
A reference status code with two derived flags.
| Field | Description |
|---|---|
| Business key (up to 4 characters). |
| Human-readable name. |
| Whether units carrying this status are blocked. Default |
| Whether units carrying this status require inspection. Default |
Inventory Unit Status Event (InventoryUnitStatusEvent)
A timestamped record of a status change. Implements the framework IsEvent interface.
| Field | Description |
|---|---|
| Owning unit (composite business key with |
| When the event was recorded (final). |
| The user who applied the status (final). |
| Optional new status (final). |
| Optional free-form note. |
| Lifecycle flag. |
Inventory Location Transaction (InventoryLocationTransaction)
A timestamped record of a unit moving between warehouse locations.
| Field | Description |
|---|---|
| Owning unit (composite business key with |
| When the move happened (final). |
| Optional bundle the move applies to (final). |
| Optional source location (final). |
| Destination location (final). |
| Lifecycle flag. |
Functionality
Recording a unit move
InventoryLocationTransactionActionWriter.addInventoryLocationTransaction records a fresh InventoryLocationTransaction for a unit (and optional bundle) moving to a target location, in Draft state. The from location is captured from the unit’s currentLocation at the time of recording.
Processing a unit move
processInventoryLocationTransaction is the seam invoked by the confirm action on the move event. It looks up the unit’s on-hand inventory line through inv.lev, raises a business exception if there is no on-hand stock or if there is more than one on-hand line (an integrity invariant), updates the unit’s currentLocation, rolls the bundle along when one is present, and marks the transaction Processed.
Bundle relocation
changeBundleLocation is the bundle-side counterpart used when a whole bundle moves. It records and processes a single transaction per affected unit while keeping the bundle/unit relationship in sync.
Status events
InventoryUnitStatusEventActionWriter is the action handler for the confirm and confirmUndo actions on a InventoryUnitStatusEvent. Confirming the event applies the new status to the unit (recomputing biStatusBlocked, biStatusInspect, and the derived biAvailabilityStatus); confirmUndo reverts to the previous state. The unit entity recalculates biAvailabilityStatus whenever a status flag changes (__setBiStatusBlocked and friends).
Public API
INV_UNT_QueryApi
This submodule does not provide a query API class. Other modules read units, statuses, status events, and location transactions through the standard generated readers.
INV_UNT_CommandApi
Write-side facade. All three methods delegate to InventoryLocationTransactionActionWriter.
| Method | Description |
|---|---|
| Records a draft move event for a unit (and optional bundle) to a target location. |
| Moves a whole bundle to a target location. |
| Processes a draft move event: updates the unit’s current location and (when relevant) the bundle, marks the event processed. |
ViewModel actions
| Action | User-visible effect |
|---|---|
| Processes a drafted move: updates the unit’s location and rolls the bundle along. |
| Reverts a processed move back to draft. |
| Applies the status to the unit and recomputes its availability. |
| Reverts the status change. |