Inventories & Stock ModuleOptional Module

Stock Movement Ledger

1. Overview & Purpose

What is the Stock Movement Ledger?
The Stock Movement Ledger is the permanent, append-only chronological log of every inventory transaction across the enterprise. It records historical quantity before and after, transaction type, source document references, cost valuation, and the specific user who executed the operation.
Menu Location:/admin/inventories/stock-movements

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.

Recommended Action:Filter the movement ledger by Product SKU and date range to analyze sequential before/after balances, document source types (Sale, Transfer, Adjustment), and delta quantities.

Operator Accountability & Fraud Investigation

Store management detects suspicious manual inventory write-offs occurring late at night without manager sign-off.

Recommended Action:Examine the "Executed By" user stamp, IP address, and exact system execution timestamp on the suspect movement row to identify the responsible staff member.

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.

Recommended Action:Filter ledger movements by Batch Number to identify which specific warehouse bins currently store the affected batch and which customer delivery orders received them.

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.

Recommended Action:Review the Valuation Total column across all SALE and PRODUCTION_ISSUE movement types to verify mathematical compliance with moving-average costing (HPP).

Sequential Delta Balance Mathematical Integrity Verification

Auditing ledger integrity to ensure every inventory movement row strictly satisfies: Previous Balance + Quantity Delta = Resulting Balance.

Recommended Action:Inspect consecutive chronological rows for a specific SKU; any mathematical gap triggers immediate system anomaly alerts for database investigation.

3. Data Dictionary & Fields

Schema structure for the immutable stock_movements table:

Field / ColumnInput TypeRequirementDescription & Operational Guide
movementAt
DateTimeRequired
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
DecimalRequired
Positive or negative quantity increment applied in the transaction unit of measurement.
Example: +50.00 / -12.00
baseQuantity
DecimalRequired
Normalized quantity change expressed in the product catalog base unit.
Example: 50.00 Pcs
quantityBefore
DecimalRequired
Physical inventory balance immediately preceding this transaction event.
Example: 100.00
quantityAfter
DecimalRequired
Resulting physical inventory balance following application of the mutation.
Example: 150.00
costPrice
DecimalRequired
Unit cost price associated with the inventory movement.
Example: 45000.00
valuationTotal
DecimalRequired
Total monetary transaction value computed as quantityChange multiplied by costPrice.
Example: 2250000.00
referenceCode
StringOptional
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
StringOptional
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.

Menu Location:Route: /admin/inventories/stock-movements

Screen Preview: Stock Movement Ledger Interface

Visual interface illustration and control layout for menu Route: /admin/inventories/stock-movements

1Movements & Audit Trail Tabs2Summary Statistics Cards3Mutation Badges & Quantities4Source Document Drill-Down
Audit ledger interface displaying chronological inventory mutations, source reference codes, user attribution, and valuation deltas.

5. Filtering Ledger Records

1

Open Stock Movements

Menu > Inventories > Stock Movements

Navigate to Inventories and select Stock Movement Ledger to view the live immutable transaction feed.

2

Review Metric Overview Cards

Movement Summary Cards

Analyze summary statistics for Total Transactions, Stock In total units, Stock Out total units, and Unique Products moved.

3

Filter by Time Range and Movement Type

Filter Modal > Apply Filter

Click the Filter button. Specify mandatory Start Date and End Date alongside optional Movement Type or Reference Code.

The ledger defaults to recent dates to optimize performance while supporting multi-month forensic queries.

6. Movement Detail & Source Tracking

1

Click View Details on Movement Row

Action > View Details

Click View Details on any movement record to inspect the comprehensive drill-down modal.

2

Trace Source Transaction

Transaction & Reference Section

Review the Source Document reference code and Source Type to identify the originating business invoice or transfer manifest.

3

Verify Mathematical Balance Continuity

Quantity Section

Examine Quantity Before, Quantity Change, and Quantity After to confirm mathematical continuity in the item ledger.

The ledger guarantees Quantity Before plus Quantity Change equals Quantity After on every single record.

7. Audit Trail & User Accountability

Strict Append-Only Immutability
Stock movements are strictly append-only. No user role, including Superadmin, has authorization to modify or delete historical movement rows. Every variance, reversal, or correction writes a new timestamped event to ensure complete audit compliance.
1

Switch to Audit Trail Tab

Tab > Audit Trail

Click the Audit Trail tab header at the top of the page to inspect operational user activities and system triggers.

2

Export Immutable Ledger Records

Action > Export as Excel

Click Export and select Export as Excel or Export as PDF to produce official audit workpapers for financial controllers.

Because stock movements are append-only, movement records cannot be edited or deleted by any user account.

8. Cross-Module Impact

Target SubsystemRelational & Transactional Effect
All Inventory TransactionsEvery transaction across POS, Sales, Purchase, Production, Openings, Transfers, and Adjustments writes to this ledger.
Stock BalancesThe current Stock Balance represents the mathematical sum of all historical Stock Movement Ledger rows.
Financial General LedgerServes as the underlying physical evidence supporting all Inventory Asset and COGS journal entries.
User Management & ScopesMaintains 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.