MEGAINFRA-WEBAPP/docs
DEls 4e5d13950a fix(po-email): book a PO against the site name, not the cost code
The project code on a PO's lines is a cost allocation, not a statement of
where the work is going. MEGCPO9550 is a Cedar Gate delivery -- its subject
says "(Cedar Gate)" and its email subject says "RE: Cedar Gate Paving &
Kerbs PO" -- yet four of its seven lines are billed to C26/08 (Castle Gate)
and three to C26/13 (Cedar Gate). Booking by code would have put a Cedar
Gate PO against Castle Gate, and that risk grows as sites are added.

The site is now read from the name written on the PO: its subject line
first, then its description, then the email subject. A PO naming two sites,
or none, is flagged for review instead of being booked against one of them.
The code is still read and kept on the filed row as po_cost_codes, because
the app's own finalisation step uses it as evidence.

MEGA does not always write a site name the way the app has it, so the name
is also matched without its instance qualifier ("Munyaka" for "Munyaka 2")
and through an explicit table of the spellings seen on real POs ("West Park"
for Wespark, MEGCPO9554; "Nellmpius" for Nellmapius Ext 25, MEGCPO9475).
Without those, POs naming a site would have stopped filing themselves.
2026-11-06 10:25:34 +02:00
..
audits fix(dn): date deliveries by the slip and orders by the PO's order date 2026-10-11 00:35:00 +02:00
handoffs docs: add the Hermes brief for the needs-attention queue 2026-09-18 00:23:47 +02:00
n8n fix(po-email): book a PO against the site name, not the cost code 2026-11-06 10:25:34 +02:00
research fix: harden workforce, plant and financials 2026-10-19 13:18:31 +02:00
reviews feat(receiving): add Inbox 2 and strengthen duplicate checks 2026-10-12 20:20:27 +02:00
setup feat(users): welcome and password-reset emails 2026-11-02 21:39:38 +02:00
superpowers feat(clock): use still photos with required document scan review 2026-11-06 07:03:06 +02:00
api-reference.md docs(ask): agent actions 2026-09-26 21:32:53 +02:00
architecture.md fix(auth): remove the ?demo=1 PIN bypass 2026-09-26 17:37:20 +02:00
ask-architecture.md Integrate agent work and add dashboard attention indicators 2026-10-04 21:53:32 +02:00
clock-daily-exceptions-rollout.md feat(clock): pay against the real work schedule 2026-10-09 19:51:24 +02:00
cooler-env.template feat(users): welcome and password-reset emails 2026-11-02 21:39:38 +02:00
data-flows.md docs(schema): bring bootstrap and data-model docs back to truth 2026-09-11 16:17:41 +02:00
data-model.md feat(site-map): PocketBase collections for models, progress and survey imports 2026-10-14 07:05:11 +02:00
map3-notes.md feat(site-map): Map 3 Progress tab showing pavement-layer progress by section 2026-10-21 05:11:08 +02:00
minimax-multi-site-audit-prompt.md feat(dashboard): enhance operations dashboard with rain outlook and coordinate support 2026-09-06 19:59:52 +02:00
modules.md docs(ask): agent actions 2026-09-26 21:32:53 +02:00
multi-site-assessment.md feat(dashboard): enhance operations dashboard with rain outlook and coordinate support 2026-09-06 19:59:52 +02:00
operations.md feat(auth): add Office access and restrict Clock users 2026-10-07 14:22:57 +02:00
pwa-install-verification.md docs(pwa): manual install verification steps for real devices 2026-08-30 22:42:55 +02:00
workforce-employers.md fix(workforce): let site managers add and rename employers and brokers 2026-10-19 16:33:41 +02:00