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
← Purchase orders / New

New purchase order

will post as PO-567 · next in PO- series — number editable, NOT unique (Gaia warns on duplicates)

1 · Supplier & terms

2 · Lines

unit price auto-fills from last purchase price
Covers shortage: MO YGMSB-260401 / 1 needs 386,850 mg Affron — ordering 1 kg (1,000,000 mg) leaves 613,150 mg for the next AlphaMax batch. Routed here from Make → Buy.

3 · Additional info

supplier-facing — printed on the PO PDF (purchase_orders.additional_info)

Subtotal (tax excluded) MYR
Plus tax (5% - Sales Tax) MYR
Total MYR
Create purchase order Save as draft Cancel
On create: no stock or accounting effects — stock moves only at Receive items (batch/lot + expiry mandatory per GMP, landed cost enters the per-location moving average). Billing is tracked via bill refs netted against the tax-inclusive total. The PO email cc's the supplier's additional emails.

Project Gaia — static mockup in Filament v3 idiom. No backend. Sample prefill: the Affron shortage (386,850 mg) on MO YGMSB-260401 / 1 routed from Make → Buy; CK Ingredient as Affron supplier, 14,900.00 MYR/kg price and 14-day lead time are illustrative.

New purchase order — field manifest

FieldFilament componentTypeSourceFK target
PO numberTextInputstringdefault next in PO- series; editable, NOT unique — stored purchase_orders.number
SupplierSelect::searchable()FKsets currency default + cc list on the PO emailsuppliers.id
CurrencySelectenumstored purchase_orders.currency; default supplier currency else MYR base
LocationSelectFKtenant scope — stored purchase_orders.location_idlocations.id
Order dateDatePickerdatestored purchase_orders.created_date
Expected arrivalDatePickerdateheader default = order date + 14d (supplier lead time); per-line override po_lines.expected_arrival
LinesRepeater → po_linesrowsvariant_id FK variants.id · quantity (in purchase UoM) · purchase_uom_id locked to the admin units list — kg here; kg→mg factor hard-coded in the units table, conversion auto, never keyed · unit_price with last-purchase-price autofill · tax_rate_id FK tax_rates.id ('5% - Sales Tax') · expected_arrivalvariants / tax_rates
Additional infoTextareatextstored purchase_orders.additional_info — supplier-facing, printed on the PO PDF
Save as draftAction (secondary)lifecyclesaves with status=draft — lands on the Draft tab, number stays reserved

Engine notes

  • created_by = current user (here Priya Nair, Purchasing).
  • Totals = Σ qty × unit_price + tax; creating posts nothing to stock — movements only at Receive items (batch/lot + expiry mandatory per GMP).
  • Prefill context: in the real app ?from=mo_ingredient prefills the shortage line (mock shows the Affron case for MO YGMSB-260401 / 1).
  • Duplicate-number warning is not blocking — PO number is editable and not unique (PK is internal id).