@kreiseck/kasseneck-api 1.25.0 → 1.26.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/CHANGELOG.md +16 -0
- package/dist/cjs/pos/artikel.d.ts +22 -0
- package/dist/cjs/pos/artikel.js +16 -0
- package/dist/cjs/pos/index.d.ts +2 -1
- package/dist/cjs/pos/index.js +18 -2
- package/dist/cjs/pos/kachel-referenz.d.ts +55 -0
- package/dist/cjs/pos/kachel-referenz.js +107 -0
- package/dist/cjs/pos/texte.d.ts +46 -0
- package/dist/cjs/pos/texte.js +18 -0
- package/dist/cjs/stored/draht.js +4 -0
- package/dist/cjs/stored/vokabular.d.ts +1 -1
- package/dist/cjs/stored/vokabular.js +21 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/pos/artikel.d.ts +22 -0
- package/dist/esm/pos/artikel.js +14 -0
- package/dist/esm/pos/index.d.ts +2 -1
- package/dist/esm/pos/index.js +2 -1
- package/dist/esm/pos/kachel-referenz.d.ts +55 -0
- package/dist/esm/pos/kachel-referenz.js +98 -0
- package/dist/esm/pos/texte.d.ts +46 -0
- package/dist/esm/pos/texte.js +18 -0
- package/dist/esm/stored/draht.js +4 -0
- package/dist/esm/stored/vokabular.d.ts +1 -1
- package/dist/esm/stored/vokabular.js +21 -3
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/invoice-api.schema.json +1 -1
- package/fixtures/invoice-texts.json +1 -1
- package/fixtures/pos-texts.json +62 -1
- package/fixtures/reference-cases.json +238 -0
- package/fixtures/surface.json +5 -1
- package/fixtures/v3/antworten/belege.json +1 -1
- package/fixtures/v3/antworten/belegmail.json +1 -1
- package/fixtures/v3/antworten/berichte.json +1 -1
- package/fixtures/v3/antworten/kasse-belege.json +1 -1
- package/fixtures/v3/antworten/kasse.json +2 -2
- package/fixtures/v3/antworten/lager.json +1 -1
- package/fixtures/v3/antworten/rechnungen.json +1 -1
- package/fixtures/v3/antworten/storno.json +1 -1
- package/fixtures/v3/stored/belege.json +1 -1
- package/fixtures/v3/stored/kasse.json +2 -2
- package/fixtures/v3/stored/rechnungen.json +1 -1
- package/fixtures/v3/v3-vokabular.json +25 -5
- package/fixtures/v3/zahlbetrag-faelle.json +1 -1
- package/package.json +1 -1
package/dist/esm/pos/index.js
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
export { POS_SHORTCUT_ACTIONS, POS_SHORTCUT_DEFAULTS, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, POS_DEVICE_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_FIELDS, posTipKeptByDefault, POS_BUSINESS_VALUES, POS_DEVICE_VALUES, mergePosSettings, sanitizePosSettings, unknownPosSettingValues, posSettingsChanges, POS_SHORTCUT_SHARED_PAIRS, posShortcutConflict,
|
|
10
10
|
// Die Enums als Laufzeitlisten, benannt nach ihrem Feld.
|
|
11
11
|
THEME, FONT_SIZE, WATERMARK, QUANTITY, TIP_MODE, CHECKOUT_MODE, CARD_PROVIDER, RECEIPT_OUTPUT, LAYOUT, CATEGORY_POSITION, TILE_HEIGHT, PRINTER_TYPE, TERMINAL_VIA, TERMINAL_TYPE, PAPER_SIZE, CODE_PAGE, CUT, DRAWER_AUTO_OPEN, QR_MODE, LOGO_SIZE, SETTINGS_FONT_SIZE, TILE_STYLE, AUTO_LOGOUT_MINUTES, DISCOUNT, WATERMARK_SIDE, WATERMARK_STRENGTH, LOGO_SCALE, WATERMARK_SCALE, DONE_SCREEN_SECONDS, } from './settings.js';
|
|
12
|
-
export { fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, QUANTITY_RULES, quantityRuleForUnit, quantityDefaults, allowedQuantity, } from './artikel.js';
|
|
12
|
+
export { fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, QUANTITY_RULES, quantityRuleForUnit, quantityDefaults, allowedQuantity, isBookableArticle, tilePrompts, } from './artikel.js';
|
|
13
|
+
export { REFERENCE_MODES, REFERENCE_INPUT_MAX, REFERENCE_LABEL_MAX, REFERENCE_HINT_MAX, REFERENCE_PATTERN_MAX, REFERENCE_PATTERN_TEMPLATES, cleanReferenceText, isValidReferencePattern, isDigitsOnlyPattern, checkReference, referenceLineName, fromReferencePayload, } from './kachel-referenz.js';
|
|
13
14
|
export { getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, setMyPosLogo, posSettingsFromWire, } from './client.js';
|
|
14
15
|
export { POS_ERROR_CODES, isPosErrorCode, posErrorCode, isPosError, posFieldErrors, } from './errors.js';
|
|
15
16
|
export { distributeDiscount } from '../receipt/discount.js';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kachel mit Betrag und Referenz: eine Kachel fragt beim Antippen den Betrag
|
|
3
|
+
* (`askPrice`) und/oder eine Referenz (Honorarnote, Auftragsnummer) ab.
|
|
4
|
+
* Dieselben Regeln rechnen das Backend (`kachel-referenz-core.js`) und das
|
|
5
|
+
* Dart-Paket; der Vertrag sind die Pruefaelle `fixtures/reference-cases.json`.
|
|
6
|
+
*/
|
|
7
|
+
/** `optional` = darf leer bleiben, `required` = Pflicht. */
|
|
8
|
+
export declare const REFERENCE_MODES: readonly ["optional", "required"];
|
|
9
|
+
export type ReferenceMode = typeof REFERENCE_MODES[number];
|
|
10
|
+
/** Einstellung am Artikel (Draht `reference`). */
|
|
11
|
+
export interface PosReference {
|
|
12
|
+
mode: ReferenceMode;
|
|
13
|
+
/** Titel des Eingabefelds („Honorarnote Nr.“); steht nie am Beleg. */
|
|
14
|
+
label: string;
|
|
15
|
+
/** Platzhalter/Hilfetext („z. B. 2026/0123“); null = keiner. */
|
|
16
|
+
hint: string | null;
|
|
17
|
+
/** Regulaerer Ausdruck fuer die ganze Eingabe (ohne ^/$); null = keiner. */
|
|
18
|
+
pattern: string | null;
|
|
19
|
+
/** true = falsches Format sperrt, false = nur Warnung. */
|
|
20
|
+
patternStrict: boolean;
|
|
21
|
+
}
|
|
22
|
+
/** Hoechstlaenge der Eingabe an der Kasse. */
|
|
23
|
+
export declare const REFERENCE_INPUT_MAX = 40;
|
|
24
|
+
export declare const REFERENCE_LABEL_MAX = 30;
|
|
25
|
+
export declare const REFERENCE_HINT_MAX = 60;
|
|
26
|
+
export declare const REFERENCE_PATTERN_MAX = 200;
|
|
27
|
+
/** Vorlagen fuer das Musterfeld im Panel. */
|
|
28
|
+
export declare const REFERENCE_PATTERN_TEMPLATES: readonly {
|
|
29
|
+
key: 'digits' | 'year_number' | 'letters_digits';
|
|
30
|
+
pattern: string;
|
|
31
|
+
}[];
|
|
32
|
+
/**
|
|
33
|
+
* Eingabe an der Kasse: ohne Steuer- und Formatzeichen, Leerraum
|
|
34
|
+
* zusammengezogen und getrimmt. Bewusst ohne NFC, damit Web und Dart gleich
|
|
35
|
+
* rechnen (Dart kennt keine Unicode-Normalisierung).
|
|
36
|
+
*/
|
|
37
|
+
export declare function cleanReferenceText(text: string): string;
|
|
38
|
+
/** Ist das Muster erlaubt (kompilierbar, ohne gesperrte Konstrukte)? */
|
|
39
|
+
export declare function isValidReferencePattern(pattern: string | null | undefined): boolean;
|
|
40
|
+
/** Reines Ziffernmuster -> die Kasse zeigt die Zifferntastatur. */
|
|
41
|
+
export declare function isDigitsOnlyPattern(pattern: string | null | undefined): boolean;
|
|
42
|
+
export type ReferenceCheckResult = 'ok' | 'empty' | 'warning' | 'error';
|
|
43
|
+
/**
|
|
44
|
+
* Prueft die Eingabe an der Kasse. `empty` und `error` sperren das Uebernehmen,
|
|
45
|
+
* `warning` zeigt den Hinweis und laesst uebernehmen. Ein ungueltiges Muster
|
|
46
|
+
* (Altbestand, fremder Client) gilt wie keines.
|
|
47
|
+
*/
|
|
48
|
+
export declare function checkReference(input: string | null | undefined, reference: Pick<PosReference, 'mode' | 'pattern' | 'patternStrict'> | null | undefined): {
|
|
49
|
+
result: ReferenceCheckResult;
|
|
50
|
+
value: string;
|
|
51
|
+
};
|
|
52
|
+
/** Positionsname am Beleg: Artikelname + Leerzeichen + Referenz (leer = nur der Name). */
|
|
53
|
+
export declare function referenceLineName(articleName: string, value: string | null | undefined): string;
|
|
54
|
+
/** Liest `reference` vom Draht; alles Unbrauchbare -> null. */
|
|
55
|
+
export declare function fromReferencePayload(p: unknown): PosReference | null;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kachel mit Betrag und Referenz: eine Kachel fragt beim Antippen den Betrag
|
|
3
|
+
* (`askPrice`) und/oder eine Referenz (Honorarnote, Auftragsnummer) ab.
|
|
4
|
+
* Dieselben Regeln rechnen das Backend (`kachel-referenz-core.js`) und das
|
|
5
|
+
* Dart-Paket; der Vertrag sind die Pruefaelle `fixtures/reference-cases.json`.
|
|
6
|
+
*/
|
|
7
|
+
/** `optional` = darf leer bleiben, `required` = Pflicht. */
|
|
8
|
+
export const REFERENCE_MODES = ['optional', 'required'];
|
|
9
|
+
/** Hoechstlaenge der Eingabe an der Kasse. */
|
|
10
|
+
export const REFERENCE_INPUT_MAX = 40;
|
|
11
|
+
export const REFERENCE_LABEL_MAX = 30;
|
|
12
|
+
export const REFERENCE_HINT_MAX = 60;
|
|
13
|
+
export const REFERENCE_PATTERN_MAX = 200;
|
|
14
|
+
/** Vorlagen fuer das Musterfeld im Panel. */
|
|
15
|
+
export const REFERENCE_PATTERN_TEMPLATES = [
|
|
16
|
+
{ key: 'digits', pattern: '\\d+' },
|
|
17
|
+
{ key: 'year_number', pattern: '\\d{4}/\\d{1,6}' },
|
|
18
|
+
{ key: 'letters_digits', pattern: '[A-Za-z]{1,4}-?\\d{1,8}' },
|
|
19
|
+
];
|
|
20
|
+
// Steuer- und unsichtbare Formatzeichen.
|
|
21
|
+
// eslint-disable-next-line no-control-regex
|
|
22
|
+
const STEUERZEICHEN = /[\u0000-\u001f\u007f-\u009f\u200b-\u200f\u2028\u2029\u202a-\u202e\u2060-\u2064\ufeff]/g;
|
|
23
|
+
/**
|
|
24
|
+
* Eingabe an der Kasse: ohne Steuer- und Formatzeichen, Leerraum
|
|
25
|
+
* zusammengezogen und getrimmt. Bewusst ohne NFC, damit Web und Dart gleich
|
|
26
|
+
* rechnen (Dart kennt keine Unicode-Normalisierung).
|
|
27
|
+
*/
|
|
28
|
+
export function cleanReferenceText(text) {
|
|
29
|
+
return text.replace(STEUERZEICHEN, '').replace(/\s+/g, ' ').trim();
|
|
30
|
+
}
|
|
31
|
+
// Konstrukte, die JS und Dart nicht garantiert gleich auswerten.
|
|
32
|
+
const GESPERRT = [/\(\?<[=!]/, /\(\?<[A-Za-z]/, /\\[1-9]/, /\\k</, /\(\?[a-zA-Z]/];
|
|
33
|
+
/** Ist das Muster erlaubt (kompilierbar, ohne gesperrte Konstrukte)? */
|
|
34
|
+
export function isValidReferencePattern(pattern) {
|
|
35
|
+
if (typeof pattern !== 'string' || pattern.length < 1 || pattern.length > REFERENCE_PATTERN_MAX)
|
|
36
|
+
return false;
|
|
37
|
+
if (GESPERRT.some((r) => r.test(pattern)))
|
|
38
|
+
return false;
|
|
39
|
+
try {
|
|
40
|
+
new RegExp(`^(?:${pattern})$`);
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/** Reines Ziffernmuster -> die Kasse zeigt die Zifferntastatur. */
|
|
48
|
+
export function isDigitsOnlyPattern(pattern) {
|
|
49
|
+
if (typeof pattern !== 'string' || pattern === '' || !isValidReferencePattern(pattern))
|
|
50
|
+
return false;
|
|
51
|
+
const rest = pattern
|
|
52
|
+
.replace(/\\d/g, '')
|
|
53
|
+
.replace(/\[0-9\]/g, '')
|
|
54
|
+
.replace(/\{\d+(,\d*)?\}/g, '')
|
|
55
|
+
.replace(/\(\?:/g, '')
|
|
56
|
+
.replace(/[()|?*+^$]/g, '');
|
|
57
|
+
return rest === '';
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Prueft die Eingabe an der Kasse. `empty` und `error` sperren das Uebernehmen,
|
|
61
|
+
* `warning` zeigt den Hinweis und laesst uebernehmen. Ein ungueltiges Muster
|
|
62
|
+
* (Altbestand, fremder Client) gilt wie keines.
|
|
63
|
+
*/
|
|
64
|
+
export function checkReference(input, reference) {
|
|
65
|
+
const value = cleanReferenceText(input ?? '').slice(0, REFERENCE_INPUT_MAX);
|
|
66
|
+
if (!reference)
|
|
67
|
+
return { result: 'ok', value };
|
|
68
|
+
if (value === '')
|
|
69
|
+
return { result: reference.mode === 'required' ? 'empty' : 'ok', value };
|
|
70
|
+
if (reference.pattern && isValidReferencePattern(reference.pattern)) {
|
|
71
|
+
if (!new RegExp(`^(?:${reference.pattern})$`).test(value)) {
|
|
72
|
+
return { result: reference.patternStrict ? 'error' : 'warning', value };
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return { result: 'ok', value };
|
|
76
|
+
}
|
|
77
|
+
/** Positionsname am Beleg: Artikelname + Leerzeichen + Referenz (leer = nur der Name). */
|
|
78
|
+
export function referenceLineName(articleName, value) {
|
|
79
|
+
return value ? `${articleName} ${value}` : articleName;
|
|
80
|
+
}
|
|
81
|
+
/** Liest `reference` vom Draht; alles Unbrauchbare -> null. */
|
|
82
|
+
export function fromReferencePayload(p) {
|
|
83
|
+
if (!p || typeof p !== 'object' || Array.isArray(p))
|
|
84
|
+
return null;
|
|
85
|
+
const r = p;
|
|
86
|
+
if (r.mode !== 'optional' && r.mode !== 'required')
|
|
87
|
+
return null;
|
|
88
|
+
if (typeof r.label !== 'string' || r.label === '')
|
|
89
|
+
return null;
|
|
90
|
+
const pattern = typeof r.pattern === 'string' && r.pattern !== '' ? r.pattern : null;
|
|
91
|
+
return {
|
|
92
|
+
mode: r.mode,
|
|
93
|
+
label: r.label,
|
|
94
|
+
hint: typeof r.hint === 'string' && r.hint !== '' ? r.hint : null,
|
|
95
|
+
pattern,
|
|
96
|
+
patternStrict: pattern !== null && r.patternStrict === true,
|
|
97
|
+
};
|
|
98
|
+
}
|
package/dist/esm/pos/texte.d.ts
CHANGED
|
@@ -119,6 +119,16 @@ declare const MELDUNGEN_ROH: {
|
|
|
119
119
|
readonly 'item.description_missing': {
|
|
120
120
|
readonly text: "Bitte eine Bezeichnung eingeben – sie steht am Beleg.";
|
|
121
121
|
};
|
|
122
|
+
readonly 'reference.missing': {
|
|
123
|
+
readonly text: "Bitte „{name}“ eingeben.";
|
|
124
|
+
readonly placeholders: readonly ["name"];
|
|
125
|
+
};
|
|
126
|
+
readonly 'reference.format_invalid': {
|
|
127
|
+
readonly text: "Das Format passt nicht.";
|
|
128
|
+
};
|
|
129
|
+
readonly 'reference.format_warning': {
|
|
130
|
+
readonly text: "Das Format passt nicht. Trotzdem übernehmen?";
|
|
131
|
+
};
|
|
122
132
|
readonly 'discount.percent_invalid': {
|
|
123
133
|
readonly text: "Bitte einen Prozentwert zwischen 0,1 und 100 eingeben.";
|
|
124
134
|
};
|
|
@@ -1439,6 +1449,30 @@ declare const BESCHRIFTUNGEN_ROH: {
|
|
|
1439
1449
|
readonly text: "Rest {amount}";
|
|
1440
1450
|
readonly placeholders: readonly ["amount"];
|
|
1441
1451
|
};
|
|
1452
|
+
readonly 'cancellation.refund_cash': {
|
|
1453
|
+
readonly text: "{amount} bar";
|
|
1454
|
+
readonly placeholders: readonly ["amount"];
|
|
1455
|
+
};
|
|
1456
|
+
readonly 'cancellation.refund_card': {
|
|
1457
|
+
readonly text: "{amount} auf die Karte";
|
|
1458
|
+
readonly placeholders: readonly ["amount"];
|
|
1459
|
+
};
|
|
1460
|
+
readonly 'cancellation.refund_other': {
|
|
1461
|
+
readonly text: "{amount} per {method}";
|
|
1462
|
+
readonly placeholders: readonly ["amount", "method"];
|
|
1463
|
+
};
|
|
1464
|
+
readonly 'cancellation.refund_line': {
|
|
1465
|
+
readonly text: "{refunds} zurückgeben";
|
|
1466
|
+
readonly placeholders: readonly ["refunds"];
|
|
1467
|
+
};
|
|
1468
|
+
readonly 'cancellation.refund_line_estimated': {
|
|
1469
|
+
readonly text: "voraussichtlich {refunds} zurückgeben";
|
|
1470
|
+
readonly placeholders: readonly ["refunds"];
|
|
1471
|
+
};
|
|
1472
|
+
readonly 'cancellation.voucher_tip_cash': {
|
|
1473
|
+
readonly text: "{amount} Trinkgeld bar zurückgeben";
|
|
1474
|
+
readonly placeholders: readonly ["amount"];
|
|
1475
|
+
};
|
|
1442
1476
|
readonly 'cancellation.difference': {
|
|
1443
1477
|
readonly text: "Differenz";
|
|
1444
1478
|
};
|
|
@@ -2038,6 +2072,18 @@ declare const BESCHRIFTUNGEN_ROH: {
|
|
|
2038
2072
|
readonly 'voucher.add': {
|
|
2039
2073
|
readonly text: "Hinzufügen";
|
|
2040
2074
|
};
|
|
2075
|
+
readonly 'tile_prompt.amount': {
|
|
2076
|
+
readonly text: "Betrag";
|
|
2077
|
+
};
|
|
2078
|
+
readonly 'tile_prompt.quantity': {
|
|
2079
|
+
readonly text: "Menge";
|
|
2080
|
+
};
|
|
2081
|
+
readonly 'tile_prompt.apply': {
|
|
2082
|
+
readonly text: "Übernehmen";
|
|
2083
|
+
};
|
|
2084
|
+
readonly 'tile_prompt.apply_anyway': {
|
|
2085
|
+
readonly text: "Trotzdem übernehmen";
|
|
2086
|
+
};
|
|
2041
2087
|
readonly 'voucher.tab': {
|
|
2042
2088
|
readonly text: "Gutscheine";
|
|
2043
2089
|
};
|
package/dist/esm/pos/texte.js
CHANGED
|
@@ -69,6 +69,10 @@ const MELDUNGEN_ROH = {
|
|
|
69
69
|
'articles.vat_rate_unknown': { text: '„{name}“ hat einen Steuersatz, den die Kasse nicht kennt.', placeholders: ['name'] },
|
|
70
70
|
'item.amount_missing': { text: 'Bitte einen Betrag eingeben.' },
|
|
71
71
|
'item.description_missing': { text: 'Bitte eine Bezeichnung eingeben – sie steht am Beleg.' },
|
|
72
|
+
// Kachel mit Betrag und Referenz (1.26.0): Eingabeblatt beim Antippen.
|
|
73
|
+
'reference.missing': { text: 'Bitte „{name}“ eingeben.', placeholders: ['name'] },
|
|
74
|
+
'reference.format_invalid': { text: 'Das Format passt nicht.' },
|
|
75
|
+
'reference.format_warning': { text: 'Das Format passt nicht. Trotzdem übernehmen?' },
|
|
72
76
|
'discount.percent_invalid': { text: 'Bitte einen Prozentwert zwischen 0,1 und 100 eingeben.' },
|
|
73
77
|
// --- Kassieren -----------------------------------------------------------
|
|
74
78
|
// Der Grund ueber dem Knopf, solange der Beleg nicht abgeschlossen werden kann.
|
|
@@ -804,6 +808,15 @@ const BESCHRIFTUNGEN_ROH = {
|
|
|
804
808
|
'cancellation.as_voucher': { text: 'Als Gutschein' },
|
|
805
809
|
'cancellation.voucher_confirm': { text: '{amount} als Gutschein zurückgeben', placeholders: ['amount'] },
|
|
806
810
|
'cancellation.payment_remainder': { text: 'Rest {amount}', placeholders: ['amount'] },
|
|
811
|
+
// Die Zeile unter „wie bezahlt“: wohin das Geld zurückgeht, Teile mit „ · “ verbunden
|
|
812
|
+
// („20,00 € auf die Karte · 4,90 € bar zurückgeben“). Karte = jede Zahlart mit Karte.
|
|
813
|
+
'cancellation.refund_cash': { text: '{amount} bar', placeholders: ['amount'] },
|
|
814
|
+
'cancellation.refund_card': { text: '{amount} auf die Karte', placeholders: ['amount'] },
|
|
815
|
+
'cancellation.refund_other': { text: '{amount} per {method}', placeholders: ['amount', 'method'] },
|
|
816
|
+
'cancellation.refund_line': { text: '{refunds} zurückgeben', placeholders: ['refunds'] },
|
|
817
|
+
'cancellation.refund_line_estimated': { text: 'voraussichtlich {refunds} zurückgeben', placeholders: ['refunds'] },
|
|
818
|
+
// Als Gutschein: das Mitarbeiter-Trinkgeld geht bar zurück, nie auf den Gutschein.
|
|
819
|
+
'cancellation.voucher_tip_cash': { text: '{amount} Trinkgeld bar zurückgeben', placeholders: ['amount'] },
|
|
807
820
|
'cancellation.difference': { text: 'Differenz' },
|
|
808
821
|
// --- Storno mit oder ohne Trinkgeld (Schichten-Spec, Nachtrag 5) -----------
|
|
809
822
|
// Erste Frage bei offenem Mitarbeiter-Trinkgeld, zweite nur bei Ja und Barrueckgabe.
|
|
@@ -1029,6 +1042,11 @@ const BESCHRIFTUNGEN_ROH = {
|
|
|
1029
1042
|
'voucher.code_done': { text: 'Fertig' },
|
|
1030
1043
|
'voucher.article': { text: 'Artikel' },
|
|
1031
1044
|
'voucher.add': { text: 'Hinzufügen' },
|
|
1045
|
+
// Kachel mit Betrag und Referenz (1.26.0): Felder und Knoepfe des Eingabeblatts.
|
|
1046
|
+
'tile_prompt.amount': { text: 'Betrag' },
|
|
1047
|
+
'tile_prompt.quantity': { text: 'Menge' },
|
|
1048
|
+
'tile_prompt.apply': { text: 'Übernehmen' },
|
|
1049
|
+
'tile_prompt.apply_anyway': { text: 'Trotzdem übernehmen' },
|
|
1032
1050
|
// Gutschein-Sorten als Kacheln im Reiter „Gutscheine“ (Stufe 4b, 1.17.0): Kachel je Sorte mit Betrag
|
|
1033
1051
|
// oder „Betrag eingeben“, darunter klein die Art; dazu die feste Kachel „Leistungsgutschein“.
|
|
1034
1052
|
'voucher.tab': { text: 'Gutscheine' },
|
package/dist/esm/stored/draht.js
CHANGED
|
@@ -300,5 +300,9 @@ export function _storedArticleToWire(id, doc, functionName = 'fromStoredArticle'
|
|
|
300
300
|
const kachel = regel(regel(schema.data.articles).unter.tile).unter;
|
|
301
301
|
raus.tile = nurBekannte(raus.tile, new Set(Object.keys(kachel)));
|
|
302
302
|
}
|
|
303
|
+
if (istObjekt(raus.reference)) {
|
|
304
|
+
const referenz = regel(regel(schema.data.articles).unter.reference).unter;
|
|
305
|
+
raus.reference = nurBekannte(raus.reference, new Set(Object.keys(referenz)), { mode: katalog('articles[].reference.mode') });
|
|
306
|
+
}
|
|
303
307
|
return raus;
|
|
304
308
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
|
|
2
|
-
export declare const VOKABULAR_QUELLE = "
|
|
2
|
+
export declare const VOKABULAR_QUELLE = "a17db090c6fb519a9fb0c707461a1da228f4c6ce8e6a6e23cc6e20e2702baf0f";
|
|
3
3
|
/** Schema-Notation des Vertrags: Blatt 'aussen': 'innen', Objekt { __: 'innen', ... }, Liste [ { __: 'innen', ... } ]. */
|
|
4
4
|
export type SchemaEintrag = string | SchemaObjekt | readonly [SchemaObjekt];
|
|
5
5
|
export interface SchemaObjekt {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Erzeugt von scripts/stored-vokabular.mjs aus fixtures/v3/v3-vokabular.json.
|
|
2
2
|
// Nicht von Hand aendern: test/stored.test.ts vergleicht mit dem Vertrag.
|
|
3
3
|
/** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
|
|
4
|
-
export const VOKABULAR_QUELLE = "
|
|
4
|
+
export const VOKABULAR_QUELLE = "a17db090c6fb519a9fb0c707461a1da228f4c6ce8e6a6e23cc6e20e2702baf0f";
|
|
5
5
|
/** Schema je Endpunkt (aussen -> innen) und Wertverweise auf die Kataloge. */
|
|
6
6
|
export const SCHEMAS = {
|
|
7
7
|
"getReceipt": {
|
|
@@ -378,7 +378,16 @@ export const SCHEMAS = {
|
|
|
378
378
|
"sort": "sort"
|
|
379
379
|
},
|
|
380
380
|
"stockLocationIds": "standorte",
|
|
381
|
-
"minStockByLocation": "mindestJeStandort"
|
|
381
|
+
"minStockByLocation": "mindestJeStandort",
|
|
382
|
+
"askPrice": "preisFragen",
|
|
383
|
+
"reference": {
|
|
384
|
+
"__": "referenz",
|
|
385
|
+
"mode": "stufe",
|
|
386
|
+
"label": "bezeichnung",
|
|
387
|
+
"hint": "hinweis",
|
|
388
|
+
"pattern": "muster",
|
|
389
|
+
"patternStrict": "musterStreng"
|
|
390
|
+
}
|
|
382
391
|
}
|
|
383
392
|
]
|
|
384
393
|
},
|
|
@@ -388,6 +397,9 @@ export const SCHEMAS = {
|
|
|
388
397
|
},
|
|
389
398
|
"articles[].e1aGroup": {
|
|
390
399
|
"$catalog": "E1A_GRUPPE"
|
|
400
|
+
},
|
|
401
|
+
"articles[].reference.mode": {
|
|
402
|
+
"$catalog": "REFERENZ_STUFE"
|
|
391
403
|
}
|
|
392
404
|
}
|
|
393
405
|
}
|
|
@@ -418,7 +430,9 @@ export const ARTIKEL_FELDER = [
|
|
|
418
430
|
"groupId",
|
|
419
431
|
"tile",
|
|
420
432
|
"stockLocationIds",
|
|
421
|
-
"minStockByLocation"
|
|
433
|
+
"minStockByLocation",
|
|
434
|
+
"askPrice",
|
|
435
|
+
"reference"
|
|
422
436
|
];
|
|
423
437
|
/** Wertkataloge innen (deutsch) -> aussen (englisch). */
|
|
424
438
|
export const KATALOGE = {
|
|
@@ -689,6 +703,10 @@ export const KATALOGE = {
|
|
|
689
703
|
"stueck": "piece",
|
|
690
704
|
"dezimal": "decimal"
|
|
691
705
|
},
|
|
706
|
+
"REFERENZ_STUFE": {
|
|
707
|
+
"fragen": "optional",
|
|
708
|
+
"pflicht": "required"
|
|
709
|
+
},
|
|
692
710
|
"STORNO_GRUND": {
|
|
693
711
|
"fehleingabe": "input_error",
|
|
694
712
|
"kunde_storniert": "customer_cancelled",
|
package/dist/esm/version.d.ts
CHANGED
package/dist/esm/version.js
CHANGED
package/fixtures/pos-texts.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.26.0",
|
|
3
3
|
"messages": {
|
|
4
4
|
"network.no_connection": {
|
|
5
5
|
"text": "Keine Verbindung zum Server. Bitte die Internetverbindung prüfen und erneut versuchen."
|
|
@@ -97,6 +97,18 @@
|
|
|
97
97
|
"item.description_missing": {
|
|
98
98
|
"text": "Bitte eine Bezeichnung eingeben – sie steht am Beleg."
|
|
99
99
|
},
|
|
100
|
+
"reference.missing": {
|
|
101
|
+
"text": "Bitte „{name}“ eingeben.",
|
|
102
|
+
"placeholders": [
|
|
103
|
+
"name"
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"reference.format_invalid": {
|
|
107
|
+
"text": "Das Format passt nicht."
|
|
108
|
+
},
|
|
109
|
+
"reference.format_warning": {
|
|
110
|
+
"text": "Das Format passt nicht. Trotzdem übernehmen?"
|
|
111
|
+
},
|
|
100
112
|
"discount.percent_invalid": {
|
|
101
113
|
"text": "Bitte einen Prozentwert zwischen 0,1 und 100 eingeben."
|
|
102
114
|
},
|
|
@@ -1561,6 +1573,43 @@
|
|
|
1561
1573
|
"amount"
|
|
1562
1574
|
]
|
|
1563
1575
|
},
|
|
1576
|
+
"cancellation.refund_cash": {
|
|
1577
|
+
"text": "{amount} bar",
|
|
1578
|
+
"placeholders": [
|
|
1579
|
+
"amount"
|
|
1580
|
+
]
|
|
1581
|
+
},
|
|
1582
|
+
"cancellation.refund_card": {
|
|
1583
|
+
"text": "{amount} auf die Karte",
|
|
1584
|
+
"placeholders": [
|
|
1585
|
+
"amount"
|
|
1586
|
+
]
|
|
1587
|
+
},
|
|
1588
|
+
"cancellation.refund_other": {
|
|
1589
|
+
"text": "{amount} per {method}",
|
|
1590
|
+
"placeholders": [
|
|
1591
|
+
"amount",
|
|
1592
|
+
"method"
|
|
1593
|
+
]
|
|
1594
|
+
},
|
|
1595
|
+
"cancellation.refund_line": {
|
|
1596
|
+
"text": "{refunds} zurückgeben",
|
|
1597
|
+
"placeholders": [
|
|
1598
|
+
"refunds"
|
|
1599
|
+
]
|
|
1600
|
+
},
|
|
1601
|
+
"cancellation.refund_line_estimated": {
|
|
1602
|
+
"text": "voraussichtlich {refunds} zurückgeben",
|
|
1603
|
+
"placeholders": [
|
|
1604
|
+
"refunds"
|
|
1605
|
+
]
|
|
1606
|
+
},
|
|
1607
|
+
"cancellation.voucher_tip_cash": {
|
|
1608
|
+
"text": "{amount} Trinkgeld bar zurückgeben",
|
|
1609
|
+
"placeholders": [
|
|
1610
|
+
"amount"
|
|
1611
|
+
]
|
|
1612
|
+
},
|
|
1564
1613
|
"cancellation.difference": {
|
|
1565
1614
|
"text": "Differenz"
|
|
1566
1615
|
},
|
|
@@ -2208,6 +2257,18 @@
|
|
|
2208
2257
|
"voucher.add": {
|
|
2209
2258
|
"text": "Hinzufügen"
|
|
2210
2259
|
},
|
|
2260
|
+
"tile_prompt.amount": {
|
|
2261
|
+
"text": "Betrag"
|
|
2262
|
+
},
|
|
2263
|
+
"tile_prompt.quantity": {
|
|
2264
|
+
"text": "Menge"
|
|
2265
|
+
},
|
|
2266
|
+
"tile_prompt.apply": {
|
|
2267
|
+
"text": "Übernehmen"
|
|
2268
|
+
},
|
|
2269
|
+
"tile_prompt.apply_anyway": {
|
|
2270
|
+
"text": "Trotzdem übernehmen"
|
|
2271
|
+
},
|
|
2211
2272
|
"voucher.tab": {
|
|
2212
2273
|
"text": "Gutscheine"
|
|
2213
2274
|
},
|