Skip to content

This is an internal working record, not an everyday instruction. It was written while the system was being rebuilt, for whoever maintains it. If you are here to do today's work, use the everyday documents instead: Procedures · Processes · Runbooks · The working day, step by step

MK Trade / Cost / Rate / Document Outputs — Current Source Operator Addendum

  • Status: CURRENT SOURCE-RECONCILED REPOSITORY RUNBOOK ADDENDUM / NOT FIELD ACCEPTED
  • Current lineage: MK_TRADE_COST_RATE_DOCUMENT_CURRENT_LINEAGE_REFRESH_2026-08-09.md
  • Parent Runbook: MK_TRADE_COST_RATE_DOCUMENT_OUTPUTS_OPERATOR_RUNBOOK.md
  • Effect matrix: MK_TRADE_COST_RATE_DOCUMENT_CURRENT_EFFECT_MATRIX_2026-08-09.md
  • Evidence package: RBR-MK-TRADE-001-READONLY-CURRENT-SURFACE-PREFLIGHT.md
  • Phase implementation: USER HOLD

1. Purpose

Use this addendum when:

  • Trade totals or state labels appear wrong;
  • Export Brokerage Create/Cancel returns no response or a partial result;
  • an Outbound Cost appears to update the wrong AP record;
  • a Packing Rate save updates fewer items than expected;
  • a printed document does not match current server data;
  • a user confuses rendered output with a durable file, email, approval or physical ticket.

The first action is an authoritative reread. Do not repeat a consequential command merely because the browser result is missing.


2. Before Diagnosis

Record:

environment and timezone
current Runtime-bearing source SHA
current document head
tenant/profile
physical actor and effective subject
role(s)
page/API/action
approved business ID(s)
request/correlation ID when available
before state
expected result
observed result

Do not record:

  • credentials;
  • broad customer/supplier contact data;
  • full report exports;
  • unredacted free-text notes;
  • browser cookies/session values.

3. Trade Summary Diagnosis

3.1 Confirm the question

Separate:

wrong source data
wrong report filter
wrong link selection
wrong derived label
header/detail explanation gap
stale browser state

3.2 Reread

For one approved Trade identity:

  1. capture the exact query time and filters;
  2. read Equipment and Equipment Load lineage;
  3. read linked Purchase/Sales/Booking identities;
  4. read AP/AR source rows and line totals;
  5. read ETA/ETD/SWB owner fields;
  6. compare header and detail source classes;
  7. record the derived-state explanation.

3.3 Interpret labels safely

OPEN
= report derivation

SHIPPED
= report saw shipping evidence

CLOSED
= report saw qualifying AP/AR evidence

CLAIMED
= attention filter

Do not report CLOSED as accounting close or settlement unless a separate accounting authority proves it.

3.4 Recovery

If source data is wrong, route correction to the source owner. Do not edit report totals.

If source classes disagree, preserve the conflict and escalate the query policy; do not hide a source class to make totals match.


4. Export Brokerage Create

4.1 Before Create

Verify:

source identity
current source state
preview child set
selected Booking/Order/Equipment/Lot relations
no known existing generated set for the same intent
operator authorization

4.2 Missing response

Do not repeat Create.

Reread in this order:

source row
[EB:generated] markers
[EB:generated-booking] markers
Purchase/items
Transload
Inventory lot/allocation
Booking relation
Outbound order/items
Equipment/load relations

Classify:

NOT_COMMITTED
COMMITTED_COMPLETE
COMMITTED_PARTIAL
DUPLICATE_CANDIDATE
UNKNOWN

Only NOT_COMMITTED with proven absence can permit a new Create request, and only under the current owner procedure.

4.3 Partial child set

Do not create another full set. Identify the missing child and its owner. A composite correction must be explicitly approved before it writes anything.


5. Export Brokerage Cancel

5.1 Before Cancel

Read:

  • exact generated child set;
  • downstream Delivery/Transload/Scale/Inventory/Billing evidence;
  • active/deleted state;
  • compensation preview;
  • blocked children;
  • expected residuals.

5.2 Missing response

Do not repeat Cancel.

Reread every child and classify:

COMPENSATED
ALREADY_ABSENT
BLOCKED
NOT_ATTEMPTED
CONFLICT
UNKNOWN

Resume only an approved residual compensation. Never assume all children roll back together.

5.3 Non-implication

Export Brokerage Cancel
!= Booking cancellation
!= Delivery reversal
!= Scale reversal
!= physical work reversal
!= provider reversal

6. Outbound Cost Diagnosis

6.1 Always identify the exact transaction

Record:

Outbound Order ID
Transaction ID
Transaction Type
Status
header version/update timestamp
active line IDs
total
sibling AP transaction IDs

Do not rely on “latest AP” when more than one candidate exists.

6.2 Save response missing

Reread:

  1. exact Transaction ID if known;
  2. source/request identity if Create;
  3. all AP candidates for the Outbound Order;
  4. active lines and totals;
  5. Trade Summary readback.

Classify:

COMMITTED_EXACT
NOT_COMMITTED
AMBIGUOUS_MULTIPLE
PARTIAL_HEADER_LINE
UNKNOWN

Do not create a second AP until absence is proven.

6.3 Update conflict

If current values differ from the operator's expected values:

  • stop;
  • reload the exact transaction;
  • compare header and every line;
  • preserve concurrently added data;
  • resubmit explicit intent only after review.

6.4 Omitted lines

Current replace-all behavior can interpret omission as removal. The operator must compare the submitted set to the current active line set before saving.


7. Packing Rate Diagnosis

7.1 Before Save

Verify each intended item:

item ID
parent order ID
Booking ID
tenant
order class SALES
order direction OUTBOUND
active state
current rate
unit/currency source

7.2 Partial result

An aggregate updated count is not enough. Reread every intended item and assign:

UPDATED
UNCHANGED
STALE
DENIED
NOT_FOUND
INVALID

Retry only items still eligible after the conflict is resolved.

7.3 Print race

Do not print while a save is pending.

Safe sequence:

save request complete
-> server reread of every item
-> document query rerun
-> source fingerprint/time recorded
-> print preview

7.4 Open rate policy

Do not invent rules for zero, negative, maximum, currency, UOM or rounding. Use the accepted business policy or record OPEN POLICY.


8. Packing Document

Before printing:

  • confirm Booking identity;
  • confirm outbound Sales items;
  • confirm Equipment Load/Commodity coverage;
  • confirm which fallback branch the report used;
  • confirm current persisted rates;
  • identify fixed/default fields;
  • refresh after any browser edit.

Browser-only text or amount changes are not source corrections and can disappear after refresh.


9. Purchase Local Invoice

For a discrepancy, record:

item ID
quantity
net weight
unit
rate
expected formula
rendered item amount
trucking fee
credit
expected total
rendered total
rounding difference

Formula reference:

MT   weight * rate / 2204.590
LT   weight * rate / 2240.000
ST   weight * rate / 2000.000
EACH quantity * rate
other weight * rate

Do not change a source weight, quantity or rate through the browser print page.


10. Booking Confirmation

For a wrong reference or date:

  1. read the Booking;
  2. list candidate Sales references;
  3. identify the current selection rule;
  4. identify template/config source;
  5. identify business-date fields;
  6. compare rendered title/date;
  7. classify policy versus source defect.

Printing does not prove recipient delivery or durable retention.


11. Sales Weight Ticket

First identify the branch:

ORDER_ID branch
= sales-derived projection

IDS[] branch
= physical scale-ticket projection

Do not use an order-derived ticket as evidence that a vehicle was physically weighed.

When physical evidence is required, reread the exact Scale-ticket row and owning Scale process.


12. Browser / Print Unknown Result

A browser print dialog may be canceled, completed or fail outside the server's knowledge.

print preview opened
!= paper printed
!= PDF saved
!= recipient received
!= document approved

If proof of output is required, use an approved durable-output capability with its own object/message/result identity. Do not add a manual “printed” status without a defined authority.


13. Access Mismatch

When a page is visible but an action fails, or an action is hidden for an intended role, diagnose:

tenant/profile
menu/page
module
route metadata
handler actor predicate
record tenant relation
record state
UI control

Do not grant broad administrator access or enable unrelated modules as a workaround.


14. Escalation Packet

Collect:

source/document refs
environment/DB/tenant
actor/subject/roles
page/API/action
approved record IDs
query timestamp
request/correlation ID
source rows and relationships
current/expected result
partial/unknown classification
no-repeat warning
next owner

Exclude secrets and broad report payloads.


15. Prohibited Recovery

  • blind Create/Cancel replay;
  • latest-AP update without exact identity;
  • direct row deletion/repair;
  • repeating all Rate item IDs after a partial result;
  • using browser text edits as source correction;
  • marking a document delivered from print preview;
  • treating CLOSED as accounting close;
  • treating an order-derived Weight Ticket as physical scale proof;
  • changing role/module/config while diagnosing.

16. Current State

repository Runbook addendum: COMPLETE
current DB evidence: NOT RUN
current role/browser evidence: NOT RUN
write/recovery evidence: NOT RUN
current Wiki publication: NOT RUN
M3: NO
M4: NO

---

Source: docs/runbooks/MK_TRADE_COST_RATE_DOCUMENT_CURRENT_SOURCE_ADDENDUM.md — ctc repository · This page is an English translation of the source document. Identifiers, file paths and code symbols are unchanged.