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&DMakeBuyStockPlanItemsGMPOpsAdminInsights
← Retail sales / RS-26-041

RS-26-041

Retail sale · Aunty Mei · 2026-07-07
Unpaid Partially paid — outstanding Paid — 07 Jul · Cash → July consolidated (NVMSB) B2B — own e-invoice ✓
Print receipt / DO
Customer
Aunty Mei · Restoran Mei Kee, Balakong
Channel
retail
Sold by / date
2026-07-07 by Kevin Wong
Entity / series
NVMSB (RS-{yy}-{seq} — separate from OEM SO series)
Payment terms
Cash — COD, no credit
Due date
n/a — paid on delivery
Total
960.00 MYR
e-Invoice path

Lines

2 lines
# Product Qty Unit price Line total
1 STC30 End Product 2 ctn (48 boxes) 15.00 MYR / box band 13.00–16.00 · floor 13.00 720.00 MYR
2 Double Root Coffee End Product 1 ctn (30 pcs) 8.00 MYR / pc band 7.50–8.00 · floor 5.00 240.00 MYR
Subtotal 960.00 MYR
Total 960.00 MYR
FEFO shipped lot STC-2606-11 · DRC-2607-03 · trace

Payment

Unpaid Partially paid Paid
  1. Sold — cash, paid on delivery

    07 Jul · by Kevin Wong

Record payment

Writes a retail_sale_payments row; partial amounts leave the sale Partially paid. Operational flag only — accounting stays in QuickBooks.

Delivery

same shipment engine as OEM
RD-26-058 Own van Delivered — 07 Jul Balakong · stop 1 · cash collected on delivery

e-Invoice

→ July consolidated (NVMSB) B2B — own e-invoice ✓ QBO stays the accounting system — Gaia never talks to MyInvois directly

Project Gaia — static mockup in Filament v3 idiom. No backend. Retail module; customer data shared with OEM underneath (channel-flagged), screens separated. RS-26-041 is an ordinary B2C sale: it rolls into one consolidated e-invoice with the rest of July unless flipped to an individual B2B one.

Retail sale detail — field manifest

FieldFilament componentTypeSourceFK target
PageRetailSaleResource ViewRecord + Infolistdocstored: retail_sales (customer_id, sold_by, sold_at, payment_status, b2b_einvoice bool, entity/series) — RS- numbering, separate from OEM SO seriescustomers / users
LinesLinesRelationManagerrowsstored: retail_sale_lines (variant_id, qty_base, unit_price, line_total); qty was entered at the till in ctn/box and converted to base pcs before it was stored — this view shows both ("2 ctn (48 boxes)"). Band/floor sub-line derived live from sale history + variant_prices (SHARED with OEM)variants / variant_prices
Pack conversionhard-coded per item, not user-entereditem dataSTC30: 1 ctn = 24 boxes (confirm pack size), 1 box = 15 sachets. Double Root Coffee: 1 ctn = 30 pcs. Same fixed UoM rule set used across Buy/Make/Sell/Retailitems.pack_uom_factor
FEFO trace lineTextEntry, derived, below the lines tablederivedreads the shipment's retail_sale stock movements (FEFO batch splits) — NOT stored on the line, one summary line for the whole sale rather than a chip per line; links into batch tracestock_movements / batches
PaymentsPaymentsRelationManager + Actionchild rowsstored: retail_sale_payments (amount, method cash/transfer, reference, received_at); payment_status derived: unpaid → partially paid → paid. Credit-term sales additionally get due_date = sold_at + terms and a day-7 WhatsApp reminder queues automatically if still unpaid (not shown in this UI — operational job, not a screen element)retail_sales
DeliveryInfolist section, linked row — one lineFK rowthe retail_delivery for this sale, collapsed to status + link; full custody/redelivery detail lives on retail-delivery-detail.html, not duplicated hereretail_deliveries
e-InvoiceBadge, one lineenum + boolb2b_einvoice=true ROUTES e-invoicing: sale exports individually to QBO/MyInvois and is excluded from consolidation_runs; B2C sales (the default here) instead reference the month's runconsolidation_runs

Engine notes

  • Shared-data doctrine: ONE customers table (channel enum oem / retail / both) and ONE variant_prices table — data shared, views scoped. What separates Retail from Sell: screens, numbering series (RS- vs SO-), CRM shape (book vs pipeline), e-invoicing path (consolidated vs per-order).
  • The FEFO trace line proves trace continuity: a retail sale spends FG batches through the same stock-movement ledger as OEM shipments, so a recall query (batch → who got it) covers kedai sales too — it just isn't broken out per line here anymore.
  • Record payment is an operational flag + child row, not accounting — QuickBooks remains the ledger of record.
  • Retail has no returns concept — a kedai with a problem gets a manual price adjustment or credit note handled outside Gaia, not a returns workflow.