Skip to content

NS0-003 Booking Source Registry

  • Status: CURRENT SOURCE FAMILY REGISTER / SOURCE-ONLY VERIFICATION
  • Task: NS0-003
  • Review date: 2026-08-14
  • Current-source revision: 36655f639ee34e9bb371eb2c1ad893d0da2d09d4
  • Authority rule: current repository source and checked-in schema/migrations establish current behavior; historical MK materials do not.
  • Runtime/DB/browser verification: NOT_RUN

1. Source Accounting

Source ID Authority Scope Current disposition
source.booking.backend.current current Runtime source Booking HTTP routes, queries, writes, transactions, sync tasks CONFIRMED
source.booking.ui.current current Runtime source CTC/MK list surfaces, shared editor, popup and readback behavior CONFIRMED
source.booking.route-access.current current Runtime/config source page slugs, module bindings, tenant-2 menu/role evidence CONFIRMED
source.booking.schema.current current schema/migration evidence T_BOOKING, lifecycle columns, active uniqueness, Sales Order pointer CONFIRMED WITH SNAPSHOT LIMIT
source.booking.tests.current executable evidence not rerun here tenant-2 CRUD, dual popup, profile extension and current positive paths SOURCE REVIEWED / NOT_RERUN
source.booking.mk.historical secondary historical evidence legacy MK commercial, sales-container and document behavior HISTORICAL / NOT CURRENT AUTHORITY
source.booking.ux.initial approved design direction compact compatibility, guided Product UI, H/K themes, form/media rules USER-APPROVED UI INPUT

2. Current Backend Family

app/systems/TMS/booking/api_routes.php
  blob f82bd43e0696c9ce4c2f9bfaa97702ebead7631a

app/systems/TMS/booking/query_helper.php
  blob f4f92db47623a60196a6a91096f3a0826077b8fe

app/systems/TMS/booking/post_helper.php
  blob 9b9599aee1d46eb1d5c490b88053d1ae4e281d1f

app/systems/TMS/booking/profile_extension.php
  blob a176226958db1b65208ae6fe5eb9380d520247ca

Observed responsibility:

  • api_routes.php owns the current HTTP adapter, transaction wrapper and related Booking commands/effects.
  • query_helper.php owns tenant-scoped list/detail/options and relationship read models.
  • post_helper.php owns current Booking create/update normalization and validation.
  • profile_extension.php owns the conditional Sales Order/port/commodity-rate compatibility extension.
  • current create/update use one transaction wrapper and flush queued sync tasks before commit.
  • T_BOOKING DELETE is not exposed by the main Booking command path; the generic form adapter blocks Booking deletion.

3. Current UI Family

config/page_routes.php
config/modules.php

frontend/pages/system/OMS/inbound-order/booking-list.php
frontend/pages/system/TMS/booking/mk-booking-list.php
frontend/pages/system/TMS/booking/bookingConfirmation.php
frontend/pages/system/TMS/booking/mkPackingList.php
frontend/pages/system/TMS/booking/packingList.php
frontend/pages/system/TMS/booking/empty-schedule.php
frontend/pages/system/TMS/booking/fbol.php

public/assets/js/modules/shared/booking-editor-contracts.js
public/assets/js/modules/shared/booking-editor.js
public/assets/js/modules/shared/mk-booking-editor.js
frontend/partials/_javascript.php

Observed responsibility:

  • booking-list is the current CTC compact/high-density compatibility page.
  • mk-booking-list is the current MK compact page and opens the shared editor.
  • the shared editor performs save then exact detail readback and treats lost responses as unknown results.
  • the editor is also a hub for downstream actions such as Packing List, Create Empty, EIR, photos, clone and outbound continuation.
  • booking-editor-contracts.js still resolves browser field composition from numeric client identity. This is current compatibility evidence, not target policy.
  • mk-booking-editor.js remains globally loaded; caller-zero has not been proven.

4. Route, Module And Access Family

config/page_routes.php
config/modules.php
scripts/migrations/2026-08-01_p2_003_client2_office_access.php
app/platform/tenant/config_helper.php
.agents/rules/TENANT_CONFIG.md

Confirmed current facts:

  • mk-booking-list is bound to tms.booking.
  • the CTC slug booking-list is currently bound to oms.inbound-order, while the shared Booking API is bound to tms.booking.
  • tenant 2 is identified by the migration evidence as MK METAL TRADING.
  • tenant-2 Office Manager access includes the mk-booking-list menu.
  • module enablement, menu/role access, workflow capability and config presence are separate concerns.
  • tenant_mk_document_workflow_enabled is a named compatibility toggle; it must not become a permanent customer identity branch.

5. Schema And Migration Family

.agents/reference/schema.sql
scripts/migrations/2026-04-28_task-424_uuid_audit_columns_plan.md
scripts/migrations/2026-04-29_task-433_active_unique_indexes.md
scripts/migrations/2026-04-30_task-482_booking_pol_pod.sql
scripts/migrations/2026-05-28_task-638_booking_sales_order_pointer.sql

Confirmed current model:

T_BOOKING
- tenant-scoped ID and nullable UUID lifecycle foundation
- active natural identity: CLIENT_ID + BOOKING_NUMBER
- carrier/schedule/cutoff/equipment-intent fields
- terminals and port text
- commodity/weight and billing/shipper fields
- operational/document flags
- optional Sales Order pointer
- soft-delete lifecycle

Limit:

  • .agents/reference/schema.sql is a checked-in snapshot and is not guaranteed to contain every later migration column.
  • no live MySQL SHOW CREATE TABLE, row distribution or tenant-2 production readback was performed in this packet.

6. Current Tests And UAT Evidence

scripts/playwright_wp08_10_mk_booking_crud_uat.js
scripts/playwright_verify_booking_client2_dual_run.js
tests/p5_booking_profile_extension_contract.test.mjs
tests/p5_booking_module_ownership_contract.test.mjs
tests/p5_booking_backend_common_naming_contract.test.mjs

These sources support the expected current path but were not executed in this packet.

Material expectations include:

  • tenant-2 create/update/exact readback;
  • CTC/MK field-composition difference;
  • opening/switching editors causes no business write;
  • named backend extension instead of a raw tenant branch;
  • soft-delete cleanup refuses to remove a Booking with current runtime links.

7. Historical MK Family

reference/mkmetal/**
reference/mkmetal/mk.sql
reference/mkmetal/0323-2026MK Account(Shared)-2025  - Copy.xlsm
scripts/migrate_mk_booking.php
scripts/migrate_mk_booking_terminals.php
scripts/data-import/mk_excel_import/bkg_confirmation_importer.php

Disposition:

  • reference/mkmetal/** shows the legacy MK operating model, commercial/inventory orientation and Booking-linked Sales/document behavior.
  • the migration scripts are stronger evidence for how that historical data was mapped into current tenant-2 records.
  • historical field names, tables, UI and implicit side effects do not become target authority without reconciliation.

8. Initial UX Source

new-system/docs/operations/2026-08-14-ui-experience-direction.md
new-system/docs/operations/2026-08-14-ui-copy-and-field-direction.md
new-system/docs/decisions/0003-ui-copy-required-and-temporal-fields.md
new-system/docs/decisions/0004-media-attachment-and-temporal-layout.md
new-system/docs/decisions/0005-photo-ordering-and-group-lightbox.md
new-system/docs/decisions/0006-initial-ux-direction-approval.md

This family owns initial visual and interaction direction only. It does not prove Booking state, requiredness, authorization, transaction or effect semantics.

9. Freshness And Reverification

Re-run source accounting when any of these change:

  • a file in app/systems/TMS/booking/**;
  • a Booking page/editor/route/module binding;
  • T_BOOKING or Sales Order/T_LOAD linkage migrations;
  • tenant workflow capability/config resolution;
  • Booking UAT or popup rollout contracts;
  • accepted Process or final page contract.

Before TARGET_APPROVED, obtain at least:

live MySQL read-only schema/index confirmation
tenant 1 and tenant 2 representative row/read-model samples
QA role/browser confirmation for CTC and MK positive paths
operator confirmation for Booking creation, correction and downstream handoff

---

Source: new-system/docs/reconstruction/NS0-003_BOOKING_SOURCE_REGISTRY.md — ctc repository · This page is an English translation of the source document. Identifiers, file paths and code symbols are unchanged.