Skip to content

docs: payments and customers pages match the code - #91

Merged
futurebuildai merged 2 commits into
refactor/v1from
refactor/docs-drift-payments-customers
Oct 10, 2026
Merged

futurebuildai merged 2 commits into
refactor/v1from
refactor/docs-drift-payments-customers

Conversation

@futurebuildai

Copy link
Copy Markdown
Contributor

docs: payments and customers pages match the code

The drift table at /home/colton/Desktop/FBHQ/gable-v1/mm/docs-drift2-table.md
lists every factual sentence of docs/modules/payments.md and
docs/modules/customers.md, the verification command run against the code on
origin/refactor/v1, and the result.

Changes

Two edits, one per page, fixing the same drift: the route census intro in
both pages named the route census column package, but the file's header
names it module. The column carries the registering package directory;
the wording is now accurate in both places.

docs/modules/payments.md

  • Before: "the route census (core/api/ROUTES.txt) lists each one under the
    package named in the package column."
  • After: "the route census (core/api/ROUTES.txt) lists each one under the
    module named in the module column (the column carries the registering
    package directory)."
  • Evidence: core/api/ROUTES.txt line 23 is method pattern module handler;
    the header comment says "The module column is the registering package's
    directory relative to the Go module root." There is no package column.

docs/modules/customers.md

  • Before: "The route census (core/api/ROUTES.txt) lists each one under the
    internal/customer package (the route census has a package column, not
    a module column)."
  • After: "The route census (core/api/ROUTES.txt) lists each one under the
    internal/customer module (the route census has a module column, not
    a package column; the column carries the registering package
    directory)."
  • Evidence: same core/api/ROUTES.txt header.

What was not changed

  • 85 other factual sentences on the two pages matched the code on
    origin/refactor/v1 (routes, fields and units, statuses and transitions,
    blockers and error codes, events and their line numbers, roles and
    scopes, the branch wall, ADR citations, local commands).
  • Every route owned by internal/payment, internal/account,
    internal/invoice, and internal/customer is already on the page
    (44 routes total, 0 missing).
  • Every Payment, PaymentSummary, PaymentCreateRequest,
    PaymentApplicationRequest, PaymentTransitionRequest,
    PaymentRefundRequest, CreditMemoRefundRequest,
    PaymentIntentResponse, Refund, CardPaymentRequest,
    PaymentApplyRequest, Customer, ShipTo, Contact,
    PaymentTermsRecord, PriceLevel, EscalationPolicy field is already
    on the page (0 missing).

Suspected defects for the lead

None. Both FALSE rows were page-side wording drift; the underlying code
(the core/api/ROUTES.txt column name) is correct.

🤖 Generated with Claude Code

…ckage

Signed-off-by: colton <colton@futurebuild.ai>
… and customers

F1 payments: add the Refund field table (id, payment_id, credit_memo_id,
amount_cents, reason, method, gateway_refund_id, status, gl_entry_id,
refunded_on, created_at) with each property's wire form and meaning
from the fragment and the Go struct.

F2 payments and customers: add the missing money fields -
AccountSummary.available_credit_cents, AccountTransaction.amount_cents
and balance_after_cents, PriceLevel.multiplier - in their resource
sections.

F3 customers: the currency change lock is ANY posted payment with an
unapplied amount, not only a deposit; the open_documents SQL reads
payments.status = 'POSTED' AND amount_unapplied > 0 with no order
filter; cite that SQL and reword the cross-reference bullet.

F4 payments: GET /ar/reconciliation and POST /ar/applications/{id}/reverse
take the finance write guard (admin, owner, finance) at
account/handler.go and the wall.accounts composition; sales users are
refused; list the read routes and the finance-only routes with their
guards.

F5 payments: state the credit memo refund leg (DR 1020 / CR 1010 with
a REFUND subledger row, no cash movement) plainly, citing the
RefundCreditMemo implementation.

F6 payments: fix the credit memo refund role check citation to
payment/service_card.go:192 (who.finance, RefundCredit).

F7 customers: drop the leftover 'not a package column' clause and
keep only 'the column carries the registering package directory'.

F8 customers: drop 'payment terms writes need' in favour of 'payment
terms need' - the scope is not write-only.

Add the statement line fields (ArStatementLine id, date, type,
description, amount_cents, balance_after_cents, source_kind,
reference_id, job_id) and open document fields (ArOpenDocument kind,
id, number, date, due_date, job_id, total_cents, open_cents); the
aging grouping fields (group_by customer/job/ship_to and the
ArAgingItem ID/name columns) with the coarser-is-null rule; the
CardPaymentRequest token_id field (required, never echoed back); the
PaymentApplyRequest fields (applications, revision); the
EscalationPolicy fields (customer_id, policy, threshold_percent,
agreement_signed_at, agreement_ref, revision) and the
EscalationPolicyRequest body.

Signed-off-by: colton <colton@futurebuild.ai>
@futurebuildai
futurebuildai merged commit 703b6bf into refactor/v1 Oct 10, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant