G Gaia

Switch factory

CYTO-11 — Balakong Jaya CTSB CYTO-29 CTSB CYTOWELL-54 — Taming Jaya PIC/S CTWSB CYTOCNGZ-602 — Guangzhou CTCNGZ

Only factories you are granted appear here (Filament tenant menu).

Leo Lim

leo@navi.my · Owner / Admin

Profile settings Change password

Theme

Sign out
RetailSellR&DMakeBuyStockPlanItemsGMPAdminInsights

Inventory

Negative stock found
Filtered: items with negative calculated stock
Name SKU Category Storage bin Avg. cost Value in stock In stock Expected Committed Safety stock Calculated
506,649.33 MYR Total value in stock (Sum summarizer, full filtered set)
Showing 1–18 of 764 (sample rows from Katana snapshot)

Project Gaia — static mockup in Filament v3 table idiom. No backend. Sample data: Katana tenant snapshot 2026-04-12, location 11, Balakong Jaya.

Inventory — field manifest

FieldFilament componentTypeSourceFK target
NameTextColumn::searchable(isIndividual)->url()string (item / variant)derived: item.name + variant.codevariants.id
SKUTextColumn::searchable(isIndividual)string, nullablestored: variants.sku
CategoryTextColumn (badge-style) + SelectFilterstringstored: items.category_idcategories.id
Default supplierTextColumn::toggleable(hiddenByDefault)string, nullablestored: items.default_supplier_id (empty across snapshot)suppliers.id
Storage binTextColumnstring, nullablestored: variant_location.bin_id, per locationstorage_bins.id
Avg. costTextColumn::numeric()decimal(20,10) MYRderived: moving average per location; stored at high precision, displayed rounded
Value in stockTextColumn::numeric()->summarize(Sum)money MYRderived: in_stock × unrounded avg cost
In stockTextColumn::url() (movement drill-down)qty + variant UoMderived: Σ stock_movements at location/datestock_movements
ExpectedTextColumn::url()qty + UoMderived: open PO lines + open MO outputspo_lines / mos
CommittedTextColumn::url()qty + UoMderived: open SO lines + open MO ingredient requirementsso_lines / mo_ingredients
Potential— (dropped: empty across snapshot, formula unconfirmed)qty + UoMderived: producible qty? needs item card capture
Safety stockTextColumn::numeric()qty + UoMstored: variant_location.safety_stock (reorder point)
CalculatedTextColumn::color(fn) red when negativeqty + UoMderived: in_stock + expected − committed − safety_stock (verified on 6+ rows)
Row actionAction::button() Buy | Make contextualactionderived: material → Buy, producible → Make

Engine notes

  • Netting formula verified numerically: calculated = in_stock + expected − committed − safety_stock. Negative ⇒ red + counted in the "Negative stock found" banner.
  • Moving-average cost is per location, stored at higher precision than displayed (Value ÷ Qty ≠ displayed avg).
  • Balances are a replayable movement ledger: "View balance at" recomputes at any date; every qty cell drills into movements.
  • UoM is per variant (mg materials / pcs products); totals only ever sum money, never mixed-unit qty.
  • Units rule: qty stored in the base unit (mass → mg, volume → ml, count → pcs); display auto-scales (1,250,000 mg shows as 1.25 kg). Units FK → admin-locked units table; conversion factors hard-coded — staff never type units.
  • Bulk actions (Buy / Make / Outsource / Transfer / Stocktake) require row selection — Filament BulkAction.
  • Tabs All / Products / Materials = type filter on the same query (Filament tabs with badge counts).
  • Make actions create draft mos + mo_ingredients/mo_operations snapshots; nothing reserves stock until Commit ingredients on the MO card.
  • Buy actions raise Filament Action::requiresConfirmation modals that POST a draft purchase_orders row + po_lines; drafts surface on Buy's Draft tab.