1. Overview
Inventory Tracker — PaxmaHub is a Level 3 inventory-control application. The supplied version manages products, suppliers, stock movements, inventory status, inventory value, reporting, analytics, quick actions, and local backup/restore.
inventory-tracker.html. It does not assume cloud sync, multi-user access, barcode hardware, marketplace integrations, accounting integrations, AI forecasting, or other external services unless the application explicitly provides them.Main capabilities
- Product creation and editing.
- Unique SKU / Item ID validation.
- Category and supplier assignment.
- Cost and selling price tracking.
- Opening stock and reorder-level management.
- Stock In, Stock Out and Adjustment transactions.
- Automatic current-stock calculation from opening stock plus movements.
- Low Stock and Out of Stock detection.
- Inventory cost value and retail value.
- Movement history with search and type filtering.
- Quick stock actions for faster data entry.
- Slow-moving inventory and inventory-aging analysis.
- Restock list with suggested quantity.
- Products CSV, movements CSV and restock CSV exports.
- JSON backup and restore using browser-local data.
3. First-Time Setup
The application seeds demo suppliers, products and movements when no stored dataset exists.
Use Products → Add Product and enter the actual product information.
Add supplier records before assigning them to products if you want supplier tracking.
Opening Stock is the initial quantity from which current stock is calculated.
The reorder level controls Low Stock detection and the Restock List.
Use Stock In, Stock Out and Adjustments rather than manually changing current stock.
Once the real dataset is entered, download a JSON backup before making large changes.
4. Product Management
The Products page is the product master list. Current stock is calculated rather than stored as a manually editable field.
Product fields
| Field | Required? | Purpose |
|---|---|---|
| Product Name | Yes | Name used throughout the tracker. |
| SKU / Item ID | Yes | Unique identifier for the product. |
| Category | Yes | Groups products and powers the category filter. |
| Supplier | No | Links the product to a supplier. |
| Cost Price | Yes | Unit cost used for inventory cost valuation. |
| Selling Price | Yes | Unit selling price used for retail value and potential margin. |
| Opening Stock | Yes on creation | Initial stock quantity. Readonly when editing an existing product. |
| Minimum / Reorder Level | Yes | Threshold used for Low Stock and restocking. |
| Notes | No | Additional product information. |
Product list controls
- Search: Searches product name, SKU or category.
- Stock Status: All Stock Status, In Stock, Low Stock or Out of Stock.
- Category: Filters by categories currently represented in products.
- Sort: Name A–Z, Stock High–Low, Value High–Low or Low Stock First.
Product table
The table displays Product, SKU, Category, Supplier, Stock, Cost, Selling Price, Inventory Value, Status and Actions.
Inventory value
For a product, the displayed inventory value is:
Current Stock × Cost Price
Deleting products
A product cannot be deleted if it has stock movement history. This prevents the tracker from breaking historical movement relationships.
5. Supplier Management
The Suppliers page stores basic supplier records and shows how many products are assigned to each supplier.
Supplier fields
| Field | Purpose |
|---|---|
| Supplier Name | Required supplier name. |
| Contact | Optional phone/contact information. |
| Optional email address. | |
| Notes | Optional supplier notes. |
Supplier rules
- Supplier search checks name, contact and email.
- A supplier can be edited after creation.
- A supplier cannot be deleted while a product is assigned to it.
- After products are reassigned or no longer use the supplier, deletion becomes possible.
6. Stock & Inventory Logic
The central design principle is that current stock is calculated from Opening Stock + saved movements.
Core formula
For each product:
Current Stock = Opening Stock + Stock In − Stock Out ± Adjustments
The application processes movements chronologically by date when calculating stock.
Stock status
| Status | Condition |
|---|---|
| Out of Stock | Current stock is 0 or below. |
| Low Stock | Current stock is above 0 but at or below the reorder level. |
| In Stock | Current stock is above the reorder level. |
7. Stock In
Stock In is used when inventory enters your stock, such as a purchase or supplier receipt.
Stock In fields
- Product
- Quantity
- Date
- Unit Cost
- Reference
- Reason
- Notes
What happens when Stock In is saved?
- The product is selected.
- The quantity is added to the product's stock.
- The movement is stored as type
in. - The movement records before and after stock levels.
- Movement history is recalculated and saved.
- Dashboard, Products, Reports and Analytics update.
A common Reason value is Purchase.
8. Stock Out
Stock Out records inventory leaving stock, such as a sale, usage, shipment or removal.
Stock Out rule
The application prevents a Stock Out quantity from exceeding the available stock. It also prevents stock from becoming negative.
Example
If current stock is 20 units and you record a Stock Out of 6 units:
- Before = 20
- Stock Out = 6
- After = 14
A common Reason value is Sale.
9. Stock Adjustments
Adjustments are designed for inventory corrections that are not ordinary purchases or sales.
Typical use cases
- Damaged stock.
- Lost stock.
- Found stock.
- Physical-count corrections.
- Other inventory corrections.
Adjustment direction
The detailed movement form allows a positive quantity to add stock or a negative quantity to reduce stock. The application also looks at certain reason words such as decrease, damage and lost to interpret the adjustment as a reduction.
Adjustment example
If stock is 50 and 3 damaged units are removed:
50 + (-3) = 47
10. Movement History
Movement History is the audit trail of stock changes.
Displayed information
| Column | Meaning |
|---|---|
| Date | Movement date. |
| Product | Product name and SKU. |
| Type | Stock In, Stock Out or Adjustment. |
| Qty | Recorded movement quantity. |
| Before | Stock immediately before the movement according to recalculated history. |
| After | Stock after applying the movement. |
| Unit Cost | Cost associated with the movement record. |
| Reference | PO, order or other reference. |
| Reason | Why the movement occurred. |
| Actions | Edit or delete the movement. |
Search and filtering
The Movement History search checks product name, SKU, reference, reason and notes. The type filter can show All Types, Stock In, Stock Out or Adjustment.
Editing or deleting movements
When a movement is edited or deleted, the tracker recalculates movement snapshots for the affected product and then updates the inventory. This means historical changes can affect the calculated current stock.
11. Quick Actions
The Quick Actions page provides simplified forms for frequent stock operations.
| Quick Action | Purpose |
|---|---|
| Quick Stock In | Add inventory quickly without opening the full movement modal. |
| Quick Stock Out | Remove inventory quickly while checking available stock. |
| Quick Adjustment | Apply a quick adjustment using a simplified quantity/reference form. |
Quick form fields
- Product
- Quantity
- Date
- Reference / Reason
12. Dashboard
The Dashboard provides the fastest view of overall inventory health.
| KPI | Calculation / Meaning |
|---|---|
| Total Products | Number of products in the product master list. |
| Units in Stock | Sum of current stock across all products. |
| Inventory Cost Value | Current stock × cost price across products. |
| Retail Value | Current stock × selling price across products. |
Inventory Overview
The overview also shows Products, Total Units, recorded Stock In quantity, recorded Stock Out quantity, Potential Gross Margin Value and Healthy Stock Ratio.
Potential gross margin value
Retail Value − Inventory Cost Value
This is a value-based potential margin on the current inventory at the listed selling prices; it is not a realized sales-profit report.
Healthy stock ratio
The dashboard treats products that are neither Low Stock nor Out of Stock as healthy and displays the resulting product ratio.
Low / Out of Stock
The dashboard lists products at or below their reorder level, including Out of Stock products.
Recent Stock Movements
The dashboard displays the latest six movements sorted by date.
13. Inventory Analytics
The Analytics section adds decision-support information beyond the basic product list.
Analytics KPIs
| Metric | Meaning |
|---|---|
| Average Cost Basis | Average of each product's calculated average inbound cost basis across products. |
| Stock Out Units | Total recorded Stock Out quantity. |
| Potential Margin | Current retail value minus current cost value. |
| Restock Items | Products with positive stock at or below their reorder level. |
Slow-Moving Inventory
The selector offers 30+, 60+ and 90+ day thresholds. Products with stock remaining and whose latest recorded movement is at least the selected number of days old are included.
The table shows Product, Stock, Last Movement, Days and Inventory Value.
Inventory Aging
Products are grouped into:
- Fresh: latest movement less than 30 days ago.
- 30–89 days: latest movement is 30 through 89 days old.
- 90+ days: latest movement is 90 days or more old.
14. Reports & CSV Exports
The Reports page provides a compact inventory summary and export controls.
Report KPIs
- Products
- Cost Value
- Retail Value
- Low / Out count
Inventory Summary table
Each product row includes Product, SKU, Category, Stock, Cost Value, Retail Value, Potential Margin and Status.
Potential margin
For each product:
Potential Margin = Retail Value − Cost Value
Products CSV
The Products CSV contains Product, SKU, Category, Supplier, Stock, Cost, Selling Price, Cost Value, Retail Value and Status.
Movements CSV
The Movements CSV contains Date, Product, SKU, Type, Quantity, Before, After, Unit Cost, Reference, Reason and Notes.
The Reports page includes a browser print action. The exact printed output depends on the browser's print behavior and the application's current page.
15. Restock Logic
The Restock List is generated from the product reorder levels.
Which products appear?
A product appears when:
Current Stock > 0 AND Current Stock ≤ Reorder Level
Out-of-stock products are therefore handled by the application's low/out-of-stock areas, while the Restock List itself specifically filters for positive stock at or below the reorder threshold.
Suggested quantity
The application calculates:
Suggested Qty = max(Reorder Level × 2 − Current Stock, 1)
Example
If the reorder level is 10 and current stock is 4:
10 × 2 − 4 = 16 suggested units
Restock CSV
The export includes Product, SKU, Current Stock, Reorder Level, Suggested Qty and Supplier.
16. Backup & Restore
JSON Backup
Backup downloads the complete current state as a JSON file named:
inventory-tracker-backup.json
The backup contains the product list, supplier list and movement history.
Restore
Reset to Demo Data
The Backup & Restore page contains Reset to Demo Data. It requires confirmation and restores the application's built-in demo dataset. This action cannot be undone from the application itself.
17. Data & Storage
The tracker is a browser-local application. Its primary storage key is:
inventoryTrackerLevel3Basic_v1
Stored data groups
- products
- suppliers
- movements
Normalization
On load, the application ensures these collections are arrays and fills missing basic product, supplier and movement values with safe defaults.
LocalStorage model
The application uses browser localStorage rather than a remote database. The Backup & Restore page explicitly states that data is stored locally in the browser.
18. Recommended Complete Workflow
Add every active product with a unique SKU, category, cost, selling price and opening stock.
Add suppliers and assign them to the relevant products.
Choose the minimum level at which you want the product to become Low Stock.
Use Stock In whenever inventory is received.
Use Stock Out whenever inventory is sold, used or removed.
Do not disguise damaged, lost or count-correction stock as a normal sale.
Check units, cost value, retail value and low/out-of-stock products.
Check slow-moving stock, aging and the Restock List.
Use Products CSV, Movements CSV or Restock CSV for external analysis.
Create a JSON backup after major inventory updates.
Recommended daily routine
- Record all stock receipts.
- Record all stock removals.
- Record physical-count corrections as adjustments.
- Check Low / Out of Stock on the Dashboard.
- Review the Restock List.
- Review slow-moving or aging stock periodically.
- Back up the dataset regularly.
19. Data Integrity & Important Implementation Rules
| Protection / Rule | Behavior |
|---|---|
| Unique SKU | The product form rejects a SKU that already belongs to another product. |
| Product deletion protection | A product with movement history cannot be deleted. |
| Supplier deletion protection | A supplier assigned to any product cannot be deleted. |
| Stock cannot go negative | Stock Out and movement calculations reject negative resulting stock. |
| Stock Out availability | Stock Out quantity cannot exceed available stock. |
| Opening stock protection | Opening Stock becomes readonly when editing an existing product. |
| Movement recalculation | Editing/deleting a movement recalculates snapshots for the affected product. |
| HTML escaping | User-entered values are escaped in the major generated table/form outputs. |
| Local save | Changes are written to LocalStorage after operations. |
| Backup validation | Restore requires products, suppliers and movements arrays and normalizes the data. |
Important distinction: current stock vs movement record
The product record stores openingStock, not a manually maintained current-stock field. Current stock is derived by processing movements. This is why movement history is fundamental to the application's calculations.
Important distinction: cost price vs movement unit cost
Product Cost Price is used for current inventory valuation. Movement records also store a Unit Cost. The analytics function calculates an average inbound cost basis from Stock In movements, but the main inventory cost-value calculation uses each product's current Cost Price.
20. FAQ & Troubleshooting
Why is my current stock different from the quantity I expected?
Current stock is calculated from Opening Stock plus all movements. Review Movement History for Stock In, Stock Out and Adjustments affecting the product.
Why can't I edit Opening Stock?
Opening Stock is readonly for existing products. The application expects later inventory changes to be represented as movements.
Why can't I delete a product?
If the product has movement history, deletion is blocked to protect the historical relationship.
Why can't I delete a supplier?
The supplier is still assigned to one or more products. Reassign those products or remove the supplier assignment first.
Why does a product show Low Stock?
Its current stock is greater than zero but less than or equal to its reorder level.
Why is a product Out of Stock?
Its calculated current stock is zero or below.
Why is a product missing from the Restock List?
The Restock List specifically includes products with positive stock at or below the reorder level. A product at zero stock may instead appear in the Low / Out of Stock area.
What does Suggested Qty mean?
It is the simple formula max(Reorder Level × 2 − Current Stock, 1). It is a rule-based quantity, not a forecast.
Does Average Cost Basis change the main inventory valuation?
No. The Analytics Average Cost Basis is an analytics metric. The main Dashboard/Reports inventory cost value uses Current Stock × the product's listed Cost Price.
Are stock movements editable?
Yes. Movement History and the Stock In/Stock Out/Adjustment lists provide Edit and Delete actions. Editing/deleting causes stock snapshots to be recalculated.
Can I export my inventory?
Yes. Products CSV and Movements CSV are available from Reports, and Restock CSV is available from Analytics.
Is this cloud-based?
No cloud database is implemented in the supplied source. Data is stored in browser LocalStorage and can be exported as JSON.
Can this be used for formal accounting inventory valuation?
The supplied source does not implement formal FIFO/LIFO/weighted-average accounting methods. Its valuation is based primarily on the product's listed Cost Price.
21. Quick Reference
| Task | Where |
|---|---|
| Add product | Products → Add Product |
| Edit product | Products → Edit |
| Add supplier | Suppliers → Add Supplier |
| Receive stock | Stock In → Record Stock In |
| Remove/sell stock | Stock Out → Record Stock Out |
| Correct stock | Adjustments → New Adjustment |
| Review history | Movement History |
| Fast stock entry | Quick Actions |
| Find low stock | Dashboard → Low / Out of Stock |
| Find slow-moving products | Inventory Analytics → Slow-Moving Inventory |
| Review aging | Inventory Analytics → Inventory Aging |
| Prepare restocking | Inventory Analytics → Restock List |
| Export product list | Reports → Export Products CSV |
| Export movement history | Reports → Export Movements CSV |
| Export restock list | Analytics → Export Restock CSV |
| Backup | Backup & Restore → Download JSON Backup |
| Restore | Backup & Restore → Restore JSON |
| Reset demo | Backup & Restore → Reset to Demo Data |
Core formulas at a glance
| Metric | Formula / Rule |
|---|---|
| Current Stock | Opening Stock + Stock In − Stock Out ± Adjustments |
| Inventory Cost Value | Current Stock × Cost Price |
| Retail Value | Current Stock × Selling Price |
| Potential Margin Value | Retail Value − Cost Value |
| Low Stock | 0 < Current Stock ≤ Reorder Level |
| Out of Stock | Current Stock ≤ 0 |
| Suggested Restock Qty | max(Reorder Level × 2 − Current Stock, 1) |
| Fresh Aging | Latest movement < 30 days |
| Mid Aging | Latest movement 30–89 days |
| Old Aging | Latest movement ≥ 90 days |