Products
- Code: INV-PRD
- Module: Inventory
- Type: Master Data
1. Overview
Products are the catalog of goods the tenant buys and sells: their identity (name, group, category, images) along with the list of packages used to buy and sell them. A product always has a base package as its smallest unit, and may have other packages as conversions of that base package — for example a carton containing 12 pcs. For each package, the cost, selling price, and opening quantity are set per store, and that is how each store’s Product Inventory is formed.
Expected outcome: every item is recorded once with clear packages and barcodes, so purchasing, receiving, and sales use the same product reference in every store.
2. Problem
Without a centralized product catalog, each store records goods with its own version of names and units, and the purchase unit often differs from the selling unit. As a result:
- The same item is recorded many times under different names, so stock and purchases cannot be totaled.
- Buying per carton and selling per pcs cannot be connected, so stock never matches.
- Barcodes are not recorded in the system, so finding items during transactions is slow and prone to wrong picks.
- Each store’s cost and selling price have no definite place, so margins cannot be monitored.
3. Goals & Non-goals
3.1 Goals
- Every item has one master record used by all stores and all modules.
- Purchase units and selling units are connected through package conversion, so stock stays consistent whatever the transaction unit.
- Items can be found quickly by name or barcode during a transaction.
- The cost, selling price, and opening stock of each package are set per store from the moment the product is created.
- Products that are no longer sold can be locked from new transactions without deleting their history.
3.2 Non-goals
- Product variants such as size and color; each variant is recorded as a separate product.
- Assembled products or bundles made up of several other products.
- Recording batch numbers, expiry dates, and serial numbers.
- Stock adjustments from this feature; stock increases through Goods Receipt and is viewed in Product Inventory.
- Tiered selling prices such as wholesale prices, promo prices, and per-customer prices.
- Bulk product import from a file.
4. Business Rules
Business rules are the set of provisions and constraints that apply to Products 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 The product code (SKU) is set by the system when the product is saved and cannot be changed.
- BR-02 Every product must have one product group and at least one product category.
- BR-03 Every product must have at least one thumbnail. The first thumbnail becomes the main image used in product lists and search.
- BR-04 Every product must have at least one package. The first package is the base package with a conversion quantity of 1, and that quantity cannot be changed.
- BR-05 Packages other than the base package must have a conversion quantity of at least 2, stating how many base units they contain.
- BR-06 Every package must have at least one barcode. Needs confirmation: whether barcodes must be unique across packages and across products.
- BR-07 Every package has an opening quantity, cost, and selling price for each store. The opening quantity is at least 0, while the cost and selling price must be greater than 0.
- BR-08 Saving a package along with its per-store values creates or updates that store’s Product Inventory row.
- BR-09 Packages can only be added, edited, and deleted one at a time through the package list, and are saved instantly — separately from saving the product’s general data.
- BR-10 Inactive products still appear in product search in transaction modules, but cannot be selected. Their existing transaction data can still be viewed.
- BR-11 Every change to product data and its packages is recorded along with its actor and time.
5. Flow
5.1 Main Flowchart
- General Data — Staff set the product’s status, thumbnails, name, group, categories, and description.
- Packages — The product is given at least one package. The first package is the base package with quantity 1; subsequent packages are conversions with a quantity of at least 2. Each package is given a measurement unit, barcodes, and the opening quantity, cost, and selling price for every store.
- Review — All inputs are reviewed before saving.
- Validation — Inputs are checked before the product is saved. A product that violates the rules cannot be saved, and the errors are shown in the relevant step.
- Product Saved — The product code is issued and the product can immediately be used in transaction modules according to its status.
- 5a. Edit General Data — Status, thumbnails, name, group, categories, and description can be updated together.
- 5b. Add/Edit/Delete Package — The package list is managed per package and saved instantly (BR-09).
- Product Inventory — Each package’s per-store values form a Product Inventory row. The details are explained in the Product Inventory PRD.
5.2 Status Lifecycle
| Status | Description | Next |
|---|---|---|
Activeis_active: true | The product can be selected on new transactions | Inactive, or deleted |
Inactiveis_active: false | The product appears but cannot be selected on new transactions | Active, or deleted |
6. Document Structure
This section defines the content of the Product data itself: which fields it has, their type, which are required, their initial values, and their value rules. The provisions here apply wherever the product is created or changed and are enforced on save, regardless of how the field is displayed.
6.1 General
| Field | Type | Required | Default | Rules |
|---|---|---|---|---|
| Code | Text | — | Generated on save | Set by the system, cannot be changed (BR-01) |
| Status | Enum | Yes | Not selected | Active or Inactive |
| Thumbnails | File, multiple | Yes | — | Images; upload order determines the main image (BR-03) |
| Product Name | Text | Yes | — | — |
| Group | Ref. Product Group | Yes | — | Exactly one group (BR-02) |
| Categories | Ref. Product Category, multiple | Yes | — | At least one category (BR-02) |
| Description | Text | No | — | — |
6.2 Package
| Field | Type | Required | Default | Rules |
|---|---|---|---|---|
| Conversion Quantity | Integer | Yes | 1 for the base package, 2 for subsequent packages | The base package is locked at 1; other packages at least 2 (BR-04, BR-05) |
| Measurement Unit | Ref. Measurement Unit | Yes | — | Selected from the Measurement Unit master |
| Barcodes | Text, multiple | Yes | — | At least one barcode per package (BR-06) |
6.3 Package Inventory
The following values are filled in for every store on each package, and become the initial content of that store’s Product Inventory (BR-08).
| Field | Type | Required | Default | Rules |
|---|---|---|---|---|
| Store | Ref. Store | — | All of the tenant’s stores | Set by the system; one row per store |
| Opening Quantity | Decimal | Yes | 0 | At least 0 (BR-07) |
| Cost | Currency | Yes | 0 | Greater than 0 (BR-07) |
| Selling Price | Currency | Yes | 0 | Greater than 0 (BR-07) |
7. UI Structure
This section defines how Products are displayed and operated: the list columns, filters, and form controls along with their option sources. Activity Logs are available as a drawer from the list page (all products) and from the detail page (per product). This section only governs display and interaction; content and value rules still follow Document Structure.
7.1 Datatable
| Column | Sortable | Sample Value | Component |
|---|---|---|---|
| Select | — | — | Checkbox, Expand Toggle |
| No | — | 1 | Number |
| Code | Yes | SKU-0012 | Link |
| Product Name | Yes | Cooking Oil 2L | Thumbnail, Text |
| Group | — | Groceries | Text |
| Categories | — | Oil & Seasonings | Text, Accordion if more than one |
| Status | — | Active | Badge |
| Actions | — | View · Edit · Delete | Action Menu |
Expanded Row
The product’s packages along with their per-store values.
| Column | Sample Value | Component |
|---|---|---|
| Package | Package 1 | Text |
| Conversion Quantity | 12 | Number |
| Measurement Unit | Carton (CTN) | Text |
| Barcodes | 8991002123456 | Text |
| Store | [CBI] Cianjur Store | Text |
| Stock | 24 | Number |
| Cost | Rp 250,000 | Currency |
| Selling Price | Rp 275,000 | Currency |
| Profit | Rp 25,000 (10.0%) | Text |
7.2 Advance Filter
| Field | Control | Options Source | Default |
|---|---|---|---|
| Status | Single Select | Active, Inactive | Empty |
7.3 Form & Details
Create — A three-step wizard: General, Packages, then Review. The Next button validates the current step before moving on, and the Review step shows a summary of all inputs. Actions: Previous, Next, Save.
Edit — Two tabs, General and Packages. The General tab is saved as a whole; packages in the Packages tab are added, edited, and deleted one at a time through a dialog and saved immediately (BR-09).
Detail — Two read-only tabs, General and Packages. Actions: Edit Data and Activity Logs.
General
| Field | Control | Options Source | Behavior |
|---|---|---|---|
| Status | Single Select | Active or Inactive | The currently selected option can be deselected, leaving the status empty |
| Thumbnails | File Uploader, multiple | — | Only accepts image files; upload order determines the main image |
| Product Name | Text Input | — | — |
| Group | Single Select | Product Group master, searchable | — |
| Categories | Multi Select | Product Category master, searchable | — |
| Description | Textarea | — | — |
Packages — List
| Column | Sample Value | Component |
|---|---|---|
| Package | Package 1 | Text |
| Conversion Quantity | 12 | Number |
| Measurement Unit | Carton (CTN) | Text |
| Barcodes | 8991002123456 | Text |
| Actions | Edit · Delete | Action Menu |
Packages — Form
| Field | Control | Options Source | Behavior |
|---|---|---|---|
| Conversion Quantity | Number Input | — | Disabled with value 1 on the base package; at least 2 on other packages |
| Measurement Unit | Single Select | Measurement Unit master, searchable, shown as the name with its symbol | — |
| Barcodes | Text Input in an add dialog, shown as a list | — | Barcodes are added one at a time and can be removed per barcode |
Packages — Price per Store
One row per store, shown inside the package form.
| Field | Control | Options Source | Behavior |
|---|---|---|---|
| Store | Read-only | All of the tenant’s stores | — |
| Opening Quantity | Number Input | — | — |
| Cost | Currency Input | — | Changed → Profit is recalculated |
| Selling Price | Currency Input | — | Changed → Profit is recalculated |
| Profit | Read-only | — | Selling Price minus Cost, shown with its percentage of the cost |
8. User Stories
US-01 - Create a product
As inventory staff, I want to register a product along with its packages and per-store prices, so that the product can be used in transactions right away.
| ID | Acceptance criteria |
|---|---|
| AC-01.1 | When a user with the create permission opens Add New, the General → Packages → Review wizard appears with all fields empty. |
| AC-01.2 | Status, thumbnails, product name, group, and categories are required; description is optional (BR-02, BR-03). |
| AC-01.3 | When Next is clicked and the required fields in that step are not valid yet, the user cannot move to the next step and errors appear on the related fields. |
| AC-01.4 | The Packages step refuses to continue if there is no package yet (BR-04). |
| AC-01.5 | The first package opens with quantity 1 and the quantity field disabled; subsequent packages open with quantity 2 and a minimum of 2 (BR-04, BR-05). |
| AC-01.6 | The package form shows all of the tenant’s stores, each with opening quantity, cost, and selling price, along with an automatically calculated profit (BR-07). |
| AC-01.7 | A package without a barcode cannot be saved (BR-06). |
| AC-01.8 | When Save succeeds, the product code is issued, a success toast appears, and the user is redirected to the product list (BR-01). |
| AC-01.9 | When saving is rejected, error messages appear in the Review step and on the related fields. |
| AC-01.10 | When the user leaves the wizard with unsaved input, an unsaved changes confirmation appears. |
| AC-01.11 | The tenant has no stores at all — the per-store price table shows no rows. Needs confirmation: whether a product may be saved without per-store price values. |
US-02 - Manage product packages
As inventory staff, I want to add, edit, and delete product packages, so that purchase and selling units always match reality.
| ID | Acceptance criteria |
|---|---|
| AC-02.1 | The Packages tab shows each package along with its conversion quantity, measurement unit, barcodes, and per-store values. |
| AC-02.2 | Add, edit, and delete package are available in edit mode according to permissions, and every action is saved immediately (BR-09). |
| AC-02.3 | When the base package is edited, the quantity field stays disabled at 1 (BR-04). |
| AC-02.4 | The save button in the package dialog is disabled until there is a change. |
| AC-02.5 | Deleting the base package — not prevented on screen. Needs confirmation: the deletion must be rejected while the product still has conversion packages, so that BR-04 holds. |
| AC-02.6 | Changing a package’s cost or selling price updates the related store’s Product Inventory (BR-08). |
US-03 - Edit product data
As inventory staff, I want to change a product’s general data, so that the catalog stays accurate.
| ID | Acceptance criteria |
|---|---|
| AC-03.1 | The Edit Data button only appears for users with the update permission. |
| AC-03.2 | Validation of the General tab is the same as the General step on creation (AC-01.2). |
| AC-03.3 | The open tab is kept in the URL when switching between detail and edit. |
| AC-03.4 | Editing general data does not change the package list (BR-09). |
US-04 - Product list and search
As an owner, I want to view and filter products, so that I can quickly find a specific item along with its prices.
| ID | Acceptance criteria |
|---|---|
| AC-04.1 | Columns: code, product name with the main image, group, categories, and status. |
| AC-04.2 | Keyword search, status filter, pagination, and default sort by name A–Z. Sortable columns: code and product name. |
| AC-04.3 | More than one category is shown as the number of categories, which can be expanded to see the list. |
| AC-04.4 | Rows can be expanded to see packages along with each store’s stock and prices without opening the detail. |
| AC-04.5 | Row actions: View, Edit, Delete according to permissions. |
US-05 - Delete a product
As inventory staff, I want to delete a product created by mistake, so that the catalog stays clean.
| ID | Acceptance criteria |
|---|---|
| AC-05.1 | Single and bulk delete require confirmation and the delete permission. |
| AC-05.2 | If the deletion is rejected, the error message appears as a toast. |
| AC-05.3 | Deleting a product already used in transactions — Needs confirmation: whether it is rejected, or the product should simply be deactivated (BR-10). |
US-06 - Activity history
As an owner, I want to see the product activity log, so that data and price changes can be traced.
| ID | Acceptance criteria |
|---|---|
| AC-06.1 | The activity log is available for all products (in the list) and per product (in the detail) (BR-11). |
9. User Scenarios
| Role | Scenario |
|---|---|
| Inventory Staff | Registers a new product from a supplier: fills in the general data, adds a pcs package as the base package and a carton of 12 as a conversion, then sets each store’s cost and selling price |
| Inventory Staff | The supplier changes the carton contents from 12 to 24; edits that product’s conversion package and then checks the result in Product Inventory |
| Purchasing Staff | Searches for a product by barcode while preparing a Purchase Order, and picks the carton package as the order unit |
| Owner | Deactivates a product that is no longer sold so it does not appear on new transactions, without deleting its purchase history |
10. Permissions & Actions
10.1 Permission by Action
| Action | Permission | Condition |
|---|---|---|
| View Product List | inventory:product:list:any | — |
| View Activity Logs | inventory:product:list:any | — |
| View Product Detail | inventory:product:view:any | — |
| Create Product | inventory:product:create:any | — |
| Edit Product (General Data) | inventory:product:update:any | — |
| Delete Product | inventory:product:delete:any | — |
| Add Package | inventory:product:create:any | From the edit product page |
| Edit Package | inventory:product:update:any | From the edit product page |
| Delete Package | inventory:product:delete:any | From the edit product page |
10.2 Action by Status
| Action | Active | Inactive |
|---|---|---|
| View Product Detail | ✓ | ✓ |
| Edit Product (General Data) | ✓ | ✓ |
| Manage Packages | ✓ | ✓ |
| Delete Product | ✓ | ✓ |
| Selected on New Transactions | ✓ | — |
11. Notifications
This feature does not trigger any notifications.
12. Dependencies
Related PRDs
- Product Inventory — the per-store stock and price rows formed from product packages (BR-08).
- Purchase Order and Goods Receipt — select products along with their packages through name or barcode search (BR-10).
Master data
- Product Groups — product groups.
- Product Categories — product categories.
- Measurement Units — the measurement unit of each package.
- Stores — the list of stores where each package’s prices and opening quantity are set.
Effects on other modules
- Saving a package creates or updates a Product Inventory row in each store (BR-08).
- Products along with their packages become options in Purchase Order, Goods Receipt, and Bill.
- Every change is recorded in the activity log (BR-11).