Product Inventory
- Code: INV-PIN
- Module: Inventory
- Type: Master Data
1. Overview
Product Inventory is the stock and price data of a product in one store: one row for its base package, and child rows for each conversion to another package (for example carton versus pcs), each with its own selling price. This data becomes the Store Product Inventory entity that Purchase Order, Goods Receipt, and Bill reference as the source of packages, measurement units, and prices.
Expected outcome: the stock and prices of every product in every store are visible in one list that can be searched and filtered, and all purchasing modules always use the same figures as their reference.
2. Problem
Without one place that brings together stock and prices per store, staff have to open different reports to confirm the current cost and how much stock remains. As a result:
- A product’s stock in a store is not visible without opening another report, so purchasing staff struggle to judge whether a reorder is needed.
- The current cost and selling price are not easy to confirm, especially when a product has more than one package.
- Each product’s profit has to be calculated manually from separate selling prices and costs.
3. Goals & Non-goals
3.1 Goals
- The stock, cost, and selling price of every product in every store are visible in one list, searchable by name or barcode and filterable per store.
- The profit of each product package is visible directly, without manual calculation.
- Every change to this data is recorded in the activity log.
3.2 Non-goals
- Manual stock adjustments, stock transfers between stores, and stock takes; not yet available in this module.
- Setting storage locations or warehouses, reorder points, and safety stock; these concepts do not exist yet.
- Creating, editing, or deleting Product Inventory rows directly from here; these rows are formed and changed through the package settings on Products.
4. Business Rules
Business rules are the set of provisions and constraints that apply to Product Inventory throughout the application, on every screen and action that involves it, whoever performs it. These rules are the single source of truth: if another part of this PRD appears to differ, the rules here prevail.
- BR-01 One Product Inventory row represents one combination of product, base package (conversion quantity 1), and store.
- BR-02 A Product Inventory row is formed automatically when a Product’s packages are set for a store; it is not created directly from this module.
- BR-03 The opening quantity, cost, and selling price of the base package are filled in and changed through the Product’s package settings, not from the Product Inventory list.
- BR-04 Stock increases automatically by the received quantity when a Goods Receipt is submitted. Needs confirmation: the stock reduction mechanism, for example on sales, is not yet covered in this module.
- BR-05 Each package conversion of the same product in the same store has its own selling price. Its cost is derived from the base package cost multiplied by that package’s conversion quantity.
- BR-06 Every data change is recorded along with its actor and time.
5. Flow
5.1 Main Flowchart
- Product Packages Set per Store — When a Product’s packages are set for a store, their opening quantity, cost, and selling price are filled in through the Product’s package settings (BR-02, BR-03).
- Row Formed — A Product Inventory row is formed for the base package along with each conversion to the product’s other packages in that store.
- Stock Increases — Every time a Goods Receipt receiving this product is submitted, stock increases by the received quantity (BR-04).
- 3a. Prices & Opening Quantity Updated — Changes to the Product’s package settings update this row’s cost, selling price, and opening quantity (BR-03).
This feature has no status of its own, so there is no Status Lifecycle.
6. Document Structure
This section defines the content of each Product Inventory row: which fields it has, their type, and their value rules. The provisions here apply wherever this data is formed or changed, regardless of how the field is displayed.
6.1 General
| Field | Type | Required | Default | Rules |
|---|---|---|---|---|
| Store | Ref. Store | Yes | — | Set by the system when the row is formed (BR-02) |
| Product | Ref. Product | Yes | — | Set by the system when the row is formed (BR-02) |
| Package (Base) | Ref. Product Package | Yes | — | The package with a conversion quantity of 1 (BR-01) |
| Opening Quantity | Decimal | Yes | — | Filled in through the Product’s package settings (BR-03) |
| Stock | Decimal | — | Opening Quantity | Increases automatically when a GR is submitted (BR-04) |
| Cost | Currency | Yes | — | Belongs to the base package, filled in through the Product’s package settings (BR-03) |
| Selling Price | Currency | Yes | — | Belongs to the base package, filled in through the Product’s package settings (BR-03) |
6.2 Package Conversion
| Field | Type | Required | Default | Rules |
|---|---|---|---|---|
| Package | Ref. Product Package | Yes | — | A package with a conversion quantity greater than 1 |
| Measurement Unit | Text | — | — | Follows the package |
| Conversion Quantity | Decimal | — | — | Follows the package |
| Selling Price | Currency | Yes | — | Owned by each package itself (BR-05) |
| Cost | Currency | — | — | Calculated: base package Cost × Conversion Quantity (BR-05) |
7. UI Structure
This section defines how Product Inventory is displayed: the list columns and filters. Activity Logs are available as a drawer from the list page and contain changes to all Product Inventory rows (BR-06). This section only governs display; content and value rules still follow Document Structure.
7.1 Datatable
| Column | Sortable | Sample Value | Component |
|---|---|---|---|
| Expand Toggle | — | — | Expand Toggle |
| No | — | 1 | Number |
| Code | — | SKU-0012 | Text |
| Barcode | — | 8991002123456 | Text |
| Product Name | Yes | Cooking Oil 2L | Text |
| Group | — | Groceries | Text |
| Categories | — | Oil & Seasonings | Text, Accordion if more than one |
| Stock | Yes | 24 | Number |
| Unit | — | Carton | Text |
| Cost | Yes | Rp 250,000 | Currency |
| Selling Price | Yes | Rp 275,000 | Currency |
| Profit | — | Rp 25,000 (10.0%) | Text |
| Status | — | Active | Badge |
There is no Select or Actions column — rows cannot be bulk selected and have no edit or delete actions (BR-02, BR-03).
Expanded Row
The list of conversions to the product’s other packages in the same store.
| Column | Sample Value | Component |
|---|---|---|
| Barcode | 8991002123457 | Text |
| Quantity (Conversion) | 12 | Number |
| Measurement Unit | Pcs | Text |
| Selling Price | Rp 25,000 | Currency |
| Profit | Rp 4,167 (20.0%) | Text |
7.2 Advance Filter
| Field | Control | Options Source | Default |
|---|---|---|---|
| Store | Multi Select | Stores assigned to the user | Active store |
| Barcode | Text Input | — | Empty |
| Status | Single Select | Active, Inactive | Empty |
8. User Stories
US-01 - View stock and prices per store
As purchasing staff, I want to see the stock, cost, and selling price of each product in my store, so that I know the stock situation before reordering.
| ID | Acceptance criteria |
|---|---|
| AC-01.1 | By default, the active store’s Product Inventory is shown; advanced filters: store, barcode, and status; keyword search. |
| AC-01.2 | Columns: code, barcode, product name, group, categories, stock, unit, cost, selling price, profit, and status. |
| AC-01.3 | Profit is calculated as selling price minus cost, shown along with its percentage. |
US-02 - View package conversions
As purchasing staff, I want to see a product’s other packages along with their prices, so that I know the selling price of each unit sold.
| ID | Acceptance criteria |
|---|---|
| AC-02.1 | Rows can be expanded to show the list of conversions to other packages: barcode, conversion quantity, measurement unit, selling price, and profit (BR-05). |
US-03 - Trace change history
As an owner, I want to see the Product Inventory activity log, so that I know who changed what and when.
| ID | Acceptance criteria |
|---|---|
| AC-03.1 | The activity log is available for all Product Inventory rows from the list page (BR-06). |
9. User Scenarios
| Role | Scenario |
|---|---|
| Owner | Monitors the profit of all active products in one store before deciding on a promo |
| Purchasing Staff | Checks a product’s stock via barcode search before approving a new purchase order |
10. Permissions & Actions
10.1 Permission by Action
| Action | Permission | Condition |
|---|---|---|
| View Product Inventory List | inventory:product-inventory:list:any | Needs confirmation: currently only the :any scope is available; there is no :store scope for assigned stores yet. |
11. Notifications
This feature does not trigger any notifications.
12. Dependencies
Master data
- Products — packages, measurement units, and barcodes; the source from which these rows are formed (BR-02, BR-03).
- Stores — the store where the Product Inventory applies.
Effects on other modules
- Purchase Order, Goods Receipt, and Bill reference this data as Store Product Inventory for packages, measurement units, and prices.
- Stock increases when a Goods Receipt is submitted (BR-04).