Insights reads the nightly snapshot, not the live DB — figures can trail today's operations by up to a day.
Stock value (MYR)
506,649.33
on-hand × moving-avg cost
Items in stock
764
SKUs with on-hand ≠ 0
Negative stock
2
needs adjustment
Batches tracked
313
FEFO picking order
Expiring ≤ 90 days
27
batches · 45,020 MYR at risk
Stock value by category
split of 506,649.33 MYR on-hand value · snapshot Jul 7
Plant Extract
168,420.1033.2%
Vitamins
94,780.2518.7%
Flavor
71,310.4014.1%
End Product
62,240.8512.3%
Fruit Powder
58,960.1511.6%
Packaging
33,138.256.5%
Other
17,799.333.5%
Bars scaled to the largest category. Negative-stock items are valued at zero here and listed below.
Expiry horizon
batches by days to expiry · 139 of 313 expire within a year
≤30 d critical31–90 d watch>90 d clear
Remaining 174 batches expire beyond 12 months or are shelf-stable. FEFO keeps the ≤90 d 27 batches first in picking suggestions.
Slow movers & stock problems— no outbound movement ≥150 days, dead SKUs, and negative on-hand (red)
Item
Category
In stock
Last movement
Idle
Stock value (MYR)
Flag
Affron® Saffron Extract 2%
Plant Extract
−189,850 mg
2026-06-18 · issue to MO
19 d
−3,797.00
Negative stock
Tea Bag (heat-seal, empty)
Packaging
−1,000 pcs
2026-06-30 · packing task
7 d
−85.00
Negative stock
[2023-01-Hologram] JuicyPop
End Product
0 pcs
never — no movement recorded
—
0.00
Dead SKU — no sales
Al Insan Sempurna Kopi
End Product
0 pcs
never — no movement recorded
—
0.00
Dead SKU — no sales
Vitamin K2 MK-7 1%
Vitamins
12 kg
2025-12-10 · issue to MO
209 d
9,480.00
Slow mover
Marigold Extract (Lutein 20%)
Plant Extract
46 kg
2025-11-03 · issue to MO
246 d
8,142.00
Slow mover
Passionfruit Flavor Powder
Flavor
128 kg
2026-01-22 · stock transfer
166 d
5,376.00
Slow mover
Sunrise foil pouch (2023 artwork)
Packaging
18,400 pcs
2025-09-27 · packing task
283 d
3,128.00
Slow — old artwork
Project Gaia — static mockup in Filament v3 idiom. No backend. Figures reconcile to the seeded dataset (stock value 506,649.33 MYR · 764 items · 313 batches); category split and expiry buckets are illustrative.
Inventory insights — field manifest
Widget
Source query (in words)
Stock value tile
fact_stock_snapshot: sum of on-hand qty × moving-average cost per item at the 02:00 cut, in MYR.
Items / negative / batches tiles
counts over the same snapshot — items with on-hand ≠ 0; items with on-hand < 0; batch rows with qty > 0 (FEFO order carried from the stock engine).
Expiring ≤90 d tile
fact_batch_expiry: batches where expiry date − snapshot date ≤ 90; value at risk = batch qty × cost.
Value by category chart
fact_stock_snapshot joined dim_category, value summed per category; negative on-hand valued at zero for the split.
Expiry horizon chart
fact_batch_expiry bucketed by days-to-expiry (30/60/90/180/365); count of batches and MYR value per bucket.
Slow movers table
last outbound row per item from the stock_movements fact; idle days = snapshot date − last issue/sale/transfer out; dead SKU = end product with zero movements and zero sales ever; negative rows surfaced regardless of idle age.
Engine notes
Insights is a nightly materialized star-schema snapshot — rebuilt 02:00, published 08:00. Fact tables are built from so_lines / retail_sale_lines / stock_movements / machine_usage_logs / maintenance_logs; dims: dim_customer, dim_item, dim_category, dim_site, dim_week. Pages read the snapshot, never the live operational DB.
Filament: custom Livewire pages with hand-rolled Blade/SVG chart components — NOT Resources. Read-only; "Refresh now" queues a re-materialization of this module's facts only, and charts hold the previous render at reduced opacity while it runs.
No new operational tables: Insights owns only its snapshot schema (insights_* tables), dropped and rebuilt nightly. Negative stock and dead SKUs link back to Stock screens for the actual adjustment.