@happyvertical/smrt-svelte 0.56.0 → 0.56.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/overview-surfaces.md +21 -10
- package/dist/components/overview/widgets/LineItemsWidget.svelte +48 -3
- package/dist/components/overview/widgets/LineItemsWidget.svelte.d.ts.map +1 -1
- package/dist/components/overview/widgets/data.d.ts +19 -0
- package/dist/components/overview/widgets/data.d.ts.map +1 -1
- package/dist/components/overview/widgets/line-totals.d.ts +54 -4
- package/dist/components/overview/widgets/line-totals.d.ts.map +1 -1
- package/dist/components/overview/widgets/line-totals.js +84 -18
- package/dist/components/overview/widgets/record-loaders.d.ts +3 -1
- package/dist/components/overview/widgets/record-loaders.d.ts.map +1 -1
- package/dist/components/overview/widgets/record-loaders.js +8 -1
- package/dist/components/screens/RecordScreen.svelte +2 -0
- package/dist/components/screens/RecordScreen.svelte.d.ts.map +1 -1
- package/dist/components/screens/record-header.d.ts +19 -3
- package/dist/components/screens/record-header.d.ts.map +1 -1
- package/dist/components/screens/record-header.js +9 -3
- package/dist/components/screens/types.d.ts +8 -1
- package/dist/components/screens/types.d.ts.map +1 -1
- package/dist/i18n/strings.overview.d.ts +5 -0
- package/dist/i18n/strings.overview.d.ts.map +1 -1
- package/dist/i18n/strings.overview.js +5 -0
- package/package.json +16 -16
|
@@ -277,7 +277,7 @@ parent-filter vocabulary (`model`, `field`, `filter: 'parent'`, `sort`,
|
|
|
277
277
|
| Type | Options | Data |
|
|
278
278
|
|---|---|---|
|
|
279
279
|
| `related` | `title`, `relations` (relation keys `Order-customerId`, comma-separated; empty = every `children` relation, at most 20), `limit` (5) | `{ tabs: [{ key, label, rows, total?, columns, href?, currency?, timeZone?, summaries? }] }` |
|
|
280
|
-
| `line-items` | `title`, `relation` (an `items` relation key; empty = the first), `limit` (50, the max) | `{ rows, columns, total?, totals?: { subtotal?, discount?, tax?, total? }, currency?, summaries?, href? }` |
|
|
280
|
+
| `line-items` | `title`, `relation` (an `items` relation key; empty = the first), `limit` (50, the max) | `{ rows, columns, total?, totals?: { subtotal?, discount?, tax?, total? }, storedTotals?: { subtotal, discount, tax, total, lineAmountType, roundingScope, taxes }, currency?, summaries?, href? }` |
|
|
281
281
|
|
|
282
282
|
- `related`: one tab per relation with the count in the tab ("Orders 6"),
|
|
283
283
|
each a records table with a totals footer and that tab's one "View all"
|
|
@@ -285,15 +285,26 @@ parent-filter vocabulary (`model`, `field`, `filter: 'parent'`, `sort`,
|
|
|
285
285
|
all empty is one empty state. A failing tab is dropped; all failing fails
|
|
286
286
|
the widget. Never lists `items` relations.
|
|
287
287
|
- `line-items` (the contract's `lineItems`; widget type ids are lowercase
|
|
288
|
-
kebab):
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
288
|
+
kebab): a domain host with an issued/frozen money document supplies
|
|
289
|
+
`storedTotals` through `RecordScreen.lineItemStoredTotals`; its totals and
|
|
290
|
+
per-component tax rows are displayed as persisted (with matching component
|
|
291
|
+
rows grouped), never reconstructed from the visible lines. Without that
|
|
292
|
+
optional snapshot, the widget shows the lines in `sort` order, then the
|
|
293
|
+
totals block (`lineItemTotals`, pure). The record's own subtotal /
|
|
294
|
+
discount / tax / total are authoritative and shown as they are; one it
|
|
295
|
+
lacks is computed from the lines and marked "(from the lines)"; discount
|
|
296
|
+
and tax show when present and non-zero. There is one money semantic
|
|
297
|
+
(#4010): line amounts are net of discount, or gross when the record's
|
|
298
|
+
`lineAmountType` (read by `recordTotals` when the view shows it) is
|
|
299
|
+
`inclusive`, with net = gross - tax; a record without one is `exclusive`.
|
|
300
|
+
subtotal = sum of the net lines, total = subtotal + tax, and the discount
|
|
301
|
+
is shown as "Includes discounts of" and never subtracted. An unavailable
|
|
302
|
+
tax (no field, or policy-hidden) is unknown rather than zero, so inclusive
|
|
303
|
+
lines then yield no net and no total is computed or compared from the
|
|
304
|
+
lines. When the record's subtotal (or, without one, its total) disagrees
|
|
305
|
+
with the lines, a visible flag says "Lines add up to $X." beside the
|
|
306
|
+
recorded figure — never a silent override. A partial page of lines is not
|
|
307
|
+
compared.
|
|
297
308
|
- Tests: `__tests__/record-table.test.ts`, `__tests__/record-widgets.test.ts`,
|
|
298
309
|
`__tests__/line-items.test.ts` (axe on both components), the records cases
|
|
299
310
|
in `__tests__/widgets.test.ts`.
|
|
@@ -12,7 +12,12 @@ import { M } from '../../../i18n/strings.overview.js';
|
|
|
12
12
|
import { safeHref } from '../markdown.js';
|
|
13
13
|
import type { WidgetComponentProps } from '../types.js';
|
|
14
14
|
import { isRecord, type LineItemsWidgetData } from './data.js';
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
groupStoredTaxComponents,
|
|
17
|
+
isStoredLineItemsTotals,
|
|
18
|
+
lineItemTotals,
|
|
19
|
+
sumLineAmounts,
|
|
20
|
+
} from './line-totals.js';
|
|
16
21
|
import RecordTable from './RecordTable.svelte';
|
|
17
22
|
import {
|
|
18
23
|
formatRecordCell,
|
|
@@ -70,6 +75,19 @@ const result = $derived(
|
|
|
70
75
|
lineSum,
|
|
71
76
|
),
|
|
72
77
|
);
|
|
78
|
+
const storedTotals = $derived(
|
|
79
|
+
isRecord(data) && isStoredLineItemsTotals(data.storedTotals)
|
|
80
|
+
? data.storedTotals
|
|
81
|
+
: undefined,
|
|
82
|
+
);
|
|
83
|
+
const storedTaxes = $derived(
|
|
84
|
+
storedTotals
|
|
85
|
+
? groupStoredTaxComponents(storedTotals.taxes).filter(
|
|
86
|
+
(tax) => tax.tax !== 0,
|
|
87
|
+
)
|
|
88
|
+
: [],
|
|
89
|
+
);
|
|
90
|
+
const hasStoredTax = $derived(storedTaxes.length > 0);
|
|
73
91
|
const viewAll = $derived(
|
|
74
92
|
isRecord(data) && typeof data.href === 'string' ? safeHref(data.href) : null,
|
|
75
93
|
);
|
|
@@ -101,9 +119,34 @@ const LABELS = {
|
|
|
101
119
|
{:else}
|
|
102
120
|
<p class="smrt-line-items__empty">{t(M['ui.overview.line_items.empty'])}</p>
|
|
103
121
|
{/if}
|
|
104
|
-
{#if
|
|
122
|
+
{#if storedTotals}
|
|
123
|
+
<dl class="smrt-line-items__totals" data-money-snapshot="stored">
|
|
124
|
+
{#if storedTotals.lineAmountType !== 'inclusive' || !hasStoredTax}
|
|
125
|
+
<div class="smrt-line-items__total"><dt>{t(M['ui.overview.line_items.subtotal'])}</dt><dd>{money(storedTotals.subtotal)}</dd></div>
|
|
126
|
+
{/if}
|
|
127
|
+
{#if storedTotals.discount !== 0}
|
|
128
|
+
<div class="smrt-line-items__total smrt-line-items__total--muted"><dt>{t(M['ui.overview.line_items.discount_included'])} {money(Math.abs(storedTotals.discount))}</dt></div>
|
|
129
|
+
{/if}
|
|
130
|
+
{#each storedTaxes as tax (`${tax.taxComponentId}-${tax.name}-${tax.percent}`)}
|
|
131
|
+
<div class="smrt-line-items__total smrt-line-items__total--muted">
|
|
132
|
+
<dt>{t(M[storedTotals.lineAmountType === 'inclusive' ? 'ui.overview.line_items.tax_included' : 'ui.overview.line_items.tax_on'], { name: tax.name, percent: tax.percent })} {money(storedTotals.lineAmountType === 'inclusive' ? tax.tax : tax.taxable)}</dt>
|
|
133
|
+
{#if storedTotals.lineAmountType !== 'inclusive'}<dd>{money(tax.tax)}</dd>{/if}
|
|
134
|
+
</div>
|
|
135
|
+
{/each}
|
|
136
|
+
{#if storedTotals.roundingScope === 'document'}
|
|
137
|
+
<div class="smrt-line-items__total smrt-line-items__total--muted"><dt>{t(M['ui.overview.line_items.rounded_document'])}</dt></div>
|
|
138
|
+
{/if}
|
|
139
|
+
<div class="smrt-line-items__total smrt-line-items__total--grand"><dt>{t(M['ui.overview.line_items.total'])}</dt><dd>{money(storedTotals.total)}</dd></div>
|
|
140
|
+
{#if storedTotals.lineAmountType === 'inclusive' && hasStoredTax && storedTotals.showNetSubtotal}
|
|
141
|
+
<div class="smrt-line-items__total"><dt>{t(M['ui.overview.line_items.subtotal_excluding_tax'])}</dt><dd>{money(storedTotals.subtotal)}</dd></div>
|
|
142
|
+
{/if}
|
|
143
|
+
</dl>
|
|
144
|
+
{:else if result.lines.length > 0}
|
|
105
145
|
<dl class="smrt-line-items__totals">
|
|
106
146
|
{#each result.lines as line (line.key)}
|
|
147
|
+
{#if line.included}
|
|
148
|
+
<div class="smrt-line-items__total smrt-line-items__total--muted"><dt>{t(M['ui.overview.line_items.discount_included'])} {money(Math.abs(line.value))}</dt></div>
|
|
149
|
+
{:else}
|
|
107
150
|
<div class="smrt-line-items__total" class:smrt-line-items__total--grand={line.key === 'total'}>
|
|
108
151
|
<dt>
|
|
109
152
|
{t(LABELS[line.key])}
|
|
@@ -111,10 +154,11 @@ const LABELS = {
|
|
|
111
154
|
</dt>
|
|
112
155
|
<dd>{line.key === 'discount' ? `−${money(line.value)}` : money(line.value)}</dd>
|
|
113
156
|
</div>
|
|
157
|
+
{/if}
|
|
114
158
|
{/each}
|
|
115
159
|
</dl>
|
|
116
160
|
{/if}
|
|
117
|
-
{#if result.mismatch}
|
|
161
|
+
{#if !storedTotals && result.mismatch}
|
|
118
162
|
<p class="smrt-line-items__flag">
|
|
119
163
|
<strong>{t(M['ui.overview.line_items.mismatch'], { amount: money(result.mismatch.lines) })}</strong>
|
|
120
164
|
{t(M[result.mismatch.field === 'subtotal' ? 'ui.overview.line_items.mismatch_subtotal' : 'ui.overview.line_items.mismatch_total'], { amount: money(result.mismatch.recorded) })}
|
|
@@ -133,6 +177,7 @@ const LABELS = {
|
|
|
133
177
|
.smrt-line-items__totals { display: grid; justify-self: end; gap: var(--smrt-spacing-1); min-inline-size: min(100%, 18rem); margin: 0; font-variant-numeric: tabular-nums; }
|
|
134
178
|
.smrt-line-items__total { display: flex; justify-content: space-between; gap: var(--smrt-spacing-4); }
|
|
135
179
|
.smrt-line-items__total dt { color: var(--smrt-color-on-surface-variant); }
|
|
180
|
+
.smrt-line-items__total--muted { color: var(--smrt-color-on-surface-variant); font-size: var(--smrt-typography-body-small-size); }
|
|
136
181
|
.smrt-line-items__total dd { margin: 0; text-align: end; }
|
|
137
182
|
.smrt-line-items__total--grand { padding-block-start: var(--smrt-spacing-2); border-block-start: var(--smrt-hairline); font-weight: var(--smrt-typography-weight-semibold); }
|
|
138
183
|
.smrt-line-items__total--grand dt { color: var(--smrt-color-on-surface); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineItemsWidget.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/overview/widgets/LineItemsWidget.svelte.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAY,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"LineItemsWidget.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/overview/widgets/LineItemsWidget.svelte.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAY,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAoK/D,QAAA,MAAM,eAAe,+EAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -129,6 +129,25 @@ export interface LineItemsWidgetData {
|
|
|
129
129
|
discount?: number | null;
|
|
130
130
|
tax?: number | null;
|
|
131
131
|
total?: number | null;
|
|
132
|
+
/** How the lines treat tax; absent means `exclusive`. */
|
|
133
|
+
lineAmountType?: 'exclusive' | 'inclusive' | 'none' | null;
|
|
134
|
+
};
|
|
135
|
+
/** Frozen document-money snapshot supplied by a domain host. */
|
|
136
|
+
storedTotals?: {
|
|
137
|
+
subtotal: number;
|
|
138
|
+
discount: number;
|
|
139
|
+
tax: number;
|
|
140
|
+
total: number;
|
|
141
|
+
lineAmountType: 'exclusive' | 'inclusive' | 'none';
|
|
142
|
+
roundingScope: 'line' | 'document';
|
|
143
|
+
showNetSubtotal?: boolean;
|
|
144
|
+
taxes: readonly {
|
|
145
|
+
taxComponentId: string;
|
|
146
|
+
name: string;
|
|
147
|
+
percent: string;
|
|
148
|
+
taxable: number;
|
|
149
|
+
tax: number;
|
|
150
|
+
}[];
|
|
132
151
|
};
|
|
133
152
|
currency?: string;
|
|
134
153
|
/** Footer values over every line (money in minor units). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/components/overview/widgets/data.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGtD,oEAAoE;AACpE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,qFAAqF;AACrF,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC3C,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,mDAAmD;AACnD,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GAC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AE,CAAC;CACL;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,SAAS,kBAAkB,EAAE,EACvC,SAAS,CAAC,EAAE,MAAM,GACjB,mBAAmB,CAoBrB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE"}
|
|
@@ -2,26 +2,76 @@
|
|
|
2
2
|
* The totals block of a document's line items (#3718 record page), pure and
|
|
3
3
|
* Node-tested. The record's own subtotal / discount / tax / total are
|
|
4
4
|
* authoritative and shown as they are; a missing one is computed from the
|
|
5
|
-
* lines
|
|
6
|
-
* Lines
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* lines. When the record's figures disagree with the lines, the block flags
|
|
6
|
+
* it ("Lines add up to $X") instead of silently overriding either side.
|
|
7
|
+
*
|
|
8
|
+
* One money semantic (#4010), smrt-commerce's document money: line amounts
|
|
9
|
+
* are net of discount, or gross (tax included) when the record's
|
|
10
|
+
* `lineAmountType` is `inclusive`, where net = gross - tax. A record without
|
|
11
|
+
* a `lineAmountType` is `exclusive`. subtotal = sum of the net lines,
|
|
12
|
+
* total = subtotal + tax, and the discount is already inside the lines: it
|
|
13
|
+
* is shown as included and never subtracted. An unavailable tax (no field,
|
|
14
|
+
* or one the policy hides) is unknown, never zero, so no figure that needs
|
|
15
|
+
* it is computed or compared from the lines.
|
|
9
16
|
*
|
|
10
17
|
* Money is integer minor units throughout.
|
|
11
18
|
*/
|
|
19
|
+
/** How a document's line amounts treat tax (smrt-commerce `lineAmountType`). */
|
|
20
|
+
export type LineAmountType = 'exclusive' | 'inclusive' | 'none';
|
|
12
21
|
/** The record's own totals fields (`subtotal` / `discount` / `tax` / `total` roles). */
|
|
13
22
|
export interface LineItemsTotals {
|
|
14
23
|
subtotal?: number | null;
|
|
15
24
|
discount?: number | null;
|
|
16
25
|
tax?: number | null;
|
|
17
26
|
total?: number | null;
|
|
27
|
+
/** The record's `lineAmountType`; absent means `exclusive`. */
|
|
28
|
+
lineAmountType?: LineAmountType | null;
|
|
29
|
+
}
|
|
30
|
+
/** Whether `value` is a `lineAmountType` the totals block understands. */
|
|
31
|
+
export declare function isLineAmountType(value: unknown): value is LineAmountType;
|
|
32
|
+
/** A frozen per-component tax row supplied by a domain host. */
|
|
33
|
+
export interface StoredTaxComponent {
|
|
34
|
+
taxComponentId: string;
|
|
35
|
+
name: string;
|
|
36
|
+
percent: string;
|
|
37
|
+
taxable: number;
|
|
38
|
+
tax: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Authoritative document-money snapshot supplied by a domain host. The widget
|
|
42
|
+
* displays these persisted values only: it never derives tax or totals from
|
|
43
|
+
* the visible line page.
|
|
44
|
+
*/
|
|
45
|
+
export interface StoredLineItemsTotals extends LineItemsTotals {
|
|
46
|
+
subtotal: number;
|
|
47
|
+
discount: number;
|
|
48
|
+
tax: number;
|
|
49
|
+
total: number;
|
|
50
|
+
lineAmountType: LineAmountType;
|
|
51
|
+
roundingScope: 'line' | 'document';
|
|
52
|
+
/** Whether an inclusive taxed document should expose its net subtotal. */
|
|
53
|
+
showNetSubtotal?: boolean;
|
|
54
|
+
taxes: readonly StoredTaxComponent[];
|
|
55
|
+
}
|
|
56
|
+
/** A persisted component can occur through more than one tax code. */
|
|
57
|
+
export interface StoredTaxComponentGroup extends StoredTaxComponent {
|
|
18
58
|
}
|
|
59
|
+
/** Whether untrusted widget data is a complete persisted money snapshot. */
|
|
60
|
+
export declare function isStoredLineItemsTotals(value: unknown): value is StoredLineItemsTotals;
|
|
61
|
+
/**
|
|
62
|
+
* Group exact persisted rows only when they identify the same component,
|
|
63
|
+
* display name, and percent. Components sharing a display label/rate remain
|
|
64
|
+
* separate; this does not calculate or reallocate tax.
|
|
65
|
+
*/
|
|
66
|
+
export declare function groupStoredTaxComponents(taxes: readonly StoredTaxComponent[]): StoredTaxComponentGroup[];
|
|
19
67
|
export type LineTotalKey = 'subtotal' | 'discount' | 'tax' | 'total';
|
|
20
68
|
export interface LineTotalLine {
|
|
21
69
|
key: LineTotalKey;
|
|
22
70
|
value: number;
|
|
23
71
|
/** Computed here (the record has no such field or value), not read from the record. */
|
|
24
72
|
computed: boolean;
|
|
73
|
+
/** Already inside the subtotal (the discount): shown, not subtracted. */
|
|
74
|
+
included?: boolean;
|
|
25
75
|
}
|
|
26
76
|
export interface LineTotalsMismatch {
|
|
27
77
|
/** The record figure the lines disagree with. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-totals.d.ts","sourceRoot":"","sources":["../../../../src/components/overview/widgets/line-totals.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"line-totals.d.ts","sourceRoot":"","sources":["../../../../src/components/overview/widgets/line-totals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,gFAAgF;AAChF,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,WAAW,GAAG,MAAM,CAAC;AAEhE,wFAAwF;AACxF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,+DAA+D;IAC/D,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CACxC;AAED,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE;AAED,gEAAgE;AAChE,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb;A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AAC;CACrC;AAQD,yFAAyF;AACzF,wBAAgB,cAAc,CAAC,OAAO,EAAE,SAAS,OAAO,EAAE,GAAG,MAAM,GAAG,IAAI,CAUzE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,eAAe,GAAG,SAAS,EACnC,OAAO,EAAE,MAAM,GAAG,IAAI,GACrB,gBAAgB,CAwElB"}
|
|
@@ -2,13 +2,67 @@
|
|
|
2
2
|
* The totals block of a document's line items (#3718 record page), pure and
|
|
3
3
|
* Node-tested. The record's own subtotal / discount / tax / total are
|
|
4
4
|
* authoritative and shown as they are; a missing one is computed from the
|
|
5
|
-
* lines
|
|
6
|
-
* Lines
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* lines. When the record's figures disagree with the lines, the block flags
|
|
6
|
+
* it ("Lines add up to $X") instead of silently overriding either side.
|
|
7
|
+
*
|
|
8
|
+
* One money semantic (#4010), smrt-commerce's document money: line amounts
|
|
9
|
+
* are net of discount, or gross (tax included) when the record's
|
|
10
|
+
* `lineAmountType` is `inclusive`, where net = gross - tax. A record without
|
|
11
|
+
* a `lineAmountType` is `exclusive`. subtotal = sum of the net lines,
|
|
12
|
+
* total = subtotal + tax, and the discount is already inside the lines: it
|
|
13
|
+
* is shown as included and never subtracted. An unavailable tax (no field,
|
|
14
|
+
* or one the policy hides) is unknown, never zero, so no figure that needs
|
|
15
|
+
* it is computed or compared from the lines.
|
|
9
16
|
*
|
|
10
17
|
* Money is integer minor units throughout.
|
|
11
18
|
*/
|
|
19
|
+
/** Whether `value` is a `lineAmountType` the totals block understands. */
|
|
20
|
+
export function isLineAmountType(value) {
|
|
21
|
+
return value === 'exclusive' || value === 'inclusive' || value === 'none';
|
|
22
|
+
}
|
|
23
|
+
/** Whether untrusted widget data is a complete persisted money snapshot. */
|
|
24
|
+
export function isStoredLineItemsTotals(value) {
|
|
25
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
26
|
+
return false;
|
|
27
|
+
const record = value;
|
|
28
|
+
return (isLineAmountType(record.lineAmountType) &&
|
|
29
|
+
(record.roundingScope === 'line' || record.roundingScope === 'document') &&
|
|
30
|
+
Number.isSafeInteger(record.subtotal) &&
|
|
31
|
+
Number.isSafeInteger(record.discount) &&
|
|
32
|
+
Number.isSafeInteger(record.tax) &&
|
|
33
|
+
Number.isSafeInteger(record.total) &&
|
|
34
|
+
Array.isArray(record.taxes));
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Group exact persisted rows only when they identify the same component,
|
|
38
|
+
* display name, and percent. Components sharing a display label/rate remain
|
|
39
|
+
* separate; this does not calculate or reallocate tax.
|
|
40
|
+
*/
|
|
41
|
+
export function groupStoredTaxComponents(taxes) {
|
|
42
|
+
const groups = new Map();
|
|
43
|
+
for (const tax of taxes) {
|
|
44
|
+
if (!tax ||
|
|
45
|
+
typeof tax.taxComponentId !== 'string' ||
|
|
46
|
+
typeof tax.name !== 'string' ||
|
|
47
|
+
typeof tax.percent !== 'string' ||
|
|
48
|
+
!Number.isSafeInteger(tax.taxable) ||
|
|
49
|
+
!Number.isSafeInteger(tax.tax))
|
|
50
|
+
continue;
|
|
51
|
+
const key = `${tax.taxComponentId}\u0000${tax.name}\u0000${tax.percent}`;
|
|
52
|
+
const existing = groups.get(key);
|
|
53
|
+
if (!existing) {
|
|
54
|
+
groups.set(key, { ...tax });
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
const taxable = existing.taxable + tax.taxable;
|
|
58
|
+
const amount = existing.tax + tax.tax;
|
|
59
|
+
if (!Number.isSafeInteger(taxable) || !Number.isSafeInteger(amount))
|
|
60
|
+
continue;
|
|
61
|
+
existing.taxable = taxable;
|
|
62
|
+
existing.tax = amount;
|
|
63
|
+
}
|
|
64
|
+
return [...groups.values()];
|
|
65
|
+
}
|
|
12
66
|
function money(value) {
|
|
13
67
|
return typeof value === 'number' && Number.isSafeInteger(value)
|
|
14
68
|
? value
|
|
@@ -34,17 +88,22 @@ export function sumLineAmounts(amounts) {
|
|
|
34
88
|
* (`null` when the lines are a partial page and the host sent no sum).
|
|
35
89
|
*/
|
|
36
90
|
export function lineItemTotals(record, lineSum) {
|
|
91
|
+
const inclusive = record?.lineAmountType === 'inclusive';
|
|
37
92
|
const subtotalRecorded = money(record?.subtotal);
|
|
38
93
|
const discount = money(record?.discount);
|
|
39
94
|
const tax = money(record?.tax);
|
|
40
95
|
const totalRecorded = money(record?.total);
|
|
41
96
|
const lines = [];
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
97
|
+
// Inclusive lines are gross: net = gross - tax. Without the tax there is
|
|
98
|
+
// no net to derive from them.
|
|
99
|
+
const netFromLines = lineSum === null
|
|
100
|
+
? null
|
|
101
|
+
: inclusive
|
|
102
|
+
? tax === null
|
|
103
|
+
? null
|
|
104
|
+
: lineSum - tax
|
|
105
|
+
: lineSum;
|
|
106
|
+
const subtotal = subtotalRecorded ?? netFromLines;
|
|
48
107
|
if (subtotal !== null) {
|
|
49
108
|
lines.push({
|
|
50
109
|
key: 'subtotal',
|
|
@@ -53,13 +112,18 @@ export function lineItemTotals(record, lineSum) {
|
|
|
53
112
|
});
|
|
54
113
|
}
|
|
55
114
|
if (discount !== null && discount !== 0) {
|
|
56
|
-
lines.push({
|
|
115
|
+
lines.push({
|
|
116
|
+
key: 'discount',
|
|
117
|
+
value: discount,
|
|
118
|
+
computed: false,
|
|
119
|
+
included: true,
|
|
120
|
+
});
|
|
57
121
|
}
|
|
58
122
|
if (tax !== null && tax !== 0) {
|
|
59
123
|
lines.push({ key: 'tax', value: tax, computed: false });
|
|
60
124
|
}
|
|
61
|
-
const
|
|
62
|
-
|
|
125
|
+
const total = totalRecorded ??
|
|
126
|
+
(subtotal === null || tax === null ? null : subtotal + tax);
|
|
63
127
|
if (total !== null) {
|
|
64
128
|
lines.push({
|
|
65
129
|
key: 'total',
|
|
@@ -68,16 +132,18 @@ export function lineItemTotals(record, lineSum) {
|
|
|
68
132
|
});
|
|
69
133
|
}
|
|
70
134
|
let mismatch = null;
|
|
71
|
-
if (
|
|
72
|
-
if (subtotalRecorded !== null && subtotalRecorded !==
|
|
135
|
+
if (netFromLines !== null) {
|
|
136
|
+
if (subtotalRecorded !== null && subtotalRecorded !== netFromLines) {
|
|
73
137
|
mismatch = {
|
|
74
138
|
field: 'subtotal',
|
|
75
139
|
recorded: subtotalRecorded,
|
|
76
|
-
lines:
|
|
140
|
+
lines: netFromLines,
|
|
77
141
|
};
|
|
78
142
|
}
|
|
79
|
-
else if (subtotalRecorded === null &&
|
|
80
|
-
|
|
143
|
+
else if (subtotalRecorded === null &&
|
|
144
|
+
totalRecorded !== null &&
|
|
145
|
+
tax !== null) {
|
|
146
|
+
const fromLines = netFromLines + tax;
|
|
81
147
|
if (fromLines !== totalRecorded) {
|
|
82
148
|
mismatch = {
|
|
83
149
|
field: 'total',
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import type { ScreenRelation } from '../../screens/relations.js';
|
|
19
19
|
import type { OverviewOptions, WidgetLoad } from '../types.js';
|
|
20
20
|
import { type LineItemsWidgetData, type RecordListWidgetData, type RelatedWidgetData } from './data.js';
|
|
21
|
-
import type { LineItemsTotals } from './line-totals.js';
|
|
21
|
+
import type { LineItemsTotals, StoredLineItemsTotals } from './line-totals.js';
|
|
22
22
|
/** Rows per tab by default. */
|
|
23
23
|
export declare const RELATED_WIDGET_LIMIT = 5;
|
|
24
24
|
/** At most this many relations (tabs) one `related` widget lists. */
|
|
@@ -35,6 +35,8 @@ export interface RecordWidgetsOptions {
|
|
|
35
35
|
* (read when the widget loads; `RecordScreen` reads them by role).
|
|
36
36
|
*/
|
|
37
37
|
totals?: () => LineItemsTotals | undefined;
|
|
38
|
+
/** Frozen document-money snapshot. It is rendered without recalculation. */
|
|
39
|
+
storedTotals?: () => StoredLineItemsTotals | undefined;
|
|
38
40
|
/** `line-items`: the currency of the parent's amounts. */
|
|
39
41
|
currency?: () => string | undefined;
|
|
40
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-loaders.d.ts","sourceRoot":"","sources":["../../../../src/components/overview/widgets/record-loaders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EAEX,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EAEvB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"record-loaders.d.ts","sourceRoot":"","sources":["../../../../src/components/overview/widgets/record-loaders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EAEX,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EAEvB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAQ/E,+BAA+B;AAC/B,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,qEAAqE;AACrE,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;IACrC,+EAA+E;IAC/E,OAAO,EAAE,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC1C,8DAA8D;IAC9D,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,MAAM,GAAG,SAAS,CAAC;IAC/D;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,eAAe,GAAG,SAAS,CAAC;IAC3C,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,qBAAqB,GAAG,SAAS,CAAC;IACvD,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;CACrC;AAED,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,6FAA6F;AAC7F,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,cAAc,EAAE,EACpC,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,cAAc,EAAE,CAMlB;AAED,uDAAuD;AACvD,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,cAAc,EACxB,KAAK,EAAE,MAAM,GACZ,eAAe,CAWjB;AA2CD;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,oBAAoB,GAC5B,UAAU,CAAC,iBAAiB,CAAC,CAkC/B;AAED,uFAAuF;AACvF,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,cAAc,EAAE,EACpC,GAAG,EAAE,OAAO,GACX,cAAc,GAAG,SAAS,CAM5B;AAED,6DAA6D;AAC7D,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,cAAc,EACxB,KAAK,EAAE,MAAM,GACZ,eAAe,CAWjB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,oBAAoB,GAC5B,UAAU,CAAC,mBAAmB,CAAC,CAoCjC"}
|
|
@@ -126,9 +126,15 @@ export function createLineItemsLoader(options) {
|
|
|
126
126
|
return async (widgetOptions, ctx) => {
|
|
127
127
|
const relation = lineItemsRelation(options.relations, widgetOptions.relation);
|
|
128
128
|
const totals = options.totals?.();
|
|
129
|
+
const storedTotals = options.storedTotals?.();
|
|
129
130
|
const currency = options.currency?.();
|
|
130
131
|
if (!relation) {
|
|
131
|
-
return {
|
|
132
|
+
return {
|
|
133
|
+
rows: [],
|
|
134
|
+
columns: [],
|
|
135
|
+
...(totals ? { totals } : {}),
|
|
136
|
+
...(storedTotals ? { storedTotals } : {}),
|
|
137
|
+
};
|
|
132
138
|
}
|
|
133
139
|
const limit = typeof widgetOptions.limit === 'number'
|
|
134
140
|
? widgetOptions.limit
|
|
@@ -140,6 +146,7 @@ export function createLineItemsLoader(options) {
|
|
|
140
146
|
columns: tab.columns,
|
|
141
147
|
...(tab.total !== undefined ? { total: tab.total } : {}),
|
|
142
148
|
...(totals ? { totals } : {}),
|
|
149
|
+
...(storedTotals ? { storedTotals } : {}),
|
|
143
150
|
...((tab.currency ?? currency)
|
|
144
151
|
? { currency: tab.currency ?? currency }
|
|
145
152
|
: {}),
|
|
@@ -74,6 +74,7 @@ let {
|
|
|
74
74
|
title,
|
|
75
75
|
fields,
|
|
76
76
|
currency,
|
|
77
|
+
lineItemStoredTotals,
|
|
77
78
|
locale,
|
|
78
79
|
backLabel,
|
|
79
80
|
deleting = false,
|
|
@@ -152,6 +153,7 @@ const widgetRegistry = untrack(() => {
|
|
|
152
153
|
records,
|
|
153
154
|
viewAllHref: (relation) => viewAllHref?.(relation),
|
|
154
155
|
totals: () => recordTotals(record, roles, viewFields),
|
|
156
|
+
storedTotals: () => lineItemStoredTotals?.(),
|
|
155
157
|
currency: () => recordCurrency,
|
|
156
158
|
});
|
|
157
159
|
for (const def of recordWidgets.list()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordScreen.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/screens/RecordScreen.svelte.ts"],"names":[],"mappings":"AAwDA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"RecordScreen.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/screens/RecordScreen.svelte.ts"],"names":[],"mappings":"AAwDA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAoVpD,QAAA,MAAM,YAAY,uDAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The record page header (#3718 record page), pure and Node-tested: the
|
|
3
|
+
* heading, the monospace identifier, the status and two to four key facts,
|
|
4
|
+
* all read by role from the fields the screen may show (so a field the
|
|
5
|
+
* policy omits can never reach the header).
|
|
6
|
+
*
|
|
7
|
+
* - Heading: the `title` prop, else a document's kind and identifier
|
|
8
|
+
* ("Order GRA-3159", never the customer), else the title-role field, else
|
|
9
|
+
* the identifier, else the class name.
|
|
10
|
+
* - Facts, in order: the party (a link), the lead date, the total money (the
|
|
11
|
+
* `total` role, else the first money field), then a contact (email, then
|
|
12
|
+
* phone) while there is room. Empty values are skipped.
|
|
13
|
+
*/
|
|
14
|
+
import { type LineAmountType } from '../overview/widgets/line-totals.js';
|
|
1
15
|
import { type ScreenFieldRoles } from './roles.js';
|
|
2
16
|
import type { ScreenCollectionDefinition, ScreenField, ScreenRecord } from './types.js';
|
|
3
17
|
export type RecordFactKind = 'party' | 'date' | 'money' | 'contact';
|
|
@@ -34,9 +48,10 @@ export declare function deriveRecordHeader(definition: ScreenCollectionDefinitio
|
|
|
34
48
|
}): RecordHeaderModel;
|
|
35
49
|
/**
|
|
36
50
|
* The record's own totals, read by role (`subtotal`, `discount`, `tax`,
|
|
37
|
-
* `total`): what the line-items totals block shows as authoritative
|
|
38
|
-
* `
|
|
39
|
-
*
|
|
51
|
+
* `total`): what the line-items totals block shows as authoritative, plus
|
|
52
|
+
* the record's `lineAmountType` when it has a valid one, which tells the
|
|
53
|
+
* block whether the lines are gross (#4010). With `visible` (the
|
|
54
|
+
* policy-filtered view fields), a field the policy omits is never read.
|
|
40
55
|
*/
|
|
41
56
|
export declare function recordTotals(record: ScreenRecord, roles: ScreenFieldRoles, visible?: readonly {
|
|
42
57
|
name: string;
|
|
@@ -45,6 +60,7 @@ export declare function recordTotals(record: ScreenRecord, roles: ScreenFieldRol
|
|
|
45
60
|
discount?: number | null;
|
|
46
61
|
tax?: number | null;
|
|
47
62
|
total?: number | null;
|
|
63
|
+
lineAmountType?: LineAmountType;
|
|
48
64
|
};
|
|
49
65
|
/** Fields holding a totals role (`subtotal` / `discount` / `tax` / `total`). */
|
|
50
66
|
export declare function totalsFields(roles: ScreenFieldRoles): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-header.d.ts","sourceRoot":"","sources":["../../../src/components/screens/record-header.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"record-header.d.ts","sourceRoot":"","sources":["../../../src/components/screens/record-header.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,KAAK,EACV,0BAA0B,EAC1B,WAAW,EACX,YAAY,EACb,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEpE,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,WAAW,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,qFAAqF;IACrF,iBAAiB,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE;QAAE,KAAK,EAAE,WAAW,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACnD,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,WAAW,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,iEAAiE;IACjE,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,kCAAkC;AAClC,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAYzC;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,0BAA0B,EACtC,MAAM,EAAE,SAAS,WAAW,EAAE,EAC9B,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,gBAAgB,EACvB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GAClD,iBAAiB,CAyEnB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,gBAAgB,EACvB,OAAO,CAAC,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,GACpC;IACD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CA0BA;AAED,gFAAgF;AAChF,wBAAgB,YAAY,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAM9D"}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* `total` role, else the first money field), then a contact (email, then
|
|
12
12
|
* phone) while there is room. Empty values are skipped.
|
|
13
13
|
*/
|
|
14
|
+
import { isLineAmountType, } from '../overview/widgets/line-totals.js';
|
|
14
15
|
import { screenTitles } from './fields.js';
|
|
15
16
|
import { isDocumentLike } from './roles.js';
|
|
16
17
|
/** Most key facts in a header. */
|
|
@@ -95,9 +96,10 @@ export function deriveRecordHeader(definition, fields, record, roles, options =
|
|
|
95
96
|
}
|
|
96
97
|
/**
|
|
97
98
|
* The record's own totals, read by role (`subtotal`, `discount`, `tax`,
|
|
98
|
-
* `total`): what the line-items totals block shows as authoritative
|
|
99
|
-
* `
|
|
100
|
-
*
|
|
99
|
+
* `total`): what the line-items totals block shows as authoritative, plus
|
|
100
|
+
* the record's `lineAmountType` when it has a valid one, which tells the
|
|
101
|
+
* block whether the lines are gross (#4010). With `visible` (the
|
|
102
|
+
* policy-filtered view fields), a field the policy omits is never read.
|
|
101
103
|
*/
|
|
102
104
|
export function recordTotals(record, roles, visible) {
|
|
103
105
|
const out = {};
|
|
@@ -110,6 +112,10 @@ export function recordTotals(record, roles, visible) {
|
|
|
110
112
|
out[role] =
|
|
111
113
|
typeof value === 'number' && Number.isSafeInteger(value) ? value : null;
|
|
112
114
|
}
|
|
115
|
+
if (isLineAmountType(record.lineAmountType) &&
|
|
116
|
+
(!visible || visible.some((f) => f.name === 'lineAmountType'))) {
|
|
117
|
+
out.lineAmountType = record.lineAmountType;
|
|
118
|
+
}
|
|
113
119
|
return out;
|
|
114
120
|
}
|
|
115
121
|
/** Fields holding a totals role (`subtotal` / `discount` / `tax` / `total`). */
|
|
@@ -3,6 +3,7 @@ import type { WidgetRegistry } from '../overview/registry.js';
|
|
|
3
3
|
import type { OverviewDefinition, OverviewOverride, WidgetLoadContext } from '../overview/types.js';
|
|
4
4
|
import type { CoreWidgetLoaders } from '../overview/widgets/core.js';
|
|
5
5
|
import type { RecordStatusTone } from '../overview/widgets/data.js';
|
|
6
|
+
import type { StoredLineItemsTotals } from '../overview/widgets/line-totals.js';
|
|
6
7
|
import type { ScreenRelation } from './relations.js';
|
|
7
8
|
import type { FieldRole } from './roles.js';
|
|
8
9
|
/**
|
|
@@ -317,6 +318,12 @@ export interface RecordScreenProps {
|
|
|
317
318
|
fields?: readonly string[];
|
|
318
319
|
/** ISO 4217 code used by money fields. */
|
|
319
320
|
currency?: string;
|
|
321
|
+
/**
|
|
322
|
+
* Frozen document-money snapshot for the line-items widget. The host reads
|
|
323
|
+
* its own persisted rows (including per-component tax); this screen never
|
|
324
|
+
* recalculates them from visible lines.
|
|
325
|
+
*/
|
|
326
|
+
lineItemStoredTotals?: () => StoredLineItemsTotals | undefined;
|
|
320
327
|
/** BCP-47 locale for number and date formatting. */
|
|
321
328
|
locale?: string;
|
|
322
329
|
/** Label for the back action; defaults to the pluralized class name. */
|
|
@@ -391,6 +398,6 @@ export interface RecipeScreensProps {
|
|
|
391
398
|
*/
|
|
392
399
|
definitions?: Readonly<Record<string, ScreenCollectionDefinition>>;
|
|
393
400
|
/** Passed to `RecordScreen` for the record view and edit. */
|
|
394
|
-
record?: Pick<RecordScreenProps, 'loaders' | 'registry' | 'widgetContext' | 'overview' | 'override' | 'onoverviewchange' | 'layoutEditing' | 'canCustomize' | 'hrefFor' | 'labels' | 'viewAllHref' | 'statusTones'>;
|
|
401
|
+
record?: Pick<RecordScreenProps, 'loaders' | 'registry' | 'widgetContext' | 'overview' | 'override' | 'onoverviewchange' | 'layoutEditing' | 'canCustomize' | 'hrefFor' | 'labels' | 'viewAllHref' | 'lineItemStoredTotals' | 'statusTones'>;
|
|
395
402
|
}
|
|
396
403
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/screens/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;;;;GAQG;AAEH,wE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AAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,GAAG,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC/D,mEAAmE;IACnE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACvE;;;OAGG;IACH,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC,CAAC;IACnE,6DAA6D;IAC7D,MAAM,CAAC,EAAE,IAAI,CACX,iBAAiB,EACf,SAAS,GACT,UAAU,GACV,eAAe,GACf,UAAU,GACV,UAAU,GACV,kBAAkB,GAClB,eAAe,GACf,cAAc,GACd,SAAS,GACT,QAAQ,GACR,aAAa,GACb,sBAAsB,GACtB,aAAa,CAChB,CAAC;CACH"}
|
|
@@ -125,6 +125,11 @@ export declare const M: {
|
|
|
125
125
|
readonly 'ui.overview.line_items.discount': "ui.overview.line_items.discount";
|
|
126
126
|
readonly 'ui.overview.line_items.tax': "ui.overview.line_items.tax";
|
|
127
127
|
readonly 'ui.overview.line_items.total': "ui.overview.line_items.total";
|
|
128
|
+
readonly 'ui.overview.line_items.subtotal_excluding_tax': "ui.overview.line_items.subtotal_excluding_tax";
|
|
129
|
+
readonly 'ui.overview.line_items.discount_included': "ui.overview.line_items.discount_included";
|
|
130
|
+
readonly 'ui.overview.line_items.tax_on': "ui.overview.line_items.tax_on";
|
|
131
|
+
readonly 'ui.overview.line_items.tax_included': "ui.overview.line_items.tax_included";
|
|
132
|
+
readonly 'ui.overview.line_items.rounded_document': "ui.overview.line_items.rounded_document";
|
|
128
133
|
readonly 'ui.overview.line_items.computed': "ui.overview.line_items.computed";
|
|
129
134
|
readonly 'ui.overview.line_items.mismatch': "ui.overview.line_items.mismatch";
|
|
130
135
|
readonly 'ui.overview.line_items.mismatch_subtotal': "ui.overview.line_items.mismatch_subtotal";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.overview.d.ts","sourceRoot":"","sources":["../../src/i18n/strings.overview.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"strings.overview.d.ts","sourceRoot":"","sources":["../../src/i18n/strings.overview.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8KZ,CAAC"}
|
|
@@ -134,6 +134,11 @@ export const M = defineMessages({
|
|
|
134
134
|
'ui.overview.line_items.discount': 'Discount',
|
|
135
135
|
'ui.overview.line_items.tax': 'Tax',
|
|
136
136
|
'ui.overview.line_items.total': 'Total',
|
|
137
|
+
'ui.overview.line_items.subtotal_excluding_tax': 'Subtotal (excl. tax)',
|
|
138
|
+
'ui.overview.line_items.discount_included': 'Includes discounts of',
|
|
139
|
+
'ui.overview.line_items.tax_on': '{name} {percent}% on',
|
|
140
|
+
'ui.overview.line_items.tax_included': 'Includes {name} {percent}% of',
|
|
141
|
+
'ui.overview.line_items.rounded_document': 'Rounded per document',
|
|
137
142
|
'ui.overview.line_items.computed': '(from the lines)',
|
|
138
143
|
'ui.overview.line_items.mismatch': 'Lines add up to {amount}.',
|
|
139
144
|
'ui.overview.line_items.mismatch_subtotal': 'The recorded subtotal is {amount}.',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-svelte",
|
|
3
|
-
"version": "0.56.
|
|
3
|
+
"version": "0.56.2",
|
|
4
4
|
"smrtJsdoc": "strict",
|
|
5
5
|
"description": "Svelte 5 components for SMRT user management - auth, users, tenants, roles, permissions, groups",
|
|
6
6
|
"type": "module",
|
|
@@ -204,12 +204,12 @@
|
|
|
204
204
|
"access": "public"
|
|
205
205
|
},
|
|
206
206
|
"dependencies": {
|
|
207
|
-
"@happyvertical/logger": "^0.103.
|
|
208
|
-
"@happyvertical/smrt-languages": "0.56.
|
|
209
|
-
"@happyvertical/smrt-mcp-apps": "0.56.
|
|
210
|
-
"@happyvertical/smrt-types": "0.56.
|
|
211
|
-
"@happyvertical/smrt-ui": "0.56.
|
|
212
|
-
"@happyvertical/smrt-web": "0.56.
|
|
207
|
+
"@happyvertical/logger": "^0.103.7",
|
|
208
|
+
"@happyvertical/smrt-languages": "0.56.2",
|
|
209
|
+
"@happyvertical/smrt-mcp-apps": "0.56.2",
|
|
210
|
+
"@happyvertical/smrt-types": "0.56.2",
|
|
211
|
+
"@happyvertical/smrt-ui": "0.56.2",
|
|
212
|
+
"@happyvertical/smrt-web": "0.56.2",
|
|
213
213
|
"@tanstack/db": "^0.6.14",
|
|
214
214
|
"@tanstack/svelte-db": "^0.1.91",
|
|
215
215
|
"esm-env": "^1.2.2"
|
|
@@ -244,15 +244,15 @@
|
|
|
244
244
|
}
|
|
245
245
|
},
|
|
246
246
|
"devDependencies": {
|
|
247
|
-
"@happyvertical/smrt-agents": "0.56.
|
|
248
|
-
"@happyvertical/smrt-chat": "0.56.
|
|
249
|
-
"@happyvertical/smrt-content": "0.56.
|
|
250
|
-
"@happyvertical/smrt-core": "0.56.
|
|
251
|
-
"@happyvertical/smrt-reports": "0.56.
|
|
252
|
-
"@happyvertical/smrt-scanner": "0.56.
|
|
253
|
-
"@happyvertical/smrt-tenancy": "0.56.
|
|
254
|
-
"@happyvertical/smrt-users": "0.56.
|
|
255
|
-
"@happyvertical/speech": "^0.103.
|
|
247
|
+
"@happyvertical/smrt-agents": "0.56.2",
|
|
248
|
+
"@happyvertical/smrt-chat": "0.56.2",
|
|
249
|
+
"@happyvertical/smrt-content": "0.56.2",
|
|
250
|
+
"@happyvertical/smrt-core": "0.56.2",
|
|
251
|
+
"@happyvertical/smrt-reports": "0.56.2",
|
|
252
|
+
"@happyvertical/smrt-scanner": "0.56.2",
|
|
253
|
+
"@happyvertical/smrt-tenancy": "0.56.2",
|
|
254
|
+
"@happyvertical/smrt-users": "0.56.2",
|
|
255
|
+
"@happyvertical/speech": "^0.103.7",
|
|
256
256
|
"@sveltejs/package": "^2.5.8",
|
|
257
257
|
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
258
258
|
"@testing-library/jest-dom": "^7.0.1",
|