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

Sales orders

Sales order
Open 15 Done 280
Created date Order # Customer Total amount Tax COGS/COSS Profit Picked date Invoice Delivery
Total (all 280 done orders): 7,788,071.92 MYR 407.63 MYR 2,401,219.93 MYR 5,386,444.38 MYR Sum summarizers over the full Done set
Showing 1–18 of 280 (sample rows from Katana snapshot, sorted by Picked date ↓)

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

Sales orders (Done) — field manifest

FieldFilament componentTypeSourceFK target
CheckboxTable bulk selection (BulkAction Print / Export / Delete, all requiresConfirmation())selectUI: Print = one PDF/order (so-print.html); Export = async CSV; Delete skips rows with posted movements/MOs
Created dateTextColumn::date()->sortable() + Filter (date range)datestored: sales_orders.created_date; MMDD of the order number matches this date
Order #TextColumn::searchable(isIndividual)->url()string, uniquestored: PREFIX-MMDD + optional "(YYYY)"; prefixes NVMSB, YGMSB, ROYKL, TSLSB (per-entity series)
CustomerTextColumn::searchable(isIndividual)stringstored: sales_orders.customer_id, displays customer namecustomers.id
Total amountTextColumn::numeric()->summarize(Sum)money MYRderived: Σ order line totals; totals row 7,788,071.92 MYR over all 280so_lines
TaxTextColumn::numeric()->summarize(Sum)money MYRderived from tax rates on order lines; total 407.63 MYR though all visible rows are 0
COGS/COSSTextColumn::numeric()->summarize(Sum)money MYRderived by inventory engine at fulfillment: batch / moving-average cost of shipped stockstock_movements
ProfitTextColumn::numeric()->color(fn < 0 ⇒ danger)->summarize(Sum)money MYRderived: Total amount − Tax − COGS/COSS (verified per-row and on totals)
Picked dateTextColumn::date()->sortable() — defaultSort('picked_date','desc')datestored: set at fulfillment/pick; default sort column descending
InvoiceSelectColumn (inline dropdown, badge-styled)enum: Invoiced / Not invoiced / Not invoiced (1)derived from linked invoice records; "Not invoiced" chip doubles as create-invoice actioninvoices
DeliveryTextColumn::badge() (always Delivered on this tab)enumstored: fulfillment status — Delivered is the Open/Done bucketing criterion

Engine notes

  • Profit = Total amount − Tax − COGS/COSS. Verified per row (3339.08 − 0 − 1716.62 = 1622.46) and on totals: 7788071.92 − 407.63 − 2401219.93 = 5386444.36 ≈ 5386444.38 (rounding).
  • Pinned totals row aggregates only money columns: Total 7,788,071.92 / Tax 407.63 / COGS 2,401,219.93 / Profit 5,386,444.38 MYR — totals reflect all 280 orders, not just the visible page.
  • Done tab = orders whose Delivery status is Delivered; invoicing is independent — Done orders can still be "Not invoiced".
  • Default sort: Picked date descending (↓ indicator in that header).
  • COGS is recognized even on 0.00-total orders, producing negative profit (NVMSB-0324: 0.00 total, 28.59 COGS, −28.59 profit) — free-issue/sample orders still consume costed stock.
  • COGS can be 0 on a positive-total order (NVMSB-1204: 37,368.00 total, 0 COGS, profit = full total) — uncosted or service items.
  • Order # is date-encoded: PREFIX-MMDD matching Created date, with "(YYYY)" suffix when the same MMDD recurs across years.