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 Item

A 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 System

Whether the item is planned by MRP, by statistical inventory control (SIC), or manually.

Item Order Policy

Whether the item is replenished anonymously to stock or is ordered to a specific demand.

Item Sourcing Type

Where the item comes from — purchase, manufacturing, or distribution.

Quantity Record

An in-memory value type bundling pieces, quantity, and UoM. Three variants exist: QuantityRecord (UoM-code), QuantityRecord2 (with a full Uom entity), and SimpleQuantityRecord (no UoM). EconomicQuantityRecord aggregates three of them for on-order, on-hand, and allocated.

Entities

ITM entities

Site Item (SiteItem)

A per-(site, item) stocking configuration.

FieldDescription

site

Owning site (composite business key with item, final).

item

The catalogue item (final).

labelCount

Optional number of labels printed per unit. Default 1.

locationReference

Optional default storage location reference at the site.

minimumStockQuantity

Optional minimum-stock threshold below which replenishment is needed.

minimumOrderQuantity

Optional minimum-order threshold a replenishment must satisfy.

orderSystem

Planning system — see Order Systems below.

orderPolicy

Replenishment policy — see Order Policies below.

sourcingType

Where the item comes from — see Sourcing Types below.

wfTeamForWpMaterial

Optional workflow team responsible for material handling.

Order Systems (ItemOrderSystem)
CodeNameMeaning

MRP

MRP

Planned by Material Requirements Planning.

MAN

Manual

Planned manually (replenishment decided per case).

SIC

SIC

Statistical Inventory Control — for items without planned demand (floorstock, consumables).

Order Policies (ItemOrderPolicy)
CodeNameMeaning

ANO

Anonymous

Replenished to stock; not tied to a specific demand.

ORD

To-order

Replenished against a specific order.

Sourcing Types (ItemSourcingType)
CodeNameMeaning

PUR

Purchase

Bought from a supplier.

PRD

Manufacturing

Produced internally.

DIS

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.

MethodDescription

getSiteItemMandatory(HasTrace, Site, Item)

Returns the SiteItem for the (site, item) pair; raises if not configured.

INV_ITM_CommandApi

Write-side facade.

MethodDescription

copyAndPersistSiteItems(HasTrace, Item, Item)

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

Site

A 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.

Warehouse

A storage facility within a site. Has a type (internal/transit/external) and a delivery address.

Warehouse Location

A storage spot inside a warehouse — a rack, a bay, a slot — classified by its LocationType.

Location Type

A 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 Container

A link row that says which ContainerType rows are allowed in a given LocationType.

Warehouse Capacity

A per-(warehouse, container-type) capacity figure: how many bulk and pick units of the container type the warehouse can hold.

Inventory Posting Type

A 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 Transaction

A 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 HasInventoryTransaction interface.

Entities

LOC entities

Site (Site)

A physical operations location.

FieldDescription

code

Business key (up to 4 characters).

description

Human-readable name.

company

Owning finance company.

calendar

Working calendar.

weightUom

Default weight UoM at the site.

defaultReceiptWarehouse

Optional default warehouse used for inbound goods.

defaultDeliveryWarehouse

Optional default warehouse used for outbound goods.

Warehouse (Warehouse)

A storage facility.

FieldDescription

code

Business key (up to 8 characters).

description

Human-readable name.

site

Owning site.

warehouseType

Internal, transit, or external — see Warehouse Types below. Default I.

deliveryAddress

The delivery address attached to the warehouse.

Warehouse Types (WarehouseType)
CodeNameMeaning

I

Internal

A facility owned and operated by the company.

T

Transit

A transit/in-flight location for goods between facilities.

E

External

A third-party facility (3PL, supplier, …​).

Warehouse Location (WarehouseLocation)

A storage spot inside a warehouse.

FieldDescription

warehouse

Owning warehouse (composite business key with code).

code

Location code (a LocationCode).

locationType

The class of spot.

description

Optional free-form description.

Location Type (LocationType)

A class of storage spot.

FieldDescription

code

Business key (up to 6 characters).

description

Human-readable name.

storageType

What the spot is for — see Storage Types below.

Storage Types (StorageType)
CodeNameMeaning

R

Receipt

Inbound goods sit here on arrival.

B

Bulk

Bulk-stored stock.

P

Pick

Pickable stock for outbound.

W

Work in process

Stock currently being worked on.

D

Despatch

Outbound goods staging.

Location Roles (LocationRole)
CodeNameMeaning

R

Receipt

Used for inbound flows.

S

Stock

Used for stocking.

E

Expedition

Used for outbound flows.

Location Type Container (LocationTypeContainer)

A link between a location type and a container type that may sit in it.

FieldDescription

locationType

Owning location type (composite business key with containerType).

containerType

The container type allowed in the location.

Warehouse Capacity (WarehouseCapacity)

A per-(warehouse, container-type) capacity figure.

FieldDescription

warehouse

Owning warehouse (composite business key with containerType).

containerType

The container type the figures apply to.

bulkCapacityPcs

Bulk capacity in pieces.

pickCapacityPcs

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.

MethodDescription

findWarehouseCapacityByWarehouseAndContainerType(Warehouse, ContainerType)

Capacity row for the pair, or null.

findLocationByWarehouseAndCode(Warehouse, LocationCode)

Warehouse location by code, or null.

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 Lot

A 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 Unit

A 1-to-1 link between an InventoryUnit and the ItemLot it belongs to. Used by inventory queries to drill from a unit to the lot.

Supplier Lot

The supplier’s lot identifier for a (supplier, item) combination. Carries an optional expiration date.

Entities

LOT entities

Item Lot (ItemLot)

A manufacturer-side lot of an item.

FieldDescription

item

Owning item (composite business key with code, final).

code

Lot code — a 6-digit integer (final).

lotDate

The lot’s date (final).

Lot Unit (LotUnit)

The 1-to-1 link from an inventory unit to its lot.

FieldDescription

inventoryUnit

The inventory unit (one-to-one, business key, final).

itemLot

The lot the unit belongs to (final).

Supplier Lot (SupplierLot)

A supplier-side lot reference.

FieldDescription

supplier

Owning supplier (composite business key with item and lotCode, final).

item

The item.

lotCode

The supplier’s lot code (final).

expirationDate

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 Unit

A 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 Status

A reference type that maps a status code to two derived flags — statusBlocked and statusInspect — that a unit inherits when the status is applied.

Inventory Unit Status Event

An immutable timestamped record of a status change on a unit, carrying the user, the (optional) new status, and a free-form description. Goes through DraftProcessed.

Inventory Location Transaction

An immutable timestamped record of a unit moving from one warehouse location to another, optionally as part of a bundle move. Goes through DraftProcessed; processing flips the unit’s current location and rolls the bundle along when present.

Inventory Availability Status

A derived enum (U Unrestricted / B Blocked / I Inspect) that other modules consult to decide whether a unit may participate in a flow.

Inventory Transaction Type

The classifier consumed by HasInventoryTransaction (in inv.loc) to say what kind of inventory operation a row represents — see Inventory Transaction Types below.

Entities

UNT entities

Inventory Unit (InventoryUnit)

A single identity-tracked physical thing.

FieldDescription

costUnit

The cost unit (one-to-one, business key, final).

supplierLot

Optional supplier lot.

currentLocation

Optional current warehouse location.

statusObsolete

Operational flag: marked obsolete. Default false.

statusComplaint

Operational flag: marked under complaint. Default false.

statusReject

Operational flag: marked rejected. Default false.

biStatusBlocked

Derived flag: blocked from outbound flows.

biStatusInspect

Derived flag: requires inspection before release.

biUnitStatus

Optional derived InventoryUnitStatus reflecting the most recently applied status.

biAvailabilityStatus

Derived availability — U Unrestricted, B Blocked, I Inspect. Default U.

item

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)
CodeNameMeaning

U

Unrestricted

Available for any flow.

B

Blocked

Not available for outbound flows.

I

Inspect

Quarantined pending inspection.

Inventory Transaction Types (InventoryTransactionType)

These are the kinds of inventory operations carried by every HasInventoryTransaction implementation across the ERP.

CodeMeaning

PUR

Purchase receipt

SLS

Sales delivery

WHR

Warehouse receipt

WHI

Warehouse issue

PRI

Production issue

PRR

Production receipt

SLI

Sales issue

SLR

Sales return / receipt

SUI

Subcontract issue

SUR

Subcontract receipt

ADJ

Adjustment

Inventory Unit Status (InventoryUnitStatus)

A reference status code with two derived flags.

FieldDescription

code

Business key (up to 4 characters).

description

Human-readable name.

statusBlocked

Whether units carrying this status are blocked. Default false.

statusInspect

Whether units carrying this status require inspection. Default false.

Inventory Unit Status Event (InventoryUnitStatusEvent)

A timestamped record of a status change. Implements the framework IsEvent interface.

FieldDescription

inventoryUnit

Owning unit (composite business key with eventDateTime).

eventDateTime

When the event was recorded (final).

user

The user who applied the status (final).

inventoryUnitStatus

Optional new status (final).

description

Optional free-form note.

processed

Lifecycle flag.

Inventory Location Transaction (InventoryLocationTransaction)

A timestamped record of a unit moving between warehouse locations.

FieldDescription

inventoryUnit

Owning unit (composite business key with transactionTimeStamp).

transactionTimeStamp

When the move happened (final).

bundle

Optional bundle the move applies to (final).

fromLocation

Optional source location (final).

toLocation

Destination location (final).

processed

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.

MethodDescription

addInventoryLocationTransaction(HasTrace, InventoryUnit, Bundle?, WarehouseLocation)

Records a draft move event for a unit (and optional bundle) to a target location.

changeBundleLocation(HasTrace, Bundle, WarehouseLocation)

Moves a whole bundle to a target location.

processInventoryLocationTransaction(HasTrace, InventoryLocationTransaction)

Processes a draft move event: updates the unit’s current location and (when relevant) the bundle, marks the event processed.

ViewModel actions

ActionUser-visible effect

confirm (on Inventory Location Transaction)

Processes a drafted move: updates the unit’s location and rolls the bundle along.

confirmUndo (on Inventory Location Transaction)

Reverts a processed move back to draft.

confirm (on Inventory Unit Status Event)

Applies the status to the unit and recomputes its availability.

confirmUndo (on Inventory Unit Status Event)

Reverts the status change.