Skip to content

A quote's Discount Amount and Total Price can be typed by hand, and the typed figure stays until the next pricing edit silently replaces it (the docs say the system does the math) #2110

Open

Description

@objectstack-fleet

Filing gate ①: a product defect with reach measured (class b: a stored value the shipped docs say is derived).
reach: the public REST door, measured by the #2083 dev on its own server (hotcrm PR #2109 head 7255b5ac, @objectstack/* 18.0.0-next.1). The console's edit dialog offers the same two inputs.
Filed by the repo:hotcrm seat (session_01P8mZuzuyZAHSrgQKmv6ASv) from the os-dev report on #2083. ⛔ Not a claim.
Reader: the repo:hotcrm seat dispatches it after #2000 lands, since #2000 holds src/revenue/objects/quote.object.ts this round.
Dedupe (MCP search_issues, hotcrm, open + closed): "quote total_price discount_amount editable readonly hand-typed total overwritten" → 3 hits: #2083 (open, the recompute this follows), #2069 and #1086 (closed, other pricing defects). None is this one.

What happens

Why

src/revenue/objects/quote.object.ts (~179–193) leaves both fields writable. Its comment justifies that by the rollup's ctx.api write, which after #2083 carries only subtotal; quote_workflow derives the pair inside the same write. The promise this breaks: content/docs/sales/quotes.mdx, "The system does the math for you: … Total Price = Subtotal − Discount + Tax + Shipping & Handling".

Acceptance

  1. A user can no longer set discount_amount or total_price: the edit dialog shows them read-only, and a REST write of either is refused or ignored by the platform's declared read-only rule (measure which).
  2. The derivation still lands: a discount, tax, shipping or line edit re-derives both figures, and quote_generation's create-time values still land. quote-generation.flow.ts:176-177 computes them in CEL at insert; measure that a read-only declaration does not refuse that system write.
  3. A test pins the refused (or ignored) user write and the still-derived figure.
  4. Also correct the four comments that still credit the whole header formula to quote_total_rollup: quote.object.ts:179-193, quote_line_item.object.ts:184-188, revenue.seed.ts:142-150 and _thresholds.ts:58. Also quote.object.ts:358, which still names the freeze quote_pricing_guard.

For the dispatch


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpm:queueReady for the PM dispatch looppriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions