Skip to content

docs(o2c): a first confirm is checked against Received and Invoiced too (#2839) - #2852

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-2839-first-confirm-docs
Nov 29, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-2839-first-confirm-docs

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Irene · project thread

Fixes #2839

Clause-②: no
Metadata-protocol: none
Metadata-impact: reviewer — text only (doc pages, an in-app manual page and a code comment); no rule, field or permission changes
Ruling-ref: maintainer on the project thread's decision card, 2026-11-29T02:32Z: 「改手册,规则不动」 (the text follows the rule; the rule is unchanged)

维护者速读

  • 用户能看到什么变化:订单与回款手册(英文、简体、繁体)和模块内的帮助页,改为如实说明「首次确认也受检查」,规则本身不变。
  • 为什么做:属于订单与回款的确认规则;手册原先写「首次确认不受此检查」,而实际上确认前已登记的回款或发票超过订单总金额时,首次确认也会被拒绝。
  • 出错会怎样:只改说明文字和一条测试,不改任何业务行为;措辞有问题可直接撤回。
  • 要你做什么:无。

What changes

  • The five doc lines from feat(o2c): confirming again refuses a Total Price below what the order invoiced or received (#2827) #2836 (EN manual, zh-Hans, zh-Hant, module doc EN, module doc zh) now state the rule as coded: a Draft order whose Total Price is below its Received or Invoiced cannot be confirmed, whether it was sent back to Draft or is confirmed for the first time with a payment or an invoice already recorded; only the move Draft to Confirmed is checked, a first confirm included (an order with nothing invoiced or received passes); edits of an order already confirmed are not checked. The lead sentences drop "again" / 「再次」.
  • src/o2c/extensions/sales-order.extension.ts: the rule's comment no longer equates a first confirm with "nothing invoiced or received". Comment only; the CEL source is byte-identical.
  • test/sales-order-reconfirm-floor.test.ts: header comment corrected; the existing first-confirm case renamed to what it shows ("passes", not "is not judged"); one new case.
  • Changeset: patch, docs correction.

Tests

New case: a never-confirmed Draft order at 8,000 with a 10,000 payment is refused on its first confirm with 400 VALIDATION_FAILED, fields[0] on total_price / rule_violation with the Received message, and stays Draft; the same with a 5,000 order and a 9,000 invoice (Invoiced message); control: a 12,000 order with a 10,000 payment confirms (200). It pins current behaviour on main's rule: the rule is unchanged, so there is no rule ablation (the test is green before and after this PR by design).

Test and verification readings

All on head 264544fe, each through os-verify-lock.sh:

  • pnpm exec vitest run --maxWorkers=2 test/sales-order-reconfirm-floor.test.ts: Test Files 1 passed (1), Tests 6 passed (6); VERDICT command-exit 0.
  • pnpm validate && pnpm typecheck && pnpm lint: "Validation passed"; tsc --noEmit silent; objectstack lint --strict "54 suggestion(s)", no errors; VERDICT command-exit 0.
  • pnpm test (full suite): Test Files 345 passed (345), Tests 6595 passed, 58 skipped (6653); VERDICT command-exit 0 (29m33s).

Acceptance notes

  • Not touched: the whats-new pages (content/docs/(start)/whats-new*.mdx) say "Confirming again is refused when the new total ..." / 「再次确认时…」. That is true of a re-confirm and silent on a first confirm; it describes the 6.7.0 release item, so it is left as written.

Verification

Read first: content/docs/(product)/order-to-cash/invoices-and-payments.mdx line 43 (the wording the other four follow), then the zh-Hant line 45 (field labels kept English per the zh-Hant convention), then the new test case.

Two-minute check: pnpm exec vitest run test/sales-order-reconfirm-floor.test.ts shows 6 tests passed, including "a never-confirmed Draft order is judged on its first confirm, received or invoiced (#2839)".

🤖 Generated with Claude Code

https://claude.ai/code/session_01J8VVAk8tegvAi1ECkgCFfc

…oo (#2839)

The invoices-and-payments manual (en, zh-Hans, zh-Hant) and the Order to
Cash in-app page said a first confirm is never checked. The rule judges
every Draft -> Confirmed move, and a payment or an invoice can name an
order still in Draft, so a never-confirmed order above its total is
refused like a re-confirm. The text now follows the rule; the rule is
unchanged. The rule's comment and the test header are corrected, and a
test pins the first-confirm refusal (received and invoiced) with a
control.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8VVAk8tegvAi1ECkgCFfc
@vercel

vercel Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
hotcrm Ignored Ignored Nov 29, 2026 4:48am UTC

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation ci/cd CI plumbing and the verification pipeline labels Nov 29, 2026
@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 29, 2026 03:09
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:hotcrm#1 · huangyiirene · session_01J8VVAk8tegvAi1ECkgCFfc

ACCEPT · 2026-11-29T03:09Z

Head-sha: 264544fe

维护者速读

  • 改了什么:手册(英文、简体、繁体)和 Order to Cash 模块自带说明共五处,改为「只检查从草稿改为已确认这一步,首次确认也包括在内;没有回款和发票的订单直接通过」,去掉了「再次」。规则本身一个字没改,只修了代码注释和测试说明,并补了一个测试:确认前已有回款或发票超过总价的草稿订单,首次确认同样被拒。
  • 没做到的:无。6.7.0 的新功能介绍页写的是「再次确认时…」,对再次确认是对的,没有涉及首次确认,不在本卡范围内,未改。
  • 要你做什么:无。您在决策卡上选了「改手册,规则不动」,按「做完的,没有问题的都自动合并」由席位合并。

席位核对

  • Form: Fixes #2839 after the attribution lines; draft → ready to main. Files: the five doc files the card names, the rule's comment (CEL source byte-identical, checked in the diff), the test file, a patch changeset — on the claimed surface.
  • Docs: all five state the same thing in three locales — Draft → Confirmed checked, first confirm included; nothing invoiced/received passes; edits of a confirmed order not checked. Lead sentences no longer say "again"/「再次」.
  • Test: new case pins a first-confirm refusal (payment 10,000 over total 8,000; invoice 9,000 over 5,000) with 400 VALIDATION_FAILED / total_price / rule_violation, plus a 12,000 control. No ablation by design: behaviour is unchanged, the test pins it.
  • Gates: validate/typecheck/lint exit 0 and full suite 345 files, 6595 passed / 58 skipped via os-verify-lock on 264544fe. Check-runs at this comment: 9 success, 9 in progress, 0 failing; auto-merge lands only once required checks pass.
  • Landing: seat lands on the maintainer's standing word 「做完的,没有问题的都自动合并」 (2026-11-26T10:39Z).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:hotcrm#1 · huangyiirene · session_01J8VVAk8tegvAi1ECkgCFfc

CI · 2026-11-29T03:16Z · Test shard 2 / Build and Test (22.x) red on 264544fe — not this PR's: hotcrm#2849

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 29, 2026
Merged via the queue into main with commit d48b030 Nov 29, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd CI plumbing and the verification pipeline documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: invoices-and-payments says a first confirm is not checked, but a never-confirmed Draft order below its Received or Invoiced is refused (#2827)

2 participants