Read from utopiabuilder/encik-beku on 25 August 2026. Present on both development and main. It is not a separate repository; it sits inside the same codebase under a partner section.
This page exists because nothing about the module was written down outside the code.
From the migration's own header:
"A partner (LG) sells the appliance; Encik Beku delivers + installs and bills the partner. This is a WORK-ORDER surface, not a sales surface. Designed to scale to many partners (Khind, Samsung) that each have DIFFERENT flows and fields, WITHOUT forking the shared job-log engine."
| Table | Holds |
|---|---|
partner_channels |
The partner list. LG is seeded; KHIND and SAMSUNG are named as the intended next ones. |
partner_orders |
The spine — only what every partner order has: channel, order number, branch, customer, appointment, status. |
lg_order_details |
LG's own fields and LG's own flow, one row per spine row. A new partner adds its own detail table and the spine never changes. |
lg_items |
LG's own product list with one editable reference price per product, because LG admins bump per-job prices. |
partner_order_audits |
Append-only history. |
Order numbers look like MLG0001 — branch letter + LG + four digits: Melaka MLG, Johor JLG, N9 NLG.
The shared job-log engine points at the spine through a single column (order_job_logs.partner_order_id), so adding a partner adds zero columns to the job log. Technicians work the same way whether the job came from LG or from a walk-in.
See LG partner orders and billing, including the gap where the monthly run probably never fires.
Every LG route is gated as permission:partner,view or permission:partner,manage — a module plus an action, not a role name. The route file also describes an external LG Admin role whose only module is partner, confining that user to the partner section.
So the 25 August ruling — "avoid to tie permission and scope with ROLE" — is half implemented already. Module and action exist. What is missing is the scope dimension (this manager, this branch, read only).
Charlie, 25/08/2026: "For LG order which come from B2B partner, we still need to allow the b2b LG admin to access the LG order. The admin need to keyin order then our OE team can do assignment. We wanna make use of this portal for B2B admin to keyin so it save our time."
The intent is sound: LG types the order, our OE only assigns. That removes a transcription step and the errors that come with it. Three things are missing from the design as built.
The spine allows only DRAFT, PENDING, COMPLETED, CANCELLED. If an LG-typed order lands straight in the live queue, a wrong address or a duplicate becomes a dispatched technician before anyone reads it.
Add one state between typing and assignment — the partner submits, OE accepts. One click, and it buys three things: a place to catch a bad address, a place to reject a duplicate, and an audit line naming who accepted it. The audit table already has room; it needs an ACCEPT action alongside CREATE and ASSIGN.
Once OE has accepted and scheduled, an LG-side change must become a request we see, not a silent edit. Otherwise the address changes while the technician is already driving to the old one.
The schema already points at where this ends: lg_order_details.contract_no is labelled "LG's Contract No (RTMS key)", and the audit table has an RTMS_UPDATE action. LG runs its own system, and the destination is that system feeding ours. The LG admin typing into our portal is the interim arrangement that works today. Worth saying out loud, so nobody invests months in a screen that a feed will replace.