This app uses the following key collections. Each has a purpose and key fields to understand.
- Purpose: Define measurement units for quantities.
- Examples: EA (each), BOX (box of X each), KG (kilogram), L (liter)
- Fields:
- name, code (EA/BOX/KG), isBase (true for the smallest unit), conversionToBase (e.g., 1 BOX = 10 EA → conversionToBase=10)
- unitType (count, weight, volume, length)
- Why: Standardizes how quantities are stored. Items can have a default UOM; PO/GRN can specify UOM on lines.
- Purpose: Physical storage sites (e.g., Main DC, Store #1).
- Fields: name, code, address
- Why: Stock is always tied to a warehouse. Optional Locations are bins within a warehouse.
- Purpose: Optional bin/shelf/bin code within a warehouse.
- Fields: warehouse (relation), code, description
- Why: More granular stock placement.
- Purpose: Store tax configurations.
- Fields: name, rate (0-1), region, notes
- Why: Default tax for items/lines.
- Purpose: Supplier master.
- Fields: name, code (auto uppercased), contacts, address, taxId
- Why: Used by Purchase Orders.
- Purpose: Item master (what you stock/sell: product/part/service).
- Fields: name, sku (auto), itemType, description, brand, category, tags, uom (default), media, active
- Why: Purchase Orders and Goods Receipts refer to Items.
- Purpose: Place orders with vendors.
- Fields:
- poNumber (unique), vendor, orderDate, expectedDate, status (open/partial/closed/cancelled)
- lines[]: item, description, quantity, uom, unitPrice, taxRate
- Why: Source for goods receipts. Future: auto-calc received/remaining.
- Purpose: Record inbound stock against a PO.
- Fields:
- grnNumber (unique), po, warehouse, receivedDate
- lines[]: item, location, quantity, uom, batch, serial
- Behavior:
- After create, we write Stock Ledger entries with direction=in.
- Purpose: Append-only movements of stock.
- Fields: date, item, warehouse, location, quantity, uom, direction (in/out), source (grn/shipment/etc), sourceRef, batch, serial
- Why: Single source of truth for on-hand calculation and audit.