Stock Movement Ledger
1. Overview & Purpose
What is the Stock Movement Ledger?
2. When to Use Stock Movements
Forensic Stock Card (Kartu Stok) Discrepancy Audits
An end-of-month audit discovers a discrepancy of -10 units on premium olive oil, and the auditor needs to inspect every historical in/out movement over the last 60 days.
Operator Accountability & Fraud Investigation
Store management detects suspicious manual inventory write-offs occurring late at night without manager sign-off.
Batch Lot Traceability for Quality Recalls
A supplier alerts that Batch #LOT-2026-X has a manufacturing defect and must be recalled from both internal storage and sold customers.
Monthly Cost of Goods Sold (COGS) Inventory Valuation Audit
Finance accountants verify total inventory asset deductions against general ledger Cost of Goods Sold entries for month-end financial closing.
Sequential Delta Balance Mathematical Integrity Verification
Auditing ledger integrity to ensure every inventory movement row strictly satisfies: Previous Balance + Quantity Delta = Resulting Balance.
3. Data Dictionary & Fields
Schema structure for the immutable stock_movements table:
| Field / Column | Input Type | Requirement | Description & Operational Guide |
|---|---|---|---|
movementAt | DateTime | Required | Precise timestamp when the inventory mutation was committed to the ledger. Example: 2026-05-19 14:32:05 |
productInfo | String (Product / SKU / Barcode) | Required | Catalog item identification including product name, variant, SKU, and barcode. Example: Kopi Arabika 250g (Medium Roast) — SKU-KOP-MED |
locationDetails | String (Branch / Location / Storage) | Required | Territorial hierarchy showing branch, facility location, and specific storage bin. Example: Jakarta Central > Main Warehouse > Rack A-02 |
movementType | Enum (MovementType) | Required | Classification: INITIAL, PURCHASE_IN, SALE_OUT, SALES_RETURN_IN, TRANSFER_IN, TRANSFER_OUT, ADJUSTMENT_IN, ADJUSTMENT_OUT, OPNAME_IN, OPNAME_OUT, PRODUCTION_CONSUMPTION_OUT, PRODUCTION_OUTPUT_IN, RESERVED, or UNRESERVED. Example: PURCHASE_IN, SALE_OUT |
quantityChange | Decimal | Required | Positive or negative quantity increment applied in the transaction unit of measurement. Example: +50.00 / -12.00 |
baseQuantity | Decimal | Required | Normalized quantity change expressed in the product catalog base unit. Example: 50.00 Pcs |
quantityBefore | Decimal | Required | Physical inventory balance immediately preceding this transaction event. Example: 100.00 |
quantityAfter | Decimal | Required | Resulting physical inventory balance following application of the mutation. Example: 150.00 |
costPrice | Decimal | Required | Unit cost price associated with the inventory movement. Example: 45000.00 |
valuationTotal | Decimal | Required | Total monetary transaction value computed as quantityChange multiplied by costPrice. Example: 2250000.00 |
referenceCode | String | Optional | Document identifier of the triggering business transaction. Example: TR-2026-0001, PO-2026-0512, POS-INV-009 |
sourceType | Enum (StockMovementSourceType) | Required | Origin business module: STOCK_OPENING, PURCHASE_RECEIPT, SALE_INVOICE, STOCK_TRANSFER, STOCK_ADJUSTMENT, or PRODUCTION. Example: STOCK_TRANSFER, SALE_INVOICE |
executedBy | Foreign Key (Users) | Required | Full name and email of the user account who initiated or posted the transaction. Example: Budi Santoso (Admin WH) |
remarks | String | Optional | Operational comments or automated system annotations recorded at time of execution. Example: Auto-posted from POS Counter #2 shift closing |
4. Interface Preview
Visual interface layout showing transaction logs, mutation badges, source reference links, and audit trail tabs.
Screen Preview: Stock Movement Ledger Interface
Visual interface illustration and control layout for menu Route: /admin/inventories/stock-movements
5. Filtering Ledger Records
Open Stock Movements
Menu > Inventories > Stock MovementsNavigate to Inventories and select Stock Movement Ledger to view the live immutable transaction feed.
Review Metric Overview Cards
Movement Summary CardsAnalyze summary statistics for Total Transactions, Stock In total units, Stock Out total units, and Unique Products moved.
Filter by Time Range and Movement Type
Filter Modal > Apply FilterClick the Filter button. Specify mandatory Start Date and End Date alongside optional Movement Type or Reference Code.
6. Movement Detail & Source Tracking
Click View Details on Movement Row
Action > View DetailsClick View Details on any movement record to inspect the comprehensive drill-down modal.
Trace Source Transaction
Transaction & Reference SectionReview the Source Document reference code and Source Type to identify the originating business invoice or transfer manifest.
Verify Mathematical Balance Continuity
Quantity SectionExamine Quantity Before, Quantity Change, and Quantity After to confirm mathematical continuity in the item ledger.
7. Audit Trail & User Accountability
Strict Append-Only Immutability
Switch to Audit Trail Tab
Tab > Audit TrailClick the Audit Trail tab header at the top of the page to inspect operational user activities and system triggers.
Export Immutable Ledger Records
Action > Export as ExcelClick Export and select Export as Excel or Export as PDF to produce official audit workpapers for financial controllers.
8. Cross-Module Impact
| Target Subsystem | Relational & Transactional Effect |
|---|---|
| All Inventory Transactions | Every transaction across POS, Sales, Purchase, Production, Openings, Transfers, and Adjustments writes to this ledger. |
| Stock Balances | The current Stock Balance represents the mathematical sum of all historical Stock Movement Ledger rows. |
| Financial General Ledger | Serves as the underlying physical evidence supporting all Inventory Asset and COGS journal entries. |
| User Management & Scopes | Maintains user attribution for forensic auditing and tracks location scope execution. |
Operational Best Practices
- Stock movements are completely immutable; no software administrator can alter or delete a ledger row.
- Always filter by Reference Code when investigating a specific purchase order, transfer manifest, or POS receipt.
- Cross-reference the Valuation Total column with general ledger journal vouchers for period-end reconciliation.