Skip to content

Inventory Phase A In-progress

Inventory is where merchants track physical stock - how much they have, where it lives, and every movement in or out. Owners receive goods via purchase orders, run warehouse operations through tickets, and (for F&B) auto-deduct ingredients via recipes. Every change is recorded in an immutable audit trail.

Status: In-progress · Owner: Phat · Phase: 1-3 · Last reviewed: 2026-05-31

ChainLink
RoadmapPhase 1
EpicBANA-1323 - Stock control for F&B & Retail
PRDOpening Balance Import · PRD-IOP-001 Stock operations F&B & Retail · PRD-PRO-001 Production orders & BOM explosion · PRD-LSE-001 Lot / serial & expiry identifiers (catalogue)
URDURD
Decisions (ADR)ADR-0001 Polymorphic item · ADR-0005 UoM two-layer (all)
Dev docs@nx/inventory
Runbook- (not yet authored)
Delivery logTraceability matrix

1. Identity

PropertyValue
Module IDCORE-06
TierCore
StatusIn-progress
PhaseP1 (Simple Stock) · P2 (Multi-location) · P3 (BOM + Advanced)
PriorityHIGH
Primary usersOwner / Manager / Cashier (read availability)

2. Purpose & Scope

IncludedExcluded
Stock levels per item per location (on-hand, reserved, available)Multi-currency stock valuation
Inventory locations (warehouses) with hierarchy + default-per-merchantMulti-level BOM / sub-assemblies
Immutable audit trail of every stock movementRecipe yield / scrap percentage
Vendor catalog + purchase orders with goods receiptFull barcode-scanning integration
Inventory tickets (transfer, adjust, count, returns, scrap)Stock transfer between merchants
Materials catalog + recipes (BOM) + runtime explosionInventory valuation reports (AVCO/FIFO/LIFO)
Production orders + unit-of-measure catalogLot / serial / expiry enforcement

3. Capabilities

CapabilityWhat the user can do
Stock trackingSee on-hand, reserved, and available quantity per item per location.
Auto-deduct on saleStock reduces automatically when a payment succeeds.
Manual adjustmentsCorrect stock levels with typed, reason-coded movements.
Default locationA default warehouse is created automatically for each merchant.
Vendor managementMaintain a supplier catalog per merchant.
Purchase ordersCreate POs, receive goods, and update stock through a full lifecycle.
Immutable audit trailEvery movement is logged with before/after quantities; never edited.
Multiple warehousesCreate and manage several inventory locations per merchant.
Inventory ticketsRun transfer, adjustment, cycle count, returns, and scrap operations.
Material catalog (BOM)Track raw ingredients separately from sellable products.
Material recipes (BOM)Attach versioned recipes to product variants.
BOM runtime explosionAuto-deduct ingredients when a kitchen ticket item changes status.
Production ordersTrack manufacturing with planned / actual / scrap quantities.
Unit-of-measure conversionFull 3-level unit conversion beyond base ratios.
Low-stock alertsNotify when stock falls below a threshold (infra ready, UI pending).

4. Module Dependencies

Depends onWhy
ProductStock is tracked per product variant.
CommerceLocations and vendors belong to a merchant.
PaymentA successful payment triggers stock deduction.
Used byWhy
OrdersStock is deducted on sale.
FinancePO goods receipt records a finance expense.
ReportsInventory analytics and stock reporting.

5. Backend Packages

Implementation detail lives in the developer docs - this section only maps the module to the services that power it.

PackageRoleDeveloper docs
@nx/inventoryOwns stock, locations, tracking, vendors, POs, materials/BOM, tickets; consumes sale/kitchen events.inventory

Engineering Mapping (Feature ⇄ Package)

The horizontal axis of the Feature Spine - each business feature (<AREA> in the URD) maps to its engineering home. Reciprocal: the package docs link back here.

FeatureDev packageStatus
LOC Inventory Locations@nx/inventoryBuilt
ITM Inventory Items@nx/inventoryBuilt
STK Stock Levels@nx/inventoryBuilt
TRK Movement Audit Trail@nx/inventoryBuilt
VEN Vendors@nx/inventoryBuilt
PO Purchase Orders@nx/inventoryBuilt
POI Purchase Order Items@nx/inventoryBuilt
TKT Inventory Tickets@nx/inventoryBuilt
IOP Stock operations - F&B & Retail@nx/inventoryPlanned
LSE Lot / Serial & Expiry Identifiers@nx/inventoryBuilt
MAT Materials@nx/inventoryBuilt
REC Recipes / BOM@nx/inventoryIn-progress
PRO Production Orders & BOM Explosion@nx/inventoryIn-progress

6. Key User Flows

Receive Goods (Purchase Order)

Sale Deduction

BOM Explosion (F&B Kitchen)

7. Roles & Permissions

RoleCanCannot
Owner / ManagerCreate locations, vendors, POs, tickets, materials, recipes; receive goods; adjust stock.Edit or delete audit-trail entries.
CashierView product availability at the point of sale.Mutate stock, POs, or tickets directly.
SystemAuto-deduct on sale; explode recipes on kitchen events; auto-create default location.-

8. Status & Roadmap

PhaseCapabilities
P1Stock tracking, auto-deduct on sale, manual adjustments, default location, vendors, purchase orders, immutable audit trail.
P2Multiple warehouses, location hierarchy, inventory tickets (9 types), inventory rules, landed costs.
P3Material catalog, recipes (BOM), BOM runtime explosion, production orders, UOM conversion, lot/serial tracking.

Materials, recipes, and BOM explosion are shipped today but classified P3 because they target F&B verticals; production orders and full UOM conversion remain planned.

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.