Logistics Reference Data (LOG)
The log submodule of com owns three orthogonal logistics building blocks: units of measure, terms of delivery, and number series. Other modules look up Uom rows for line items, attach TermsOfDelivery to sales/purchase agreements, and call the number-series writer to allocate the next free document code (purchase orders, invoices, …). It depends on sys.loc for the unit-system reference type.
Concepts
Unit of Measure (UoM)A registered unit code used on quantities throughout the ERP. Each UoM is classified as an SI quantity, a piece count, or a dimensionless figure, and resolves to one of the parsing rules in
sys.uom.Terms of DeliveryA delivery-policy code (such as EXW, FOB, CIF) tied to a transport mode and a delivery-location classification. The
exWorksflag highlights agreements where the buyer collects from the supplier’s premises.Number SeriesA configurable counter used to allocate the next free business code for a document type. Each series has a prefix, a fixed numeric length (zero-padded), and a
firstFreeNumberthat increments on every allocation.Default UoM CodesA set of constant unit codes (
kg,lb,mm,cm,m,in,m2,sqf,pcs) other modules use as their default unit when no entity-specific value is configured.
Entities
Unit of Measure (Uom)
A registered unit. The interpretation rules for the unit code (prefix, exponent, conversion factor) live in sys.uom; this entity is the lookup row referenced from sales/purchase/inventory lines.
| Field | Description |
|---|---|
| Business key (a |
| Classification of the unit — see UoM Types below. |
| Human-readable name. |
UoM Types (UomType)
| Code | Name | Meaning |
|---|---|---|
| SI Quantity | A unit that maps to one of the SI base units (mass, length, …). |
| Pieces | Counted units ( |
| Dimensionless | Unitless quantities (e.g. ratios, percentages). |
Terms of Delivery (TermsOfDelivery)
A named delivery-policy code (the Incoterms-style classification used on agreements).
| Field | Description |
|---|---|
| Business key (up to 3 characters). |
| Human-readable name. |
| Optional transport mode — see Transport Modes below. |
| Where the delivery responsibility transfers — see Delivery Locations below. |
| Whether the terms are ex-works (buyer collects). Default |
Transport Modes (TransportMode)
| Code | Name | Notes |
|---|---|---|
| Air | |
| Rail | |
| Road | |
| Sea |
Delivery Locations (TermsOfDeliveryLocation)
| Code | Name | Used by |
|---|---|---|
| Place of delivery | EXW, FCA |
| Place of destination | CPT, CIP, DPU, DAP, DDP |
| Port of shipment | FAS, FOB |
| Port of destination | CFR, CIF |
Number Series (NumberSeries)
A configurable counter used to allocate the next free business code for a document type.
| Field | Description |
|---|---|
| Business key (up to 6 characters). |
| Human-readable name. |
| Static prefix prepended to every allocated code. |
| Fixed numeric length; the allocated number is zero-padded to this length. |
| The next value to allocate. Default |
Functionality
Mandatory unit lookup
COM_LOG_QueryApi.getUom looks up a Uom by its code and raises a business exception when the code does not exist. Used wherever a missing unit must fail loudly. findUomByCode is the optional variant.
Mandatory terms-of-delivery lookup
TermsOfDeliveryReaderService exposes both an optional and a mandatory lookup of TermsOfDelivery by code. The mandatory variant raises a business exception when the code does not exist. A second helper, findOneByExWorks, returns a single TermsOfDelivery row matching a given ex-works flag — used by callers that want a representative ex-works terms code without hard-coding one.
Number-series allocation
NumberSeriesWriterService.createFirstFreeCode returns the next free business code for a number series. The series row is refreshed from the database first to avoid using a stale firstFreeNumber, the next number is composed (prefix + zero-padded number), firstFreeNumber is incremented, and the change is flushed. Callers receive the new code as a string.
Default UoM codes
COM_LOG_Constant exposes the canonical unit codes used as defaults across the system:
| Constant | Code | Usage |
|---|---|---|
|
| Default mass unit (metric). |
|
| Default mass unit (imperial). |
|
| Length in millimetres. |
|
| Length in centimetres. |
|
| Length in metres. |
|
| Length in inches. |
|
| Surface in square metres. |
|
| Surface in square feet. |
|
| Pieces. |
Public API
COM_LOG_QueryApi
Read-side facade.
| Method | Description |
|---|---|
| Mandatory UoM lookup; raises a business exception if not found. |
| Optional UoM lookup; |
| Optional terms-of-delivery lookup. |
| Mandatory terms-of-delivery lookup. |
| A single terms-of-delivery row matching the ex-works flag, or |
COM_LOG_CommandApi
Write-side facade.
| Method | Description |
|---|---|
| Allocates the next free code on the series and increments |
ViewModel actions
The submodule defines view models for Uom, TermsOfDelivery, and NumberSeries but does not declare any custom UI actions.