Inventory Tracking & Management

The Inventory Module provides a robust framework for tracking the lifecycle of parts, consumables, and high-value equipment. From the moment stock is purchased to its final installation at a customer site, every movement is recorded, ensuring warehouse accuracy and operational accountability.

Terminology Mapping

To understand the system, it is important to distinguish between the product definition and the physical units.

Term Description Analogy
Inventory The "Master Definition" of a product. Tracks total quantity. A "Bucket" of items.
Inventory Item A specific, unique unit with a serial number. A specific item taken out of the bucket.
Task Inventory The record of which items were used for a specific job. The "Packing List" for a task.
Transaction A record of stock moving in or out. A "Bank Statement" entry.

Core Concepts: Bulk vs. Serialized

The system handles two distinct tracking workflows based on the value and nature of the items.

📦

Bulk Inventory (Consumables)

Used for items where you only care about the total quantity available in the warehouse. You don't track each unit individually.

  • Examples: Cat6 cables, screws, cleaning detergent, generic spare parts.
  • Workflow: When used, the system simply subtracts the quantity from the total.
🏷️

Serialized Inventory (Assets)

Used for high-value equipment where every single unit is unique and has its own Serial Number (SN). This is critical for warranty and maintenance.

  • Examples: IoT Sensors (EM400), Routers, Vehicles, Laptops.
  • Workflow: Each unit has its own lifecycle status (e.g., AVAILABLEINSTALLED).

Task Operations: Tracking Usage

Technicians record parts usage during their daily operations. The system automates the stock deduction upon task completion.

1. Recording Usage Technician adds items to the task. They specify quantity for bulk items or select specific Serial Numbers for assets.
2. Task Completion The task is marked as Completed (either manually in the app or automatically via IoT triggers).
3. Automated Stock Update The system deducts bulk quantities, updates Serial Number statuses to 'INSTALLED', and logs the audit trail.

Stock Management: Replenishment

When the company purchases new stock, the update process ensures the audit trail remains intact.

Item Type Replenishment Action Resulting Status
Bulk Increase the quantity_available count. Total stock increases immediately.
Serialized Register new individual Serial Numbers. New items appear as AVAILABLE.

The Audit Trail: Inventory Transactions

Every single movement of stock is recorded in the p_inventory_transaction table. This provides a transparent history of "Who moved What, When, and Why".

Transaction Type Description Direction
PURCHASE New stock arriving from a supplier. Stock-In (+)
TASK_USAGE Items consumed or installed during a task. Stock-Out (-)
RETURN Items returned to the warehouse (e.g., task cancelled). Stock-In (+)
ADJUSTMENT Manual corrections after a physical stock take. Variable (+/-)

Technical Summary

For developers maintaining the system, the following components are involved: