Status: proposed, not locked. Requested by Charlie on 25 August 2026 after Azri explained that extra work found during an LG installation becomes a separate Encik Beku order in the AC series. Today nothing connects the two, so the extra revenue an LG job generates cannot be counted.
One technician visit can produce two orders holding two different pots of money:
| Order | Series | Who pays | Whose money |
|---|---|---|---|
| The partner order | MLG0001 — branch letter + LG + four digits (Melaka MLG, Johor JLG, N9 NLG) |
LG | Billed to LG monthly, grouped by branch |
| The extra job | ACXXXXX |
The customer, on the spot | Straight into Encik Beku's account |
They must stay separate records, because they are separate invoices to separate payers. The link is a reference, never a merge.
Charlie: "one way will do for this case, only link from extra order (our own order) to LG initial order."
Add one nullable column to the ordinary Encik Beku order:
orders.source_partner_order_id bigint NULL REFERENCES partner_orders(id)
Charlie, correcting the original data-hygiene reasoning: "most of the design should do bidirection link. For LG order which come from B2B partner, we still need to allow the b2b LG admin to access the LG order."
Default to a two-way link. Go one-way when one end of the link is visible to someone outside the company.
The LG partner order is such a record: an external LG admin opens it. The extra job hanging off it is our own customer, our own price, our own margin, and it does not belong on a partner's screen.
The direction of a pointer hides nothing by itself. The first version of this proposal said the LG order screen could still show "which orders came from me" as a live query. If an LG admin can open that screen, that query hands them exactly what we are trying to withhold. Storage direction is not a permission.
What enforces it is where the view lives. The "what else came out of this visit" list must be served by the orders module, not the partner module. The route file already describes the external LG Admin role as holding only the partner module, so placing the list under orders makes it invisible to LG by construction — no rule for anyone to remember, no toggle to get wrong. Internal staff holding both modules see the same LG order with the list attached.
Store the link on the child either way. The child is ours and nobody outside reads it.
partner_orders only. An AC order is not in that table and can therefore never enter an LG invoice. That separation is structural, not a rule someone has to remember — which is the safest kind.Right now an LG installation looks like low-margin fulfilment work: LG sets the price and we do the labour. Nobody can currently answer the one question that changes how the partnership is judged — how much extra revenue does an LG job pull in behind it?
With the link, that answer is one query. Without it, every AC order looks like it arrived from nowhere, and the LG partnership is valued only on what LG pays us — the smaller half of the picture.
Whether the same link should also cover Khind and Samsung when they arrive. It should — the column points at the partner spine, not at LG, so it works for any partner with no further change. Q9.