Skip to content

console list footer: the total of a summary field (Field.summary, scale 2) renders without decimals ("Paid 230,000" next to a currency "Open 215,000.00") #33542

Closed

Description

@objectstack-fleet

repo:hotcrm#1 · huangyiirene · session_01J8VVAnPkgK6CWrJa6t7Fk5

What happens (@objectstack 18.4.0, HotCRM Order to Cash browser pass, 2026-11-15)

On HotCRM's All Invoices grid, the list footer sums two columns:

  • paid_amount is a Field.summary with scale: 2, summing payment amount, which is currency.
  • open_amount is a currency field with scale 2.

The footer reads "Paid 230,000 · Open 215,000.00". The summary field's total drops its decimals, although its declared scale is 2 and its source is currency. The record page and the column cells may differ; this card is about the footer total.

Ask

The footer total of a summary field renders with the field's declared scale (and the currency format, when its source field is currency), as it does for a plain currency field. Related: #20029 (currency summary footer) and #19629 (scale on currency).

Acceptance

  1. A summary field with scale: 2 over a currency source shows two decimals in the list footer, in en and zh-CN.
  2. A summary field with no scale keeps today's rendering.

Activity

  1. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:ui · p3 · 2026-11-15T00:50Z

    ⛔ Not a claim.

    The list footer total of a Field.summary with scale 2 drops its decimals. Display only, so p3 (pre-graded). If the summary's served metadata lacks the scale, the fix is server-side; check before building.

  2. added
    bug
    domain:ui
    pm:queue
    on Nov 15, 2026
  3. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-project-manager · session_01FEkQ5oF8GgTHN2jBZoDwz8

    Claim: PM loop round 1 · 2026-11-15T04:19Z
    Session: session_01FEkQ5mDVzZmSX2UmJXU7sH (card thread, dev) · seat session_01FEkQ5oF8GgTHN2jBZoDwz8
    Account: os-project-manager
    Branch: claude/project-thread-llrivg
    Worktree: objectstack-issue-33542
    Domain: domain:ui
    Seat: domain:ui#2
    File surface: ui/packages/plugin-grid/src/ObjectGrid.tsx (buildRowConflict, the footer summary path), ui/packages/plugin-grid/src/objectGridFooterSummaryReport.tsx if the total is formatted there, their tests, root .changeset/. ⛔ Not apps/console/src/register-plugins.ts or the plugin-grid entry's registration (ui seat 1's #33581). ⛔ No server, spec or cloud edit.
    Container & model: M, mode:thread, model: default tier, effort: default
    Clause-②: no (internals of @object-ui/plugin-grid; an added export would amend this to yes (widening))
    Metadata-protocol: none
    Responsibility: a Field.summary with scale: 2 over a currency source totals without decimals in the list footer | the footer's formatting of a summary field, or the served metadata (triage: check first) | every list with a summary-field footer total (HotCRM All Invoices)
    Thread-read: 6886876432
    Premise: read at filing on 18.4.0 by HotCRM's browser pass; the dev measures first whether the served metadata carries the scale (triage 6886876432)
    Serial constraints cleared: no other pm:dispatched domain:ui card claims a file in this surface (live label read; ui seat 1's live files #33317 #33063 #33061 #33103 #33377 are disjoint); no other ui seat holds a Claim: on these files

    Scope: shared card thread with #33557 (one dev, one PR). p3. Order: /mnt/project-files/pm-orders/ui/order-33557.md. Summons: the maintainer's 「同意 给队列最深的 ui 和 spec 各再开一个座位」 (this project, 2026-11-14T22:46Z) and 「开放 p3卡认领」 (2026-11-14T21:21Z).

  4. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 15, 2026
  5. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-project-manager · session_01FEkQ5oF8GgTHN2jBZoDwz8

    Claim amendment · 2026-11-15T04:25Z · to claim 6889088903. File surface: now also takes ui/packages/plugin-grid/src/useColumnSummary.ts (formatSummaryLabel) with a new pin test beside it, and ui/packages/fields/src/index.tsx, limited to one added export, summaryDeclaresCurrency. Clause-②: becomes yes (widening) on @object-ui/fields; a contract record is owed before landing.

    Reason (dev's read on d95ddebc, live showcase GET /api/v1/meta/object/showcase_expense_report): the summary field IS served with scale: 2, so the ui half proceeds. The footer total is formatted in useColumnSummary.ts formatSummaryLabel, where a summary column falls to the plain toLocaleString default and never reads scale. The list cell already decides money by summaryDeclaresCurrency (@object-ui/fields, imported there, not exported) and else draws a number at resolveFieldScale; the footer reuses that same predicate and the existing currency / number arms, so no second formatter.

    Accepted reading of the order's "currency format when its source is currency": the spec's currencyConfig (absent on a summary = no currency) and the cell decide money by the summary's own declaration, not its source type, and the footer follows the cell. HotCRM's paid_amount (no currencyConfig, scale: 2) will read 230,000.00, matching its cell. Outside every other seat's live files (ui seat 1's #33548 edits ObjectGrid.tsx buildMobileCardRenderer; the serial hold on ObjectGrid.tsx stands). Nothing else in the claim changes.

  6. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#4 · os-project-manager · session_01FEkQ5mecqk8M5q9vjKj6aS

    Cross-card note from #33659 · 2026-11-15T07:11Z

    ⛔ Not a claim; nothing changes on this card's surface.

    PR #33710 (#33659, spec seat 4) makes ui/packages/fields/src/currency.ts#summaryDeclaresCurrency answer true for a summary declaring currencyMode: 'dynamic', which the spec admits only over a stored home-currency amount. This card's footer decides money by that same predicate, so once both PRs are on main a home-currency roll-up reaches the list footer through this card's code. The check owed after both merge, by whichever seat lands second: the footer total of such a roll-up shows the tenant (home) currency with no record (resolveFieldCurrency answers the tenant default for any non-record config). Contract review of #33710: 6890873219, section ③ (c).

  7. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-project-manager · session_01FEkQ5oF8GgTHN2jBZoDwz8

    Seat review: PR #33728 ACCEPT on head eed5643b (2026-11-15T08:37Z), for #33557 and #33542 together. K = 8, CI green; ready + auto-merge set in the same stroke. Contract record PASS 6891601341 (TIER_DEFAULT).

  8. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-project-manager · session_01FEkQ5oF8GgTHN2jBZoDwz8

    Landed · 2026-11-15T08:59Z

    reading value
    PR #33728 MERGED as f06f0640 on main (closes this card via Fixes #33542)

    State: pm:dispatched removed, assignee cleared; card closed by the merge. Shipped with #33557 in one PR (seat ACCEPT 6891785286; contract record PASS 6891601341). Reading: money follows the summary's own currencyConfig; HotCRM paid_amount totals 230,000.00.

  9. removed
    pm:dispatched
    on Nov 15, 2026
  10. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#4 · os-project-manager · session_01FEkQ5mecqk8M5q9vjKj6aS

    After-both-merge check from the cross-card note · 2026-11-15T09:51Z

    ⛔ Not a claim; the card stays closed.

    Both PRs are on main (#33710 merged 08:57:19Z, #33728 at 08:59Z). The landing record for #33728 did not take up the check the cross-card note owed, so spec seat 4 closes it. This is a code reading at origin/main a557fa38; no new test was run.

    Step Reading on main
    Footer's money decision ui/packages/plugin-grid/src/useColumnSummary.ts: colType = column?.type === 'summary' ? summaryValueType(column) : column?.type. summaryValueType answers 'currency' when summaryDeclaresCurrency(column) is true (:375). Since #33710, that is true for currencyMode: 'dynamic'.
    Currency code The 'currency' arm calls resolveFieldCurrency(column, tenantDefault) from @object-ui/i18n (:444) with no record. For any config that is not record, that function returns field.currency, then the fixed code, then defaultCurrency, then the tenant default (ui/packages/i18n/src/currency.ts:283-289). A dynamic summary carries none of the first three.
    Result The footer total of a home-currency roll-up is drawn in the tenant (home) currency with no record, which is what the note required. This matches the record face and the list cell that #33710 pinned in summaryFaces.homeRollup-33659.test.tsx.

    The footer itself has no pin for the dynamic case. If one is wanted, it belongs to the ui lane and is not owed by this card.

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

    bugdomain:uipriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions