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.,
AVAILABLE→INSTALLED).
Task Operations: Tracking Usage
Technicians record parts usage during their daily operations. The system automates the stock deduction upon task completion.
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:
- Business Logic:
InventoryDataHandler.javaencapsulates all stock calculations and logging. - Integration Hooks:
TaskDataServlet.java(Manual) andPaasBusinessDataHandler.java(Programmatic) trigger the updates. - API Layer: Metadata files (
task_inventory.json,inventory_item_status.json) define the REST endpoints. - Database: Tables
p_task_inventory(link),p_inventory_item_status(lookup), andp_inventory_transaction(audit).