@suveren/gateway 0.37.0 → 0.39.0
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/content/integrations/erp.json +360 -19
- package/dist/mcp-server/http.mjs +576 -29
- package/dist/ui/assets/index-DNNXeRpZ.js +123 -0
- package/dist/ui/assets/index-Osk4E49r.css +1 -0
- package/dist/ui/index.html +2 -2
- package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/README.md +17 -13
- package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/lib/read.js +74 -57
- package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/lib/types/json.js +11 -11
- package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/lib/types/urlencoded.js +5 -5
- package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/lib/utils.js +0 -15
- package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/package.json +7 -12
- package/node_modules/body-parser/HISTORY.md +7 -2
- package/node_modules/body-parser/README.md +3 -3
- package/node_modules/body-parser/lib/read.js +26 -8
- package/node_modules/body-parser/package.json +1 -1
- package/node_modules/on-finished/index.js +14 -2
- package/node_modules/on-finished/package.json +11 -7
- package/package.json +1 -1
- package/profiles/index.json +2 -1
- package/profiles/master-data/0.1.profile.json +311 -0
- package/dist/ui/assets/index-BC2bXeCQ.js +0 -123
- package/dist/ui/assets/index-XiOgY6b5.css +0 -1
- package/node_modules/on-finished/HISTORY.md +0 -98
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"icon": "briefcase",
|
|
7
7
|
"profile": "sales",
|
|
8
8
|
"npmPackage": "@humanagencyp/erp-mcp",
|
|
9
|
-
"npmVersion": "0.
|
|
9
|
+
"npmVersion": "0.10.0",
|
|
10
10
|
"mcp": {
|
|
11
11
|
"command": "erp-mcp",
|
|
12
12
|
"args": [],
|
|
@@ -48,6 +48,27 @@
|
|
|
48
48
|
"type": "text",
|
|
49
49
|
"placeholder": "Path to an invoice template file — leave empty for the bundled German template",
|
|
50
50
|
"optional": true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"key": "quoteTemplate",
|
|
54
|
+
"label": "Quote template (optional)",
|
|
55
|
+
"type": "text",
|
|
56
|
+
"placeholder": "Path to a quote template file — leave empty for the bundled German template",
|
|
57
|
+
"optional": true
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"key": "viesCheck",
|
|
61
|
+
"label": "VAT-ID check (optional)",
|
|
62
|
+
"type": "text",
|
|
63
|
+
"placeholder": "on (default) — \"off\" saves every VAT ID as not checked",
|
|
64
|
+
"optional": true
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"key": "viesUrl",
|
|
68
|
+
"label": "VAT-ID check address (advanced, optional)",
|
|
69
|
+
"type": "text",
|
|
70
|
+
"placeholder": "Leave empty — the EU VIES service. Only for testing against a stand-in",
|
|
71
|
+
"optional": true
|
|
51
72
|
}
|
|
52
73
|
],
|
|
53
74
|
"envMapping": {
|
|
@@ -55,7 +76,10 @@
|
|
|
55
76
|
"ERP_MODE": "mode",
|
|
56
77
|
"ERP_LIVE_ADAPTER": "liveAdapter",
|
|
57
78
|
"ERP_LIVE_COMPANY_FILE": "companyFile",
|
|
58
|
-
"ERP_INVOICE_TEMPLATE": "invoiceTemplate"
|
|
79
|
+
"ERP_INVOICE_TEMPLATE": "invoiceTemplate",
|
|
80
|
+
"ERP_QUOTE_TEMPLATE": "quoteTemplate",
|
|
81
|
+
"ERP_VIES": "viesCheck",
|
|
82
|
+
"ERP_VIES_URL": "viesUrl"
|
|
59
83
|
}
|
|
60
84
|
},
|
|
61
85
|
"simulation": {
|
|
@@ -67,8 +91,16 @@
|
|
|
67
91
|
"live": { "local": "Local" }
|
|
68
92
|
},
|
|
69
93
|
"modeNotes": {
|
|
70
|
-
"live": { "local": "On this computer
|
|
94
|
+
"live": { "local": "On this computer. VAT-ID checks ask the EU VIES service." }
|
|
71
95
|
},
|
|
96
|
+
"network": [
|
|
97
|
+
{
|
|
98
|
+
"modes": { "live": ["local"] },
|
|
99
|
+
"host": "ec.europa.eu",
|
|
100
|
+
"purpose": "EU VAT-ID check (VIES) when a customer's VAT ID is saved or shown for approval",
|
|
101
|
+
"sends": "the customer's country and VAT ID, and your own VAT ID"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
72
104
|
"adapterField": "liveAdapter",
|
|
73
105
|
"personalDefault": true,
|
|
74
106
|
"oauth": null,
|
|
@@ -82,6 +114,11 @@
|
|
|
82
114
|
"tool": "get_document",
|
|
83
115
|
"args": { "kind": "credit-note-pdf", "id": "$id" },
|
|
84
116
|
"label": "issued credit note {id}"
|
|
117
|
+
},
|
|
118
|
+
"quote-pdf": {
|
|
119
|
+
"tool": "get_document",
|
|
120
|
+
"args": { "kind": "quote-pdf", "id": "$id" },
|
|
121
|
+
"label": "quote {id}"
|
|
85
122
|
}
|
|
86
123
|
},
|
|
87
124
|
"context": {
|
|
@@ -103,33 +140,37 @@
|
|
|
103
140
|
},
|
|
104
141
|
"overrides": {
|
|
105
142
|
"list_items": {
|
|
143
|
+
"readAlsoUnder": ["invoicing", "master-data"],
|
|
106
144
|
"category": "read",
|
|
107
145
|
"boundField": "read_access",
|
|
108
146
|
"requiredValue": "unlimited"
|
|
109
147
|
},
|
|
110
148
|
"get_item": {
|
|
149
|
+
"readAlsoUnder": ["invoicing", "master-data"],
|
|
111
150
|
"category": "read",
|
|
112
151
|
"boundField": "read_access",
|
|
113
152
|
"requiredValue": "unlimited"
|
|
114
153
|
},
|
|
115
154
|
"find_customers": {
|
|
116
|
-
"readAlsoUnder": ["invoicing"],
|
|
155
|
+
"readAlsoUnder": ["invoicing", "master-data"],
|
|
117
156
|
"category": "read",
|
|
118
157
|
"boundField": "read_access",
|
|
119
158
|
"requiredValue": "unlimited"
|
|
120
159
|
},
|
|
121
160
|
"get_customer": {
|
|
122
|
-
"readAlsoUnder": ["invoicing"],
|
|
161
|
+
"readAlsoUnder": ["invoicing", "master-data"],
|
|
123
162
|
"category": "read",
|
|
124
163
|
"boundField": "read_access",
|
|
125
164
|
"requiredValue": "unlimited"
|
|
126
165
|
},
|
|
127
166
|
"list_quotes": {
|
|
167
|
+
"readAlsoUnder": ["invoicing"],
|
|
128
168
|
"category": "read",
|
|
129
169
|
"boundField": "read_access",
|
|
130
170
|
"requiredValue": "unlimited"
|
|
131
171
|
},
|
|
132
172
|
"get_quote": {
|
|
173
|
+
"readAlsoUnder": ["invoicing"],
|
|
133
174
|
"category": "read",
|
|
134
175
|
"boundField": "read_access",
|
|
135
176
|
"requiredValue": "unlimited"
|
|
@@ -145,7 +186,7 @@
|
|
|
145
186
|
"requiredValue": "unlimited"
|
|
146
187
|
},
|
|
147
188
|
"create_quote": {
|
|
148
|
-
"summary": "Quote of {value|money} net[ — {discount_pct|percent} discount]",
|
|
189
|
+
"summary": "Quote[ {number}] of {value|money} net to {customer_id|ref}[ — {discount_pct|percent} discount]",
|
|
149
190
|
"executionMapping": {
|
|
150
191
|
"value": "value",
|
|
151
192
|
"discount_pct": "discount_pct",
|
|
@@ -158,15 +199,44 @@
|
|
|
158
199
|
"contextKeys": { "customer": "customer_id" },
|
|
159
200
|
"preview": [
|
|
160
201
|
{ "tool": "get_customer", "args": { "id": "customer_id" }, "attach": "customer_id" },
|
|
161
|
-
{ "tool": "get_item", "forEach": "lines", "args": { "id": "item_id" }, "attach": "item" }
|
|
202
|
+
{ "tool": "get_item", "forEach": "lines", "args": { "id": "item_id" }, "attach": "item", "when": "item_id" },
|
|
203
|
+
{ "tool": "preview_quote", "when": "document_date", "kind": "document",
|
|
204
|
+
"args": { "customer_id": "customer_id", "number": "number", "document_date": "document_date", "lines": "lines",
|
|
205
|
+
"value": "value", "discount_pct": "discount_pct", "currency": "currency",
|
|
206
|
+
"valid_until": "valid_until", "notes": "notes" } }
|
|
207
|
+
],
|
|
208
|
+
"checks": [
|
|
209
|
+
{ "key": "item-revision", "label": "Line item is at the version it names", "forEach": "lines", "when": "lines[].item_revision",
|
|
210
|
+
"path": "lines[].item_revision", "compare": { "op": "eq", "to": "lines[].item.revision" }, "blocking": true, "showOnly": "fail",
|
|
211
|
+
"detail": "line {#}: item version {lines[].item_revision}, the item is now at version {lines[].item.revision}" },
|
|
212
|
+
{ "key": "tax-supported", "label": "Tax treatment supported for this customer", "path": "customer_id.tax_mode", "blocking": true,
|
|
213
|
+
"pass": ["normal", "reverse_charge", "kleinunternehmer"], "fail": ["unsupported"],
|
|
214
|
+
"detail": "[{customer_id.tax_mode_label}]" },
|
|
215
|
+
{ "key": "list-price", "label": "Price vs. list", "forEach": "lines", "when": "lines[].item_id",
|
|
216
|
+
"path": "lines[].unit_price", "compare": { "op": "eq", "to": "lines[].item.list_price" },
|
|
217
|
+
"onTrue": "pass", "onFalse": "notice",
|
|
218
|
+
"detail": "line {#}: {lines[].unit_price|money}, list price {lines[].item.list_price|money}" },
|
|
219
|
+
{ "key": "item-vat", "label": "VAT vs. item", "forEach": "lines", "when": "lines[].item_id",
|
|
220
|
+
"path": "lines[].vat_rate", "compare": { "op": "eq", "to": "lines[].item.vat_rate" },
|
|
221
|
+
"onTrue": "pass", "onFalse": "notice",
|
|
222
|
+
"detail": "line {#}: {lines[].vat_rate|percent}, item {lines[].item.vat_rate|percent}" }
|
|
162
223
|
],
|
|
163
224
|
"display": {
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
"
|
|
225
|
+
"hidden": ["customer_id.vies", "customer_id.vies_status", "customer_id.tax_mode", "customer_id.revision"],
|
|
226
|
+
"order": ["customer_id", "number", "document_date", "lines", "discount_pct", "value", "valid_until", "notes"],
|
|
227
|
+
"money": ["value", "customer_id.credit_limit", "customer_id.open_balance", "customer_id.available_credit", "lines[].item.list_price", "lines[].unit_price"],
|
|
228
|
+
"percent": ["discount_pct", "lines[].vat_rate", "lines[].item.vat_rate"],
|
|
167
229
|
"currencyField": "currency",
|
|
168
230
|
"labels": {
|
|
169
231
|
"customer_id": "Customer",
|
|
232
|
+
"customer_id.uid": "VAT ID",
|
|
233
|
+
"customer_id.tax_mode_label": "Tax treatment",
|
|
234
|
+
"number": "Quote number",
|
|
235
|
+
"document_date": "Quote date",
|
|
236
|
+
"lines[].description": "Description",
|
|
237
|
+
"lines[].unit_price": "Price",
|
|
238
|
+
"lines[].vat_rate": "VAT rate",
|
|
239
|
+
"lines[].item.vat_rate": "Item VAT rate",
|
|
170
240
|
"discount_pct": "Discount",
|
|
171
241
|
"value": "Total (net)",
|
|
172
242
|
"customer_id.credit_limit": "Credit limit",
|
|
@@ -192,14 +262,40 @@
|
|
|
192
262
|
"actionLabel": "Quote updated",
|
|
193
263
|
"contextKeys": { "quote": "id" },
|
|
194
264
|
"preview": [
|
|
195
|
-
{ "tool": "
|
|
265
|
+
{ "tool": "get_quote", "args": { "id": "id", "revision": "revision" }, "attach": "id",
|
|
266
|
+
"version": { "arg": "revision", "field": "revision" } },
|
|
267
|
+
{ "tool": "get_item", "forEach": "lines", "args": { "id": "item_id" }, "attach": "item", "when": "item_id" },
|
|
268
|
+
{ "tool": "preview_quote", "when": "document_date", "kind": "document",
|
|
269
|
+
"args": { "id": "id", "revision": "revision", "document_date": "document_date", "lines": "lines",
|
|
270
|
+
"value": "value", "discount_pct": "discount_pct", "currency": "currency",
|
|
271
|
+
"valid_until": "valid_until", "notes": "notes" } }
|
|
272
|
+
],
|
|
273
|
+
"checks": [
|
|
274
|
+
{ "key": "item-revision", "label": "Line item is at the version it names", "forEach": "lines", "when": "lines[].item_revision",
|
|
275
|
+
"path": "lines[].item_revision", "compare": { "op": "eq", "to": "lines[].item.revision" }, "blocking": true, "showOnly": "fail",
|
|
276
|
+
"detail": "line {#}: item version {lines[].item_revision}, the item is now at version {lines[].item.revision}" },
|
|
277
|
+
{ "key": "revision", "label": "Request is for the record's current version", "blocking": true, "showOnly": "fail",
|
|
278
|
+
"path": "id.$version.approved", "compare": { "op": "eq", "to": "id.$version.current" },
|
|
279
|
+
"detail": "request for version {id.$version.approved}, record at version {id.$version.current}" },
|
|
280
|
+
{ "key": "list-price", "label": "Price vs. list", "forEach": "lines", "when": "lines[].item_id",
|
|
281
|
+
"path": "lines[].unit_price", "compare": { "op": "eq", "to": "lines[].item.list_price" },
|
|
282
|
+
"onTrue": "pass", "onFalse": "notice",
|
|
283
|
+
"detail": "line {#}: {lines[].unit_price|money}, list price {lines[].item.list_price|money}" },
|
|
284
|
+
{ "key": "item-vat", "label": "VAT vs. item", "forEach": "lines", "when": "lines[].item_id",
|
|
285
|
+
"path": "lines[].vat_rate", "compare": { "op": "eq", "to": "lines[].item.vat_rate" },
|
|
286
|
+
"onTrue": "pass", "onFalse": "notice",
|
|
287
|
+
"detail": "line {#}: {lines[].vat_rate|percent}, item {lines[].item.vat_rate|percent}" }
|
|
196
288
|
],
|
|
197
289
|
"display": {
|
|
198
|
-
"
|
|
199
|
-
"
|
|
200
|
-
"
|
|
290
|
+
"verb": "changed",
|
|
291
|
+
"order": ["id", "document_date", "lines", "discount_pct", "value", "valid_until", "notes"],
|
|
292
|
+
"money": ["value", "lines[].item.list_price", "lines[].unit_price", "id.net_total"],
|
|
293
|
+
"percent": ["discount_pct", "lines[].vat_rate", "lines[].item.vat_rate"],
|
|
201
294
|
"currencyField": "currency",
|
|
202
295
|
"labels": {
|
|
296
|
+
"id": "Quote",
|
|
297
|
+
"id.net_total": "Total (net, now)",
|
|
298
|
+
"document_date": "Quote date",
|
|
203
299
|
"discount_pct": "Discount",
|
|
204
300
|
"value": "Total (net)",
|
|
205
301
|
"lines[].item": "Item",
|
|
@@ -248,7 +344,7 @@
|
|
|
248
344
|
},
|
|
249
345
|
"create_invoice": {
|
|
250
346
|
"profile": "invoicing",
|
|
251
|
-
"summary": "Invoice[ {number}] of {net_total|money} net to {customer_id}[ for order {order_id}]",
|
|
347
|
+
"summary": "Invoice[ {number}] of {net_total|money} net to {customer_id|ref}[ for order {order_id}]",
|
|
252
348
|
"executionMapping": {
|
|
253
349
|
"net_total": "net_total",
|
|
254
350
|
"currency": "currency"
|
|
@@ -259,7 +355,11 @@
|
|
|
259
355
|
"actionLabel": "Invoice issued",
|
|
260
356
|
"contextKeys": { "customer": "customer_id" },
|
|
261
357
|
"preview": [
|
|
262
|
-
{ "tool": "get_customer", "args": { "id": "customer_id" }, "attach": "customer_id"
|
|
358
|
+
{ "tool": "get_customer", "args": { "id": "customer_id", "revision": "customer_revision" }, "attach": "customer_id",
|
|
359
|
+
"version": { "arg": "customer_revision", "field": "revision" } },
|
|
360
|
+
{ "tool": "get_quote", "args": { "id": "quote_id", "revision": "quote_revision" }, "attach": "quote_id", "when": "quote_id",
|
|
361
|
+
"version": { "arg": "quote_revision", "field": "revision" }, "fields": ["customer.name", "lines"] },
|
|
362
|
+
{ "tool": "get_item", "forEach": "lines", "args": { "id": "item_id" }, "attach": "item", "when": "item_id" },
|
|
263
363
|
{
|
|
264
364
|
"tool": "preview_invoice",
|
|
265
365
|
"args": {
|
|
@@ -271,17 +371,65 @@
|
|
|
271
371
|
"net_total": "net_total",
|
|
272
372
|
"currency": "currency",
|
|
273
373
|
"payment_term_days": "payment_term_days",
|
|
274
|
-
"memo": "memo"
|
|
374
|
+
"memo": "memo",
|
|
375
|
+
"quote_id": "quote_id",
|
|
376
|
+
"quote_revision": "quote_revision",
|
|
377
|
+
"customer_revision": "customer_revision"
|
|
275
378
|
},
|
|
276
379
|
"kind": "document"
|
|
277
380
|
}
|
|
278
381
|
],
|
|
382
|
+
"checks": [
|
|
383
|
+
{ "key": "customer-revision", "label": "Request is for the customer's current version", "blocking": true, "showOnly": "fail",
|
|
384
|
+
"path": "customer_id.$version.approved", "compare": { "op": "eq", "to": "customer_id.$version.current" },
|
|
385
|
+
"detail": "request for version {customer_id.$version.approved}, customer at version {customer_id.$version.current}" },
|
|
386
|
+
{ "key": "quote-revision", "label": "Request is for the quote's current version", "blocking": true, "showOnly": "fail",
|
|
387
|
+
"path": "quote_id.$version.approved", "compare": { "op": "eq", "to": "quote_id.$version.current" },
|
|
388
|
+
"detail": "request for version {quote_id.$version.approved}, quote at version {quote_id.$version.current}" },
|
|
389
|
+
{ "key": "quote-customer", "label": "Customer unchanged since the quote", "when": "quote_id", "blocking": true, "showOnly": "fail",
|
|
390
|
+
"path": "quote_id.customer.revision", "compare": { "op": "eq", "to": "customer_id.revision" },
|
|
391
|
+
"detail": "the quote was made with customer version {quote_id.customer.revision}, the customer is now at version {customer_id.revision} — update the quote first" },
|
|
392
|
+
{ "key": "item-revision", "label": "Line item is at the version it names", "forEach": "lines", "when": "lines[].item_revision",
|
|
393
|
+
"path": "lines[].item_revision", "compare": { "op": "eq", "to": "lines[].item.revision" }, "blocking": true, "showOnly": "fail",
|
|
394
|
+
"detail": "line {#}: item version {lines[].item_revision}, the item is now at version {lines[].item.revision}" },
|
|
395
|
+
{ "key": "tax-supported", "label": "Tax treatment supported for this customer", "path": "customer_id.tax_mode", "blocking": true,
|
|
396
|
+
"pass": ["normal", "reverse_charge", "kleinunternehmer"], "fail": ["unsupported"],
|
|
397
|
+
"detail": "[{customer_id.tax_mode_label}]" },
|
|
398
|
+
{ "key": "vies", "label": "Customer VAT ID confirmed by VIES", "when": "customer_id.uid",
|
|
399
|
+
"path": "customer_id.vies_status", "pass": ["valid"], "fail": ["invalid"], "notChecked": ["not_checked", null],
|
|
400
|
+
"notice": ["not_applicable"], "missing": "not_checked",
|
|
401
|
+
"detail": "[checked {customer_id.vies.checked_at|date}][ — {customer_id.vies.reason}]" },
|
|
402
|
+
{ "key": "reverse-charge", "label": "Reverse charge: VAT ID confirmed by VIES", "blocking": true, "when": { "path": "customer_id.tax_mode", "in": ["reverse_charge"] },
|
|
403
|
+
"path": "customer_id.vies_status", "pass": ["valid"], "fail": ["invalid", "not_checked", "not_applicable", null], "missing": "not_checked",
|
|
404
|
+
"detail": "[{customer_id.vies.reason}]" },
|
|
405
|
+
{ "key": "list-price", "label": "Price vs. list", "forEach": "lines", "when": "lines[].item_id",
|
|
406
|
+
"path": "lines[].unit_price", "compare": { "op": "eq", "to": "lines[].item.list_price" },
|
|
407
|
+
"onTrue": "pass", "onFalse": "notice",
|
|
408
|
+
"detail": "line {#}: {lines[].unit_price|money}, list price {lines[].item.list_price|money}" },
|
|
409
|
+
{ "key": "item-vat", "label": "VAT vs. item", "forEach": "lines", "when": "lines[].item_id",
|
|
410
|
+
"path": "lines[].vat_rate", "compare": { "op": "eq", "to": "lines[].item.vat_rate" },
|
|
411
|
+
"onTrue": "pass", "onFalse": "notice",
|
|
412
|
+
"detail": "line {#}: {lines[].vat_rate|percent}, item {lines[].item.vat_rate|percent}" }
|
|
413
|
+
],
|
|
279
414
|
"display": {
|
|
280
|
-
"
|
|
281
|
-
"
|
|
415
|
+
"names": { "quote_id": "number" },
|
|
416
|
+
"order": ["customer_id", "quote_id", "quote_revision", "customer_revision", "order_id", "number", "document_date", "service_period", "lines", "net_total", "currency", "payment_term_days", "memo"],
|
|
417
|
+
"money": ["net_total", "lines[].unit_price", "customer_id.credit_limit", "customer_id.open_balance", "customer_id.available_credit", "lines[].item.list_price", "quote_id.net_total"],
|
|
418
|
+
"percent": ["lines[].vat_rate", "lines[].item.vat_rate"],
|
|
282
419
|
"currencyField": "currency",
|
|
420
|
+
"hidden": ["customer_id.vies", "customer_id.vies_status", "customer_id.tax_mode", "customer_id.revision"],
|
|
283
421
|
"labels": {
|
|
284
422
|
"customer_id": "Customer",
|
|
423
|
+
"quote_id": "Quote",
|
|
424
|
+
"quote_id.customer.name": "Customer on the quote",
|
|
425
|
+
"quote_id.lines": "Quote lines",
|
|
426
|
+
"quote_revision": "Quote revision",
|
|
427
|
+
"customer_revision": "Customer revision",
|
|
428
|
+
"lines[].item": "Item",
|
|
429
|
+
"lines[].item.list_price": "List price",
|
|
430
|
+
"lines[].item.vat_rate": "Item VAT rate",
|
|
431
|
+
"customer_id.uid": "VAT ID",
|
|
432
|
+
"customer_id.tax_mode_label": "Tax treatment",
|
|
285
433
|
"order_id": "Order",
|
|
286
434
|
"number": "Invoice number",
|
|
287
435
|
"document_date": "Invoice date",
|
|
@@ -335,6 +483,25 @@
|
|
|
335
483
|
"category": "read",
|
|
336
484
|
"internal": true
|
|
337
485
|
},
|
|
486
|
+
"check_vat_id": {
|
|
487
|
+
"profile": "master-data",
|
|
488
|
+
"category": "read",
|
|
489
|
+
"internal": true
|
|
490
|
+
},
|
|
491
|
+
"preview_customer_change": {
|
|
492
|
+
"profile": "master-data",
|
|
493
|
+
"category": "read",
|
|
494
|
+
"internal": true
|
|
495
|
+
},
|
|
496
|
+
"check_customer_duplicates": {
|
|
497
|
+
"profile": "master-data",
|
|
498
|
+
"category": "read",
|
|
499
|
+
"internal": true
|
|
500
|
+
},
|
|
501
|
+
"preview_quote": {
|
|
502
|
+
"category": "read",
|
|
503
|
+
"internal": true
|
|
504
|
+
},
|
|
338
505
|
"list_invoices": {
|
|
339
506
|
"profile": "invoicing",
|
|
340
507
|
"category": "read",
|
|
@@ -359,6 +526,180 @@
|
|
|
359
526
|
"boundField": "read_access",
|
|
360
527
|
"requiredValue": "unlimited"
|
|
361
528
|
},
|
|
529
|
+
"create_customer": {
|
|
530
|
+
"profile": "master-data",
|
|
531
|
+
"summary": "New customer {name}, {country}[ — VAT ID {uid}]",
|
|
532
|
+
"executionMapping": {},
|
|
533
|
+
"staticExecution": { "action_type": "customer_create" },
|
|
534
|
+
"actionLabel": "Customer created",
|
|
535
|
+
"preview": [
|
|
536
|
+
{ "tool": "check_vat_id", "args": { "country": "country", "uid": "uid" }, "attach": "uid", "when": "uid",
|
|
537
|
+
"displayOnly": true, "label": "EU VIES" },
|
|
538
|
+
{ "tool": "check_customer_duplicates", "args": { "uid": "uid", "crm_contact_id": "crm_contact_id" }, "as": "duplicates" }
|
|
539
|
+
],
|
|
540
|
+
"checks": [
|
|
541
|
+
{ "key": "vat-format", "label": "VAT ID format", "when": "uid", "path": "uid.format", "blocking": true,
|
|
542
|
+
"pass": ["ok", "not_applicable"], "fail": ["wrong_prefix", "wrong_pattern"], "missing": "not_checked" },
|
|
543
|
+
{ "key": "vies", "label": "VAT ID confirmed by VIES", "when": "uid", "path": "uid.vies.status", "blocking": true,
|
|
544
|
+
"pass": ["valid"], "fail": ["invalid"], "notChecked": ["not_checked"], "notice": ["not_applicable"], "missing": "not_checked",
|
|
545
|
+
"detail": "[checked {uid.vies.checked_at|date}][ — {uid.vies.reason}]",
|
|
546
|
+
"details": { "not_checked": "[{uid.vies.reason} — ]saving is not blocked while VIES is unreachable" } },
|
|
547
|
+
{ "key": "vat-duplicate", "label": "No other customer with this VAT ID", "when": "uid", "blocking": true,
|
|
548
|
+
"path": "duplicates.vat_duplicate_of", "present": "fail", "absent": "pass",
|
|
549
|
+
"detail": "[already customer {duplicates.vat_duplicate_of}]" },
|
|
550
|
+
{ "key": "crm-duplicate", "label": "No other customer for this CRM contact", "when": "crm_contact_id", "blocking": true,
|
|
551
|
+
"path": "duplicates.crm_contact_duplicate_of", "present": "fail", "absent": "pass",
|
|
552
|
+
"detail": "[already customer {duplicates.crm_contact_duplicate_of}]" }
|
|
553
|
+
],
|
|
554
|
+
"display": {
|
|
555
|
+
"order": ["name", "address_lines", "country", "uid", "email", "crm_contact_id"],
|
|
556
|
+
"labels": {
|
|
557
|
+
"name": "Name", "address_lines": "Address", "country": "Country", "uid": "VAT ID",
|
|
558
|
+
"email": "Email", "crm_contact_id": "CRM contact",
|
|
559
|
+
"uid.vies.name": "Name at VIES", "uid.vies.address": "Address at VIES", "uid.vies.request_id": "Consultation no."
|
|
560
|
+
},
|
|
561
|
+
"hidden": ["uid.uid", "uid.format", "uid.vies.status", "uid.vies.reason", "uid.vies.checked_at", "uid.duplicate", "uid.duplicate_of"]
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
"update_customer": {
|
|
565
|
+
"profile": "master-data",
|
|
566
|
+
"summary": "Change contact data of customer {id|ref}",
|
|
567
|
+
"executionMapping": {},
|
|
568
|
+
"staticExecution": { "action_type": "customer_update" },
|
|
569
|
+
"actionLabel": "Customer updated",
|
|
570
|
+
"preview": [
|
|
571
|
+
{ "tool": "get_customer", "args": { "id": "id", "revision": "revision" }, "attach": "id",
|
|
572
|
+
"version": { "arg": "revision", "field": "revision" } },
|
|
573
|
+
{ "tool": "check_customer_duplicates", "args": { "crm_contact_id": "crm_contact_id", "id": "id" }, "as": "duplicates",
|
|
574
|
+
"when": "crm_contact_id" }
|
|
575
|
+
],
|
|
576
|
+
"checks": [
|
|
577
|
+
{ "key": "revision", "label": "Request is for the record's current version", "blocking": true, "showOnly": "fail",
|
|
578
|
+
"path": "id.$version.approved", "compare": { "op": "eq", "to": "id.$version.current" },
|
|
579
|
+
"detail": "request for version {id.$version.approved}, record at version {id.$version.current}" },
|
|
580
|
+
{ "key": "crm-duplicate", "label": "No other customer for this CRM contact", "when": "crm_contact_id", "blocking": true,
|
|
581
|
+
"path": "duplicates.crm_contact_duplicate_of", "present": "fail", "absent": "pass",
|
|
582
|
+
"detail": "[already customer {duplicates.crm_contact_duplicate_of}]" }
|
|
583
|
+
],
|
|
584
|
+
"display": {
|
|
585
|
+
"verb": "changed",
|
|
586
|
+
"order": ["id", "email", "crm_contact_id"],
|
|
587
|
+
"labels": {
|
|
588
|
+
"id": "Customer", "email": "Email (new)", "crm_contact_id": "CRM contact (new)",
|
|
589
|
+
"id.email": "Email (now)", "id.crm_contact_id": "CRM contact (now)"
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
"update_customer_tax_data": {
|
|
594
|
+
"profile": "master-data",
|
|
595
|
+
"summary": "Change tax data of customer {id|ref}: {name}, {country}[ — VAT ID {uid}]",
|
|
596
|
+
"executionMapping": {},
|
|
597
|
+
"staticExecution": { "action_type": "customer_tax" },
|
|
598
|
+
"actionLabel": "Customer tax data changed",
|
|
599
|
+
"preview": [
|
|
600
|
+
{ "tool": "preview_customer_change",
|
|
601
|
+
"args": { "id": "id", "name": "name", "address_lines": "address_lines", "country": "country", "uid": "uid" },
|
|
602
|
+
"attach": "id", "version": { "arg": "revision", "field": "revision" } },
|
|
603
|
+
{ "tool": "check_customer_duplicates", "args": { "uid": "uid", "id": "id" }, "as": "duplicates", "when": "uid" }
|
|
604
|
+
],
|
|
605
|
+
"checks": [
|
|
606
|
+
{ "key": "revision", "label": "Request is for the record's current version", "blocking": true, "showOnly": "fail",
|
|
607
|
+
"path": "id.$version.approved", "compare": { "op": "eq", "to": "id.$version.current" },
|
|
608
|
+
"detail": "request for version {id.$version.approved}, record at version {id.$version.current}" },
|
|
609
|
+
{ "key": "vies", "label": "New VAT ID confirmed by VIES", "when": "uid", "path": "id.vat_check.vies.status", "blocking": true,
|
|
610
|
+
"pass": ["valid"], "fail": ["invalid"], "notChecked": ["not_checked"], "notice": ["not_applicable"], "missing": "not_checked",
|
|
611
|
+
"detail": "[checked {id.vat_check.vies.checked_at|date}][ — {id.vat_check.vies.reason}]",
|
|
612
|
+
"details": { "not_checked": "[{id.vat_check.vies.reason} — ]saving is not blocked while VIES is unreachable" } },
|
|
613
|
+
{ "key": "vat-duplicate", "label": "No other customer with this VAT ID", "when": "uid", "blocking": true,
|
|
614
|
+
"path": "duplicates.vat_duplicate_of", "present": "fail", "absent": "pass",
|
|
615
|
+
"detail": "[already customer {duplicates.vat_duplicate_of}]" },
|
|
616
|
+
{ "key": "tax-mode", "label": "Tax treatment of future invoices", "path": "id.tax_mode.after",
|
|
617
|
+
"compare": { "op": "eq", "to": "id.tax_mode.now" }, "onTrue": "pass", "onFalse": "notice",
|
|
618
|
+
"detail": "{id.tax_mode.now_label} → {id.tax_mode.after_label}" },
|
|
619
|
+
{ "key": "open-quotes", "label": "Open quotes", "path": "id.open_quotes",
|
|
620
|
+
"compare": { "op": "gt", "to": 0 }, "onTrue": "notice", "onFalse": "pass", "showOnly": "notice",
|
|
621
|
+
"detail": "{id.open_quotes|count:quote/quotes} made with the old data — update before invoicing" },
|
|
622
|
+
{ "key": "already-invoiced", "label": "Already issued to this customer", "when": "id.uid_or_country_changed",
|
|
623
|
+
"path": "id.issued_documents.invoices", "compare": { "op": "gt", "to": 0 }, "onTrue": "notice", "onFalse": "pass",
|
|
624
|
+
"detail": "{id.issued_documents.invoices|count:invoice/invoices}, {id.issued_documents.credit_notes|count:credit note/credit notes} — they keep the old data" }
|
|
625
|
+
],
|
|
626
|
+
"display": {
|
|
627
|
+
"verb": "changed",
|
|
628
|
+
"order": ["id", "name", "address_lines", "country", "uid"],
|
|
629
|
+
"labels": {
|
|
630
|
+
"id": "Customer", "name": "Name", "address_lines": "Address", "country": "Country", "uid": "VAT ID"
|
|
631
|
+
},
|
|
632
|
+
"names": { "id": "current.name" },
|
|
633
|
+
"compare": { "name": "id.current.name", "address_lines": "id.current.address_lines", "country": "id.current.country", "uid": "id.current.uid" },
|
|
634
|
+
"hidden": ["revision", "id.name", "id.open_quotes", "id.current", "id.vat_check", "id.tax_mode", "id.issued_documents", "id.changed", "id.revision", "id.uid_or_country_changed"]
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
"create_item": {
|
|
638
|
+
"profile": "master-data",
|
|
639
|
+
"summary": "New item {name} at {list_price|money} per {unit}, VAT {vat_rate|percent}",
|
|
640
|
+
"executionMapping": { "list_price": "list_price" },
|
|
641
|
+
"staticExecution": { "action_type": "item_create" },
|
|
642
|
+
"actionLabel": "Item created",
|
|
643
|
+
"display": {
|
|
644
|
+
"order": ["name", "kind", "unit", "list_price", "vat_rate", "sku", "description"],
|
|
645
|
+
"money": ["list_price"],
|
|
646
|
+
"percent": ["vat_rate"],
|
|
647
|
+
"labels": {
|
|
648
|
+
"name": "Name", "kind": "Kind", "unit": "Unit", "list_price": "List price (net)",
|
|
649
|
+
"vat_rate": "VAT rate", "sku": "Item number", "description": "Description"
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
"update_item": {
|
|
654
|
+
"profile": "master-data",
|
|
655
|
+
"summary": "Change item {id|ref}",
|
|
656
|
+
"executionMapping": {},
|
|
657
|
+
"staticExecution": { "action_type": "item_update" },
|
|
658
|
+
"actionLabel": "Item updated",
|
|
659
|
+
"preview": [
|
|
660
|
+
{ "tool": "get_item", "args": { "id": "id", "revision": "revision" }, "attach": "id",
|
|
661
|
+
"version": { "arg": "revision", "field": "revision" } }
|
|
662
|
+
],
|
|
663
|
+
"checks": [
|
|
664
|
+
{ "key": "revision", "label": "Request is for the record's current version", "blocking": true, "showOnly": "fail",
|
|
665
|
+
"path": "id.$version.approved", "compare": { "op": "eq", "to": "id.$version.current" },
|
|
666
|
+
"detail": "request for version {id.$version.approved}, record at version {id.$version.current}" }
|
|
667
|
+
],
|
|
668
|
+
"display": {
|
|
669
|
+
"verb": "changed", "labels": { "id": "Item", "active": "Active" } }
|
|
670
|
+
},
|
|
671
|
+
"update_item_price": {
|
|
672
|
+
"profile": "master-data",
|
|
673
|
+
"summary": "Price of item {id|ref}: {list_price|money}, VAT {vat_rate|percent}",
|
|
674
|
+
"executionMapping": { "list_price": "list_price" },
|
|
675
|
+
"staticExecution": { "action_type": "item_price" },
|
|
676
|
+
"actionLabel": "Item price changed",
|
|
677
|
+
"preview": [
|
|
678
|
+
{ "tool": "get_item", "args": { "id": "id", "revision": "revision" }, "attach": "id",
|
|
679
|
+
"version": { "arg": "revision", "field": "revision" } }
|
|
680
|
+
],
|
|
681
|
+
"checks": [
|
|
682
|
+
{ "key": "revision", "label": "Request is for the record's current version", "blocking": true, "showOnly": "fail",
|
|
683
|
+
"path": "id.$version.approved", "compare": { "op": "eq", "to": "id.$version.current" },
|
|
684
|
+
"detail": "request for version {id.$version.approved}, record at version {id.$version.current}" },
|
|
685
|
+
{ "key": "price-change", "label": "List price", "path": "list_price",
|
|
686
|
+
"compare": { "op": "eq", "to": "id.list_price" }, "onTrue": "pass", "onFalse": "notice",
|
|
687
|
+
"detail": "{id.list_price|money} → {list_price|money}" },
|
|
688
|
+
{ "key": "vat-change", "label": "VAT rate", "path": "vat_rate",
|
|
689
|
+
"compare": { "op": "eq", "to": "id.vat_rate" }, "onTrue": "pass", "onFalse": "notice",
|
|
690
|
+
"detail": "{id.vat_rate|percent} → {vat_rate|percent}" }
|
|
691
|
+
],
|
|
692
|
+
"display": {
|
|
693
|
+
"verb": "changed",
|
|
694
|
+
"money": ["list_price", "id.list_price"],
|
|
695
|
+
"percent": ["vat_rate", "id.vat_rate"],
|
|
696
|
+
"currencyField": "id.currency",
|
|
697
|
+
"labels": {
|
|
698
|
+
"id": "Item", "list_price": "List price (new)", "id.list_price": "List price (now)",
|
|
699
|
+
"vat_rate": "VAT rate (new)", "id.vat_rate": "VAT rate (now)"
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
},
|
|
362
703
|
"load_simulation": {
|
|
363
704
|
"executionMapping": {},
|
|
364
705
|
"staticExecution": {
|