Przejdź do treści

Inventory

Inventory (stan magazynowy) to zasób reprezentujący stan ilościowy produktu w danej lokalizacji – co (product), gdzie (location), ile (quantity). Opcjonalnie period (stan na dzień / snapshot). Partia lub seria – przez referencję do Product (instancja z atrybutami batch-number, serial-number); gdy stan bez partii/serii – referencja do ProductDefinition. Wzorowany na SAP (Quant, material document), Oracle (on-hand inventory), D365 (inventory quantity).

Rozszerza DomainResource.


1. Zakres i zastosowanie

Inventory = jeden rekord stanu: product (Reference do ProductDefinition lub Product), location (Reference do Location), quantity (Quantity – ilość + jednostka). Opcjonalnie period (effective date – stan na dzień); status (z DomainResource) – np. active, reserved.

  • Stany – zapytania typu „ile szt. produktu X w lokalizacji Y” → Inventory z product + location + quantity.
  • Ruch magazynowy – po przyjęciu, wydaniu lub przesunięciu stan może być aktualizowany (nowy Inventory lub aktualizacja quantity); źródło ruchu w InventoryDocument (kanoniczny dokument ruchu).
  • Raportowanie – agregacja Inventory po location (stan magazynu) lub po product (stan produktu).

2. Zawartość (struktura)

Oprócz elementów DomainResource (id, meta, text, comment, category, status, type, contained, attribute):

Nazwa Kard. Typ Opis
identifier 0..* Identifier Identyfikatory rekordu stanu (id z systemu WMS, numer – rodzaj w type)
product 1..1 Reference(ProductDefinition lub Product) Produkt – definicja (gdy bez partii/serii) lub instancja (gdy stan z partią/serią)
location 1..1 Reference(Location) Lokalizacja (gdzie leży stan; w WMS Location z owner/managingParty = magazyn)
quantity 1..1 Quantity Ilość (value + unit, np. szt, kg); UCUM
period 0..1 Period Okres / punkt w czasie (np. start=end=2025-01-31 – stan na dzień); brak = stan bieżący

Uwaga: Gdy stan dotyczy partii lub numeru seryjnego – product wskazuje na Product (productDefinition + attribute batch-number/serial-number). Gdy stan zbiorczy „dowolna partia” – product może wskazywać na ProductDefinition; szczegóły w profilu WMS.


3. Zgodność z systemami ERP

System Odpowiednik Uwagi
SAP Quant, material document (MARD, MSKA…) Stan na bin/location; product = Material, location = Storage Bin (u nas Location)
Oracle On-hand quantity (MTL_ONHAND_QUANTITIES), Subinventory + Locator product = Item, location = Locator; quantity
D365 Inventory quantity (WHSInventStatus) Product + Location + Qty; mapowanie na Inventory

4. Odniesienia