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.