25 · Inventory

Multi-domain stock, items/variations, ledger movements, vendors/POs, serials/kits, rules, and how POS sales consume inventory — including farm unit-of-measure work and remaining UI gaps.

Feature: inventory Unit-aware backend + partial UI Barcode → platform catalog prefill

Admin UI (/inventory/*)

PathPurpose
/inventoryStock overview
/inventory/itemsItems wizard / list (ItemWizardSimple unit work)
/inventory/history · ledgerMovement history
/inventory/stock-countsCounts
/inventory/purchase-orders · vendorsProcurement
/inventory/locationsStock locations
/inventory/serials · kitsSerials / kits workbench
/inventory/rules · settingsRules & config
/inventory/reports/*COGS, aging, sell-through, projected profit, by category

Catalog Manager (/admin/catalog/*) is related but menu/86/preparables oriented — sellable presentation vs stock truth.

API map

MountRole
/api/inventoryoverview, settings, levels, receive/adjust/transfer, serials, locations, vendors, POs, …
/api/inventory/itemsItem CRUD
/api/inventory/domainsMulti-domain (retail/food/etc.), templates, clone
/api/inventory/ledgerLedger entries, reverse, types
/api/inventory/rulesGlobal/item/bulk rules
/api/inventory-managementAlternate management overview/adjust/alerts/valuation

All gated with session + tenant + checkFeatureAccess('inventory') (except platform catalog lookup).

Ledger mindset

Movements types include RECEIVE, ADJUST, TRANSFER, BREAK_CASE, KIT_BUILD_IN/OUT, and sale consumption paths from POS/recipes.

flowchart LR
  PO[Purchase / receive]
  ADJ[Adjust / count]
  SALE[POS finalize]
  REC[Recipe consumption]
  LED[(Inventory ledger / levels)]
  PO --> LED
  ADJ --> LED
  SALE --> LED
  REC --> LED
          

POS & catalog links

  • Sale finalize can deduct stock / fire recipe consumption
  • Barcode scan → /api/platform-catalog/lookup enriches item create (Master catalog)
  • Menus/catalog assignments feed POS & storefront product lists
  • Domains + units support farm (dozen, jar) via unitOfMeasure / priceMode work

Known gaps (audit-aligned)

GapNotes
isConsumable UIBackend/KDS routing flag; little/no admin toggle
weightPerUnit / volumePerUnitDocumented schema fields; thin/no frontend
Unit field dual designNewer unitOfMeasure/priceMode vs older weight/volume fields — reconcile deliberately
Parallel inventory-management routerOverlap with /api/inventory — know which UI calls which

File anchors

ConcernPath
Routesinventory*.routes.js · inventory-management
Servicesbackend/services/inventory/* · ledger · multi-domain
UIpages/inventory/*
Catalog/admin/catalog/*
OAO09 Inventory · 29 Small farm