Skip to content

Commit 57d34b7

Browse files
committed
docs(skills): a record-currency amount in a dataset measure — no currency, grouped by its code, currencyField on the column
Claude-Session: https://claude.ai/code/session_01Utp6CYWaabH6fd31U9CyS7 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1997529 commit 57d34b7

2 files changed

Lines changed: 19 additions & 6 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the dashboards guide says how a record-currency amount behaves in a dataset measure
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
⛔ Not released alone: this ships in the same release as the `currencyMode: 'record'` mode, its refusals and its per-row display (ADR-0144 D9, release R1).
11+
12+
- **`objectstack-ui/rules/dashboards.md`**: a measure over a `currencyMode: 'record'` amount refuses a measure `currency` and an ungrouped `sum` / `avg` / `min` / `max`. Grouped by the amount's code field, its result column carries `currencyField`, which names the per-row code column, and a `count` column never does.

‎skills/objectstack-ui/rules/dashboards.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,13 @@ defineDataset({
295295
dimensions: [{ name: 'signed_date', field: 'signed_date', type: 'date', dateGranularity: 'month' }],
296296
measures: [{ name: 'signed_count', aggregate: 'count' }],
297297
});
298-
// A monetary measure may declare `currency` (ISO 4217) for a locale-correct
299-
// symbol: `{ name: 'revenue', aggregate: 'sum', field: 'amount', currency: 'USD' }`.
300-
// It resolves measure `currency` → the aggregated field's
301-
// `currencyConfig.defaultCurrency` (only under `currencyMode: 'fixed'`) → the
302-
// tenant `localization.currency` (`CurrencyConfigSchema`'s `currencyMode`
303-
// describe). Omit it for non-money measures (count, avg-of-hours).
298+
// A money measure may set `currency` (ISO 4217):
299+
// `{ name: 'revenue', aggregate: 'sum', field: 'amount', currency: 'USD' }`.
300+
// Chain: measure `currency` → the field's `defaultCurrency` (`fixed`
301+
// only) → tenant `localization.currency`; omit it for counts. A
302+
// `currencyMode: 'record'` amount refuses `currency` and ungrouped
303+
// sum/avg/min/max; grouped by its code field, the column carries
304+
// `currencyField` (per-row code column); a `count` never does.
304305

305306
// The widget just selects the dimension by name:
306307
const signedByMonth: DashboardWidget = { id: 'signed_by_month', type: 'line',

0 commit comments

Comments
 (0)