Releases: Ambibuzz/ampower_visualize
v04062026.1
Batch Traceability
AmPower Visualize now includes a dedicated Batch Traceability page that visualizes
the complete lineage of any batch — both its origins and its descendants — as an
interactive, explorable graph. The page is built directly on Stock Ledger Entry and
Serial and Batch Bundle records, so the lineage reflects actual stock movements
rather than document links.
Features
Directional tracing
Trace a batch in three modes: Ancestors (where the batch came from), Descendants
(what the batch became), or Both. Trace depth is configurable from 0 to 50 hops.
Time-window filtering
Restrict a trace to a From/To datetime range to isolate a specific production
run or investigate a defined period.
Incremental expansion
Traces can start shallow and grow on demand. Clicking any batch node loads its next
hop of lineage in place; the viewport remains anchored to the expanded node.
Confirmed dead ends are detected and marked so they are not repeatedly queried.
Depth-coloured edges
Each hop away from the root batch is assigned a distinct edge colour, accompanied by
a live legend, making distance-from-origin readable at a glance.
Voucher detail panel
Selecting any voucher opens a side panel listing the batches moved inward and
outward by that voucher, with quantities, warehouses, and posting times. Hovering a
row highlights the corresponding connection in the graph.
Automatic truncation
Vouchers that fan out to many batches (for example, a Repack producing dozens of
outputs) are automatically collapsed to the most relevant batches, with a +N
indicator. Individual batches can be shown or hidden per voucher, or all hidden
batches can be revealed or re-collapsed in a single action.
Canvas controls
The graph supports panning, dragging of individual nodes, scroll-to-zoom, and zoom
in / out / fit-to-screen.
Implementation Notes
- Traversal is breadth-first and processed one depth level at a time. Each level
fans out across all of its batches in a singleIN (...)query rather than one
query per batch, keeping deep traces performant. - Lineage is defined at the voucher level: any two batches moved by the same voucher
are linked. Same-batch warehouse hops are excluded from lineage. - The graph-layout engine (
dagre) is lazy-loaded only on the first trace, so the
page remains lightweight until used. - The graph is rendered as native, theme-aware SVG, with no
external graph runtime dependency.
Getting Started
Open the Batch Traceability page, search for a batch, select a direction and depth,
and select Trace. Click nodes to expand the lineage further.
After upgrading, run bench build
10122024.2
First Draft, containing Sales Order drill down.