@kreiseck/kasseneck-api 1.27.0 → 1.28.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/client/aufrufe.d.ts +3 -3
- package/dist/cjs/client/aufrufe.js +3 -0
- package/dist/cjs/pos/aufrunden.d.ts +6 -0
- package/dist/cjs/pos/aufrunden.js +59 -0
- package/dist/cjs/pos/client.js +12 -1
- package/dist/cjs/pos/index.d.ts +4 -3
- package/dist/cjs/pos/index.js +17 -4
- package/dist/cjs/pos/schicht-lesen.d.ts +2 -1
- package/dist/cjs/pos/schicht-lesen.js +48 -1
- package/dist/cjs/pos/schicht-typen.d.ts +106 -3
- package/dist/cjs/pos/schicht-typen.js +14 -4
- package/dist/cjs/pos/schicht.d.ts +28 -2
- package/dist/cjs/pos/schicht.js +19 -0
- package/dist/cjs/pos/settings.d.ts +39 -0
- package/dist/cjs/pos/settings.js +65 -4
- package/dist/cjs/pos/texte.d.ts +292 -0
- package/dist/cjs/pos/texte.js +108 -0
- package/dist/cjs/receipt/shift-sheet.js +29 -0
- package/dist/cjs/stored/einstellungen.js +31 -4
- package/dist/cjs/stored/vokabular.d.ts +1 -1
- package/dist/cjs/stored/vokabular.js +29 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client/aufrufe.d.ts +3 -3
- package/dist/esm/client/aufrufe.js +3 -0
- package/dist/esm/pos/aufrunden.d.ts +6 -0
- package/dist/esm/pos/aufrunden.js +56 -0
- package/dist/esm/pos/client.js +13 -2
- package/dist/esm/pos/index.d.ts +4 -3
- package/dist/esm/pos/index.js +5 -4
- package/dist/esm/pos/schicht-lesen.d.ts +2 -1
- package/dist/esm/pos/schicht-lesen.js +47 -1
- package/dist/esm/pos/schicht-typen.d.ts +106 -3
- package/dist/esm/pos/schicht-typen.js +13 -3
- package/dist/esm/pos/schicht.d.ts +28 -2
- package/dist/esm/pos/schicht.js +19 -1
- package/dist/esm/pos/settings.d.ts +39 -0
- package/dist/esm/pos/settings.js +60 -3
- package/dist/esm/pos/texte.d.ts +292 -0
- package/dist/esm/pos/texte.js +108 -0
- package/dist/esm/receipt/shift-sheet.js +29 -0
- package/dist/esm/stored/einstellungen.js +32 -5
- package/dist/esm/stored/vokabular.d.ts +1 -1
- package/dist/esm/stored/vokabular.js +29 -2
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/duplicate-cases.json +6 -0
- package/fixtures/expected/duplicate.shift-close.hex +28 -27
- package/fixtures/expected/shift-close-blind.grid32.txt +1 -0
- package/fixtures/expected/shift-close-blind.grid48.txt +1 -0
- package/fixtures/expected/shift-close-blind.lines.json +6 -0
- package/fixtures/expected/shift-close-put-in.grid32.txt +1 -0
- package/fixtures/expected/shift-close-put-in.grid48.txt +1 -0
- package/fixtures/expected/shift-close-put-in.lines.json +6 -0
- package/fixtures/expected/shift-close-take-out.grid32.txt +1 -0
- package/fixtures/expected/shift-close-take-out.grid48.txt +1 -0
- package/fixtures/expected/shift-close-take-out.lines.json +6 -0
- package/fixtures/expected/shift-close.grid32.txt +1 -0
- package/fixtures/expected/shift-close.grid48.txt +1 -0
- package/fixtures/expected/shift-close.lines.json +6 -0
- package/fixtures/expected/shift-interim.grid32.txt +1 -0
- package/fixtures/expected/shift-interim.grid48.txt +1 -0
- package/fixtures/expected/shift-interim.lines.json +6 -0
- 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 +337 -1
- package/fixtures/renames-1.0.json +30 -0
- package/fixtures/shift-ablauf-cases.json +182 -0
- package/fixtures/shift-receipts.json +15 -15
- package/fixtures/surface.json +41 -2
- package/fixtures/tip-round-up-cases.json +27 -0
- package/fixtures/v3/antworten/belege.json +2 -2
- package/fixtures/v3/antworten/belegmail.json +2 -2
- package/fixtures/v3/antworten/berichte.json +2 -2
- package/fixtures/v3/antworten/kasse-belege.json +2 -2
- package/fixtures/v3/antworten/kasse.json +504 -4
- package/fixtures/v3/antworten/lager.json +1 -1
- package/fixtures/v3/antworten/rechnungen.json +2 -2
- package/fixtures/v3/antworten/storno.json +2 -2
- package/fixtures/v3/stored/belege.json +2 -2
- package/fixtures/v3/stored/kasse.json +520 -12
- package/fixtures/v3/stored/rechnungen.json +2 -2
- package/fixtures/v3/v3-vokabular.json +131 -9
- package/fixtures/v3/zahlbetrag-faelle.json +2 -2
- package/package.json +1 -1
package/dist/cjs/pos/texte.js
CHANGED
|
@@ -440,6 +440,15 @@ const MELDUNGEN_ROH = {
|
|
|
440
440
|
// --- Nur App -------------------------------------------------------------
|
|
441
441
|
'app.not_in_browser': { text: 'Die Kassen-App läuft nicht im Browser – dafür gibt es kasse.kasseneck.at.', only: ['app'] },
|
|
442
442
|
'app.open_in_browser': { text: 'Bitte im Browser öffnen: {target}', placeholders: ['target'], only: ['app'] },
|
|
443
|
+
// --- Schicht-Ablauf der Kasse (1.28.0) -----------------------------------
|
|
444
|
+
'shift.started_taken_over': { text: 'Schicht {number} hat begonnen – mit {amount} in der Lade, übernommen von Schicht {from} ({time}).', placeholders: ['number', 'amount', 'from', 'time'] },
|
|
445
|
+
'tip.summary': { text: 'Trinkgeld {tip} · der Gast zahlt {total}', placeholders: ['tip', 'total'] },
|
|
446
|
+
'tip.total_below_sum': { text: 'Der Betrag liegt unter der Summe.' },
|
|
447
|
+
'shift.interim_saved': { text: 'Zählung festgehalten.' },
|
|
448
|
+
// Waehrend Zwischenzaehlung oder Abschluss rechts: getippte Wege der Kopfzeile sagen, warum sie gesperrt sind.
|
|
449
|
+
'shift.finish_step_first': { text: 'Erst den Schritt rechts abschließen oder abbrechen.' },
|
|
450
|
+
'tip.revenue_hint': { text: 'Steuerpflichtiges Trinkgeld zählt als Umsatz des Betriebs und wird nicht ausgezahlt.' },
|
|
451
|
+
'tip.unassigned_hint': { text: 'Trinkgeld ohne angemeldeten Benutzer.' },
|
|
443
452
|
};
|
|
444
453
|
// Auf den gemeinsamen Typ gebracht: `Object.entries(MESSAGES)` liefert sonst
|
|
445
454
|
// pro Schluessel den engsten Literaltyp, und `placeholders`/`only` waeren nur
|
|
@@ -921,6 +930,7 @@ const BESCHRIFTUNGEN_ROH = {
|
|
|
921
930
|
'cash_movement.type_expense': { text: 'Barausgabe' },
|
|
922
931
|
'cash_movement.type_count_difference': { text: 'Zähldifferenz' },
|
|
923
932
|
'cash_movement.type_handover_difference': { text: 'Übergabedifferenz' },
|
|
933
|
+
'cash_movement.type_interim_difference': { text: 'Zwischenzählung' },
|
|
924
934
|
// Bon der Schicht (Z-Bon, X-Bon, Kassenbewegung): Titel und Zeilennamen.
|
|
925
935
|
'shift_receipt.title_close': { text: 'Schichtabschluss' },
|
|
926
936
|
'shift_receipt.title_interim': { text: 'Zwischenbericht' },
|
|
@@ -1213,6 +1223,104 @@ const BESCHRIFTUNGEN_ROH = {
|
|
|
1213
1223
|
// mit Belegnummer und Uhrzeit. Scheitert er, gilt `completion.zero_receipt_failed`.
|
|
1214
1224
|
'zero_receipt.create': { text: 'Nullbeleg erstellen' },
|
|
1215
1225
|
'zero_receipt.created': { text: 'Nullbeleg {number} erstellt, {time}', placeholders: ['number', 'time'] },
|
|
1226
|
+
// Prüfung kompakt (1.28.0): der Nullbeleg steht danach wie ein Verkaufsbeleg da (Titel, Rückweg);
|
|
1227
|
+
// das DEP fragt den Zeitraum erst nach „DEP exportieren“ in einem Fenster.
|
|
1228
|
+
'zero_receipt.done_title': { text: 'Nullbeleg erstellt' },
|
|
1229
|
+
'zero_receipt.back': { text: 'Zurück zur Prüfung' },
|
|
1230
|
+
'dep.export': { text: 'DEP exportieren' },
|
|
1231
|
+
'dep.period_question': { text: 'Welcher Zeitraum?' },
|
|
1232
|
+
'common.close': { text: 'Schließen' },
|
|
1233
|
+
// --- Schicht-Ablauf der Kasse (1.28.0) -----------------------------------
|
|
1234
|
+
// Schicht beginnen, laufen lassen, zaehlen, schliessen. `shift.close_title` und
|
|
1235
|
+
// `shift.running_since` gibt es seit 1.11.0 mit anderem Wortlaut und bleiben; die
|
|
1236
|
+
// Fassungen mit Nummer bzw. Lade heissen darum `shift.close_title_numbered` und
|
|
1237
|
+
// `shift.running_since_drawer`.
|
|
1238
|
+
'shift.state_closed': { text: 'Schicht geschlossen' },
|
|
1239
|
+
'shift.start_title': { text: 'Schicht beginnen' },
|
|
1240
|
+
'shift.band_closed': { text: 'Zum Verkaufen rechts die Schicht beginnen.' },
|
|
1241
|
+
'shift.band_closing': { text: 'Verkaufen ist pausiert, bis du fertig bist oder abbrichst.' },
|
|
1242
|
+
'shift.band_interim': { text: 'Verkaufen ist kurz pausiert.' },
|
|
1243
|
+
'shift.band_cash': { text: 'Zum Verkaufen auf die Kacheln tippen.' },
|
|
1244
|
+
// Trinkgeld, das als Umsatz zählt (steuerpflichtig, Inhaber) bzw. ohne Empfänger -- nur Anzeige im Kassenstand,
|
|
1245
|
+
// wortgleich mit dem Kundenbereich.
|
|
1246
|
+
'tip.revenue_title': { text: 'Als Umsatz erfasst' },
|
|
1247
|
+
'tip.revenue_badge': { text: 'Umsatz' },
|
|
1248
|
+
'tip.unassigned': { text: 'Nicht zugeordnet' },
|
|
1249
|
+
'shift.last_shift': { text: 'Letzte Schicht' },
|
|
1250
|
+
'shift.in_drawer_by_system': { text: 'Laut Kasse in der Lade' },
|
|
1251
|
+
'shift.take_over_amount': { text: '{amount} übernehmen', placeholders: ['amount'] },
|
|
1252
|
+
'shift.top_up': { text: 'Auffüllen' },
|
|
1253
|
+
'shift.missing': { text: 'fehlen {amount}', placeholders: ['amount'] },
|
|
1254
|
+
'shift.count_coins': { text: 'Scheine und Münzen zählen' },
|
|
1255
|
+
'shift.count_please': { text: 'Zähl bitte, was in der Lade liegt.' },
|
|
1256
|
+
'drawer.open_for_count': { text: 'Lade öffnen zum Zählen' },
|
|
1257
|
+
'drawer.open_for_tips': { text: 'Lade öffnen für Trinkgeld' },
|
|
1258
|
+
'drawer.open_for_take': { text: 'Lade öffnen zum Entnehmen' },
|
|
1259
|
+
'shift.close_title_numbered': { text: 'Schicht {number} schließen', placeholders: ['number'] },
|
|
1260
|
+
'shift.closed_title': { text: 'Schicht {number} geschlossen', placeholders: ['number'] },
|
|
1261
|
+
'shift.running_since_drawer': { text: '{drawer} · läuft seit {time} ({duration})', placeholders: ['drawer', 'time', 'duration'] },
|
|
1262
|
+
'shift.step_count': { text: 'Zählen' },
|
|
1263
|
+
'shift.step_tips': { text: 'Trinkgeld' },
|
|
1264
|
+
'shift.step_take': { text: 'Entnehmen' },
|
|
1265
|
+
'shift.step_done': { text: 'Fertig' },
|
|
1266
|
+
'shift.expected': { text: 'In der Lade sollten sein' },
|
|
1267
|
+
'shift.of_which_cash_tips': { text: 'davon Trinkgeld bar' },
|
|
1268
|
+
'shift.breakdown': { text: 'So setzt sich das zusammen' },
|
|
1269
|
+
'shift.part_opening': { text: 'Anfang' },
|
|
1270
|
+
'shift.part_cash_sales': { text: 'Barverkäufe' },
|
|
1271
|
+
'shift.part_cash_tips': { text: 'Trinkgeld bar' },
|
|
1272
|
+
'shift.part_cancellations': { text: 'Storno bar' },
|
|
1273
|
+
'shift.part_cash_in': { text: 'Einzahlungen' },
|
|
1274
|
+
'shift.part_cash_out': { text: 'Ausgaben aus der Lade' },
|
|
1275
|
+
'shift.part_interim': { text: 'Zwischenzählung' },
|
|
1276
|
+
'tip.who_takes_now': { text: 'Wer nimmt sein Trinkgeld jetzt bar mit?' },
|
|
1277
|
+
'tip.later_hint': { text: 'Was du nicht auszahlst, bleibt offen und wird in einer späteren Schicht ausgezahlt.' },
|
|
1278
|
+
'tip.later': { text: 'Später' },
|
|
1279
|
+
'tip.pay_out': { text: 'Auszahlen' },
|
|
1280
|
+
'tip.pay_out_amount': { text: '{amount} auszahlen', placeholders: ['amount'] },
|
|
1281
|
+
'shift.now_in_drawer': { text: 'Jetzt in der Lade' },
|
|
1282
|
+
'shift.interim_title': { text: 'Schicht {number} zählen', placeholders: ['number'] },
|
|
1283
|
+
'shift.interim_save': { text: 'Zählung festhalten' },
|
|
1284
|
+
'shift.opening_not_counted': { text: 'Anfang nicht gezählt' },
|
|
1285
|
+
// Titel der Hinweiskarte, wenn eine Schicht ohne Zaehlen uebernommen wurde (Unterzeile: `shift.taken_over_unchecked_by`).
|
|
1286
|
+
'shift.taken_over_unchecked_by': { text: '{name}, {time}', placeholders: ['name', 'time'] },
|
|
1287
|
+
'shift.taken_over_unchecked': { text: 'Schicht {number} wurde ohne Zählen übernommen', placeholders: ['number'] },
|
|
1288
|
+
// Trinkgeld-Arten beim Kassieren (Reiter) und ihre Hilfstexte.
|
|
1289
|
+
'tip.kind_percent': { text: 'Prozent' },
|
|
1290
|
+
'tip.kind_round_up': { text: 'Aufrunden' },
|
|
1291
|
+
'tip.kind_total': { text: 'Gesamt' },
|
|
1292
|
+
'tip.round_to': { text: 'auf {amount}', placeholders: ['amount'] },
|
|
1293
|
+
'tip.guest_pays_total': { text: 'Der Gast zahlt insgesamt' },
|
|
1294
|
+
'tip.remainder_is_tip': { text: 'Rest ist Trinkgeld' },
|
|
1295
|
+
'voucher.section': { text: 'Gutschein' },
|
|
1296
|
+
'voucher.code_placeholder': { text: 'Code eingeben oder scannen' },
|
|
1297
|
+
// Breite der rechten Spalte (Geraete-Einstellung `cartWidth`) und ihre Werte.
|
|
1298
|
+
'settings.cart_width': { text: 'Breite der rechten Spalte' },
|
|
1299
|
+
'settings.cart_width_narrow': { text: 'Schmal' },
|
|
1300
|
+
'settings.cart_width_medium': { text: 'Mittel' },
|
|
1301
|
+
'settings.cart_width_wide': { text: 'Breit' },
|
|
1302
|
+
// Z-Bon der Schicht: Zwischenzaehlung, Zaehlung vor der Auszahlung, Teile der Differenz.
|
|
1303
|
+
'shift_receipt.opening_not_counted': { text: 'Anfang übernommen, nicht gezählt' },
|
|
1304
|
+
'shift_receipt.interim_count': { text: 'Zwischenzählung' },
|
|
1305
|
+
'shift_receipt.counted_before_payout': { text: 'Gezählt' },
|
|
1306
|
+
'shift_receipt.difference_part_interim': { text: 'davon Zwischenzählung' },
|
|
1307
|
+
'shift_receipt.difference_part_closing': { text: 'davon Abschluss' },
|
|
1308
|
+
// Nachtrag Schicht-Ablauf (1.28.0): Band-Titel ohne Punkt wie `shift.state_closed`.
|
|
1309
|
+
'shift.state_closing': { text: 'Schicht wird geschlossen' },
|
|
1310
|
+
'shift.state_interim': { text: 'Zwischenzählung' },
|
|
1311
|
+
'shift.tips_paid_out': { text: 'Trinkgeld ausgezahlt' },
|
|
1312
|
+
'shift.difference_none': { text: 'stimmt' },
|
|
1313
|
+
'shift.start_new': { text: 'Neue Schicht beginnen' },
|
|
1314
|
+
'shift.drawer_from_to': { text: '{drawer} · {from} bis {to}', placeholders: ['drawer', 'from', 'to'] },
|
|
1315
|
+
'shift.running_since_by': { text: '{drawer} · läuft seit {time} ({name})', placeholders: ['drawer', 'time', 'name'] },
|
|
1316
|
+
'shift.z_receipt_printed': { text: 'Z-Bon gedruckt' },
|
|
1317
|
+
'shift.count_now': { text: 'Jetzt zählen' },
|
|
1318
|
+
'shift.interim_entry': { text: 'Zwischenzählung' },
|
|
1319
|
+
'drawer.open': { text: 'Lade öffnen' },
|
|
1320
|
+
'time.today_at': { text: 'heute {time}', placeholders: ['time'] },
|
|
1321
|
+
'tip.summary_percent': { text: 'Trinkgeld {tip} ({percent} %)', placeholders: ['tip', 'percent'] },
|
|
1322
|
+
'settings.tip_kinds': { text: 'Trinkgeld-Arten' },
|
|
1323
|
+
'settings.tip_start': { text: 'Zuerst offen' },
|
|
1216
1324
|
};
|
|
1217
1325
|
exports.LABELS = BESCHRIFTUNGEN_ROH;
|
|
1218
1326
|
/**
|
|
@@ -63,6 +63,11 @@ const ortText = (ort) => beschriftung(`shift_receipt.location_${ort}`, ort);
|
|
|
63
63
|
function zahlartText(methode) {
|
|
64
64
|
return methode === 'card' ? (0, texte_js_1.labelText)('payment_method.card') : methode;
|
|
65
65
|
}
|
|
66
|
+
/** Uhrzeit in Wien als `HH:mm`; unlesbar -> `null`. */
|
|
67
|
+
function uhr(iso) {
|
|
68
|
+
const t = zeit(iso);
|
|
69
|
+
return t === null ? null : t.slice(11);
|
|
70
|
+
}
|
|
66
71
|
/** Je Schein und Muenze eine eingerueckte Zeile, vom groessten Wert abwaerts; Anzahl 0 faellt weg. */
|
|
67
72
|
function stueckelungZeilen(karte) {
|
|
68
73
|
if (karte === null)
|
|
@@ -132,10 +137,17 @@ function shiftReceiptLayout(receipt, options = {}) {
|
|
|
132
137
|
else if (bon.openingFloatTakenOver)
|
|
133
138
|
zeilen.push(text(start));
|
|
134
139
|
zeilen.push(...stueckelungZeilen(bon.openingDenominations));
|
|
140
|
+
// Nur wenn der Server den Anfang ausdruecklich als nicht gezaehlt meldet; ohne das Feld bleibt der Bon wie bisher.
|
|
141
|
+
if (bon.openingCounted === false)
|
|
142
|
+
zeilen.push(text((0, texte_js_1.labelText)('shift_receipt.opening_not_counted')));
|
|
135
143
|
if (bon.cashSalesCents !== null)
|
|
136
144
|
zeilen.push(betrag((0, texte_js_1.labelText)('shift_receipt.cash_sales'), bon.cashSalesCents));
|
|
137
145
|
if (bon.cashCancellationsCents !== null)
|
|
138
146
|
zeilen.push(betrag((0, texte_js_1.labelText)('shift_receipt.cash_cancellations'), bon.cashCancellationsCents));
|
|
147
|
+
// Summe der Zwischenzaehlungs-Differenzen: damit Start + Bar + Bewegungen + diese = Soll aufgeht.
|
|
148
|
+
if (bon.interimDifferenceCents !== undefined && bon.interimDifferenceCents !== 0) {
|
|
149
|
+
zeilen.push(betrag((0, texte_js_1.labelText)('shift_receipt.interim_count'), bon.interimDifferenceCents));
|
|
150
|
+
}
|
|
139
151
|
if (bon.movements.length > 0) {
|
|
140
152
|
zeilen.push(text((0, texte_js_1.labelText)('shift_receipt.movements'), 'left', true));
|
|
141
153
|
for (const m of bon.movements) {
|
|
@@ -146,12 +158,29 @@ function shiftReceiptLayout(receipt, options = {}) {
|
|
|
146
158
|
}
|
|
147
159
|
if (bon.expectedCents !== null)
|
|
148
160
|
zeilen.push(betrag((0, texte_js_1.labelText)('shift_receipt.expected'), bon.expectedCents));
|
|
161
|
+
// Mit `countedBeforePayout` geschlossen: erst der Rohwert der Zaehlung („Gezaehlt“, mit Stueckelung), dann das Ist nach der Auszahlung.
|
|
162
|
+
if (bon.countedBeforePayoutCents !== undefined && bon.countedBeforePayoutCents !== null) {
|
|
163
|
+
zeilen.push(betrag((0, texte_js_1.labelText)('shift_receipt.counted_before_payout'), bon.countedBeforePayoutCents));
|
|
164
|
+
zeilen.push(...stueckelungZeilen(bon.countedBeforePayoutDenominations ?? null));
|
|
165
|
+
}
|
|
149
166
|
if (bon.countedCents !== null) {
|
|
150
167
|
zeilen.push(betrag((0, texte_js_1.labelText)('shift_receipt.counted'), bon.countedCents));
|
|
151
168
|
zeilen.push(...stueckelungZeilen(bon.countedDenominations));
|
|
152
169
|
}
|
|
153
170
|
if (bon.differenceCents !== null)
|
|
154
171
|
zeilen.push(betrag((0, texte_js_1.labelText)('shift_receipt.difference'), bon.differenceCents));
|
|
172
|
+
// Die Gesamtdifferenz in Teilen: je Zwischenzaehlung (mit Uhrzeit) und der Abschluss; eine Zwischenzaehlung ohne Differenz faellt weg.
|
|
173
|
+
for (const t of bon.differenceParts ?? []) {
|
|
174
|
+
if (t.type === 'interim' && t.cents === 0)
|
|
175
|
+
continue;
|
|
176
|
+
if (t.type === 'interim') {
|
|
177
|
+
const um = uhr(t.at);
|
|
178
|
+
zeilen.push(betrag(`${(0, texte_js_1.labelText)('shift_receipt.difference_part_interim')}${um === null ? '' : ` ${um}`}`, t.cents));
|
|
179
|
+
}
|
|
180
|
+
else if (t.type === 'closing') {
|
|
181
|
+
zeilen.push(betrag((0, texte_js_1.labelText)('shift_receipt.difference_part_closing'), t.cents));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
155
184
|
if (bon.comment)
|
|
156
185
|
zeilen.push(text(`${(0, texte_js_1.labelText)('shift_receipt.comment')}: ${bon.comment}`));
|
|
157
186
|
zeilen.push(...nachZaehlungZeilen(bon));
|
|
@@ -59,6 +59,13 @@ const GERAET_OPTIONAL = Object.fromEntries(settings_js_1.POS_DEVICE_OPTIONAL_FIE
|
|
|
59
59
|
* gespeichert sind; sonst fehlen sie still.
|
|
60
60
|
*/
|
|
61
61
|
const BETRIEB_OPTIONAL = Object.fromEntries(settings_js_1.POS_BUSINESS_OPTIONAL_FIELDS.map((feld) => [feld, (v) => typeof v === 'boolean']));
|
|
62
|
+
/**
|
|
63
|
+
* Optionale Wahlfelder (Zwilling von `BETRIEB_OPTIONAL.tgArten/tgStart` und `GERAET_OPTIONAL.korbBreite`):
|
|
64
|
+
* gespeichert in der inneren Form (`['prozent', 'aufrunden']`, `'schmal'`), nur gueltige Werte gehen
|
|
65
|
+
* hinaus, uebersetzt durch den Katalog. `tipKinds` ist eine nichtleere Teilmenge ohne Dubletten
|
|
66
|
+
* (`tgArtenListe`). Ob der Start unter den Arten liegt, rechnet der Leser ([posTipStart]).
|
|
67
|
+
*/
|
|
68
|
+
const WAHLFELDER = { business: settings_js_1.POS_BUSINESS_OPTIONAL_CHOICES, device: settings_js_1.POS_DEVICE_OPTIONAL_CHOICES };
|
|
62
69
|
/** Aufzaehlungen (aussen, englisch) je Teil. */
|
|
63
70
|
const AUFZAEHLUNGEN = {
|
|
64
71
|
business: settings_js_1.POS_BUSINESS_VALUES, device: settings_js_1.POS_DEVICE_VALUES,
|
|
@@ -75,7 +82,8 @@ function teilSchema(teil) {
|
|
|
75
82
|
return (0, draht_js_1.regel)(vokabular_js_1.SCHEMAS.getKasseSettings.data[teil]).unter;
|
|
76
83
|
}
|
|
77
84
|
function katalogFuer(teil, aussen) {
|
|
78
|
-
const
|
|
85
|
+
const werte = vokabular_js_1.SCHEMAS.getKasseSettings.werte;
|
|
86
|
+
const verweis = werte[`${teil}.${aussen}`] ?? werte[`${teil}.${aussen}[]`];
|
|
79
87
|
return verweis ? (0, draht_js_2.katalogVon)(verweis) ?? null : null;
|
|
80
88
|
}
|
|
81
89
|
/** Tasten: aeussere und innere Aktionsnamen, Vorgabe und Paare in innerer Form. */
|
|
@@ -142,6 +150,22 @@ function teilNachAussen(teil, gespeichert, weg) {
|
|
|
142
150
|
if (aussen === undefined || w === undefined)
|
|
143
151
|
continue;
|
|
144
152
|
const pfad = `${teil}.${aussen}`;
|
|
153
|
+
if ((0, draht_js_1.hat)(WAHLFELDER, teil) && WAHLFELDER[teil].includes(aussen)) {
|
|
154
|
+
const katalog = katalogFuer(teil, aussen);
|
|
155
|
+
const einzeln = (e) => (typeof e === 'string' && katalog !== null && (0, draht_js_1.hat)(katalog, e) ? katalog[e] : undefined);
|
|
156
|
+
if (aussen === 'tipKinds') {
|
|
157
|
+
const arten = Array.isArray(w) && w.length > 0 && w.length <= (katalog ? Object.keys(katalog).length : 0) && new Set(w).size === w.length
|
|
158
|
+
? w.map(einzeln) : null;
|
|
159
|
+
if (arten !== null && arten.every((a) => a !== undefined))
|
|
160
|
+
raus[aussen] = arten;
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
const wert = einzeln(w);
|
|
164
|
+
if (wert !== undefined)
|
|
165
|
+
raus[aussen] = wert;
|
|
166
|
+
}
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
145
169
|
if (teil === 'device' && (0, draht_js_1.hat)(GERAET_OPTIONAL, aussen)) {
|
|
146
170
|
if (GERAET_OPTIONAL[aussen](w))
|
|
147
171
|
raus[aussen] = w;
|
|
@@ -218,7 +242,10 @@ function _storedPosSettingsToWire(stored) {
|
|
|
218
242
|
}
|
|
219
243
|
/** Nur fuer den Test: die Feldliste der Pruefer (muss mit der Vorgabe deckungsgleich sein). */
|
|
220
244
|
exports._PRUEFER_FELDER = Object.freeze({
|
|
221
|
-
business: [...Object.keys(PRUEFER.business), ...Object.keys(settings_js_1.POS_BUSINESS_VALUES), ...Object.keys(BETRIEB_OPTIONAL), ...Object.keys(KARTEN)],
|
|
222
|
-
device: [...Object.keys(PRUEFER.device), ...Object.keys(settings_js_1.POS_DEVICE_VALUES), ...Object.keys(GERAET_OPTIONAL), 'shortcuts'],
|
|
223
|
-
standard: {
|
|
245
|
+
business: [...new Set([...Object.keys(PRUEFER.business), ...Object.keys(settings_js_1.POS_BUSINESS_VALUES), ...Object.keys(BETRIEB_OPTIONAL), ...Object.keys(KARTEN)])],
|
|
246
|
+
device: [...new Set([...Object.keys(PRUEFER.device), ...Object.keys(settings_js_1.POS_DEVICE_VALUES), ...Object.keys(GERAET_OPTIONAL), 'shortcuts'])],
|
|
247
|
+
standard: {
|
|
248
|
+
business: [...Object.keys(settings_js_1.POS_BUSINESS_DEFAULTS), ...settings_js_1.POS_BUSINESS_OPTIONAL_FIELDS, ...settings_js_1.POS_BUSINESS_OPTIONAL_CHOICES],
|
|
249
|
+
device: [...Object.keys(settings_js_1.POS_DEVICE_DEFAULTS), ...settings_js_1.POS_DEVICE_OPTIONAL_FIELDS, ...settings_js_1.POS_DEVICE_OPTIONAL_CHOICES],
|
|
250
|
+
},
|
|
224
251
|
});
|
|
@@ -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 = "eefe98022cb8b6287b5c72ae919341a5fb5c3671fc5cf9afae3d29c35402398b";
|
|
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 {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.KATALOGE = exports.ARTIKEL_FELDER = exports.SCHEMAS = exports.VOKABULAR_QUELLE = void 0;
|
|
6
6
|
/** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
|
|
7
|
-
exports.VOKABULAR_QUELLE = "
|
|
7
|
+
exports.VOKABULAR_QUELLE = "eefe98022cb8b6287b5c72ae919341a5fb5c3671fc5cf9afae3d29c35402398b";
|
|
8
8
|
/** Schema je Endpunkt (aussen -> innen) und Wertverweise auf die Kataloge. */
|
|
9
9
|
exports.SCHEMAS = {
|
|
10
10
|
"getReceipt": {
|
|
@@ -153,6 +153,8 @@ exports.SCHEMAS = {
|
|
|
153
153
|
"tipChips": "tgChips",
|
|
154
154
|
"exactCash": "schnellbar",
|
|
155
155
|
"tipKeptByDefault": "tgDirekt",
|
|
156
|
+
"tipKinds": "tgArten",
|
|
157
|
+
"tipStart": "tgStart",
|
|
156
158
|
"checkoutMode": "kassierenModus",
|
|
157
159
|
"receiptOutput": "belegAusgabe",
|
|
158
160
|
"doneScreenSeconds": "fertigSekunden",
|
|
@@ -217,7 +219,8 @@ exports.SCHEMAS = {
|
|
|
217
219
|
"terminalTid": "terminalTid",
|
|
218
220
|
"terminalVia": "terminalVia",
|
|
219
221
|
"terminalType": "terminalArt",
|
|
220
|
-
"shortcutHints": "tastenMarken"
|
|
222
|
+
"shortcutHints": "tastenMarken",
|
|
223
|
+
"cartWidth": "korbBreite"
|
|
221
224
|
},
|
|
222
225
|
"vouchers": {
|
|
223
226
|
"__": "gutscheine",
|
|
@@ -322,6 +325,12 @@ exports.SCHEMAS = {
|
|
|
322
325
|
"business.tipMode": {
|
|
323
326
|
"$catalog": "KASSE_BETRIEB_WERTE.tipMode"
|
|
324
327
|
},
|
|
328
|
+
"business.tipKinds[]": {
|
|
329
|
+
"$catalog": "KASSE_BETRIEB_WERTE.tipKinds[]"
|
|
330
|
+
},
|
|
331
|
+
"business.tipStart": {
|
|
332
|
+
"$catalog": "KASSE_BETRIEB_WERTE.tipStart"
|
|
333
|
+
},
|
|
325
334
|
"business.checkoutMode": {
|
|
326
335
|
"$catalog": "KASSE_BETRIEB_WERTE.checkoutMode"
|
|
327
336
|
},
|
|
@@ -349,6 +358,9 @@ exports.SCHEMAS = {
|
|
|
349
358
|
"device.terminalType": {
|
|
350
359
|
"$catalog": "KASSE_GERAET_WERTE.terminalType"
|
|
351
360
|
},
|
|
361
|
+
"device.cartWidth": {
|
|
362
|
+
"$catalog": "KASSE_GERAET_WERTE.cartWidth"
|
|
363
|
+
},
|
|
352
364
|
"vouchers.valueVoucherType": {
|
|
353
365
|
"mehrzweck": "multi_purpose",
|
|
354
366
|
"einzweck": "single_purpose"
|
|
@@ -657,11 +669,21 @@ exports.KATALOGE = {
|
|
|
657
669
|
"streifen": "stripe",
|
|
658
670
|
"voll": "full"
|
|
659
671
|
},
|
|
672
|
+
"KASSE_BETRIEB_WERTE.tipKinds[]": {
|
|
673
|
+
"prozent": "percent",
|
|
674
|
+
"aufrunden": "round_up",
|
|
675
|
+
"gesamt": "total"
|
|
676
|
+
},
|
|
660
677
|
"KASSE_BETRIEB_WERTE.tipMode": {
|
|
661
678
|
"betrag": "amount",
|
|
662
679
|
"gesamt": "total",
|
|
663
680
|
"beides": "both"
|
|
664
681
|
},
|
|
682
|
+
"KASSE_BETRIEB_WERTE.tipStart": {
|
|
683
|
+
"prozent": "percent",
|
|
684
|
+
"aufrunden": "round_up",
|
|
685
|
+
"gesamt": "total"
|
|
686
|
+
},
|
|
665
687
|
"KASSE_BETRIEB_WERTE.watermark": {
|
|
666
688
|
"aus": "off",
|
|
667
689
|
"anmeldung": "login",
|
|
@@ -672,6 +694,11 @@ exports.KATALOGE = {
|
|
|
672
694
|
"mitte": "center",
|
|
673
695
|
"rechts": "right"
|
|
674
696
|
},
|
|
697
|
+
"KASSE_GERAET_WERTE.cartWidth": {
|
|
698
|
+
"schmal": "narrow",
|
|
699
|
+
"mittel": "medium",
|
|
700
|
+
"breit": "wide"
|
|
701
|
+
},
|
|
675
702
|
"KASSE_GERAET_WERTE.categoryPosition": {
|
|
676
703
|
"oben": "top",
|
|
677
704
|
"links": "left"
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* umhuellt, muss ihn weiterhin absetzen koennen.
|
|
14
14
|
*/
|
|
15
15
|
import type { FileOrData, FileOrDataCallOptions, PdfOrData, TransportBodyFields, TransportCallOptions } from './transport.js';
|
|
16
|
-
export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createDepExport", "createDepHandoverLink", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCashregisterReport", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getDepExport", "getDepExportFile", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceSetupStatus", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "getReportV2", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listBrands", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyStock", "listMyStockLocations", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listReceipts", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "revokeDepHandoverLink", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook", "getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf", "orderSignatureCard", "getSignatureCardOrder", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "logReceiptOutputs", "getRegisterInspectionInfo", "reportConnectState"];
|
|
16
|
+
export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createDepExport", "createDepHandoverLink", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCashregisterReport", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getDepExport", "getDepExportFile", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceSetupStatus", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "getReportV2", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listBrands", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyStock", "listMyStockLocations", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listReceipts", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "revokeDepHandoverLink", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook", "getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf", "orderSignatureCard", "getSignatureCardOrder", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "getRegisterInspectionInfo", "reportConnectState"];
|
|
17
17
|
export type ApiCall = typeof ALL_CALLS[number];
|
|
18
18
|
/**
|
|
19
19
|
* Die oeffentlichen Endpunkte unter `/v3` (`https://api.kasseneck.at/v3/<name>`),
|
|
@@ -29,7 +29,7 @@ export declare const PUBLIC_CALLS: readonly ["createReceipt", "getReceipt", "can
|
|
|
29
29
|
* die fuenf DEP-Aufrufe); die Kasse ruft sie trotzdem ueber diesen Weg (ein Dialekt
|
|
30
30
|
* je Client, Nachtrag §5.2).
|
|
31
31
|
*/
|
|
32
|
-
export declare const POS_CALLS: readonly ["pairRegisterDevice", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "registerUserLogin", "registerPinLogin", "renewRegisterSession", "endRegisterSession", "unpairRegisterDevice", "listMyCashregisters", "listMyReceipts", "getReceipt", "createReceipt", "generateFullReceiptId", "cancelReceipt", "sendReceiptEmail", "listMyArticleGroups", "listMyArticles", "getKasseSettings", "setMyKasseSettings", "setMyKasseLogo", "setMyRegisterDeviceSettings", "listMyPrinters", "createPrintJob", "getPrintJob", "listMyTipRecipients", "listMyStockLocations", "listMyStock", "setMyCashregisterStockLocation", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "logReceiptOutputs", "createDepExport", "getDepExport", "getDepExportFile", "createDepHandoverLink", "revokeDepHandoverLink", "getRegisterInspectionInfo", "reportConnectState"];
|
|
32
|
+
export declare const POS_CALLS: readonly ["pairRegisterDevice", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "registerUserLogin", "registerPinLogin", "renewRegisterSession", "endRegisterSession", "unpairRegisterDevice", "listMyCashregisters", "listMyReceipts", "getReceipt", "createReceipt", "generateFullReceiptId", "cancelReceipt", "sendReceiptEmail", "listMyArticleGroups", "listMyArticles", "getKasseSettings", "setMyKasseSettings", "setMyKasseLogo", "setMyRegisterDeviceSettings", "listMyPrinters", "createPrintJob", "getPrintJob", "listMyTipRecipients", "listMyStockLocations", "listMyStock", "setMyCashregisterStockLocation", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "createDepExport", "getDepExport", "getDepExportFile", "createDepHandoverLink", "revokeDepHandoverLink", "getRegisterInspectionInfo", "reportConnectState"];
|
|
33
33
|
export type PublicCall = typeof PUBLIC_CALLS[number];
|
|
34
34
|
export type PosCall = typeof POS_CALLS[number];
|
|
35
35
|
/**
|
|
@@ -50,7 +50,7 @@ export type PosCall = typeof POS_CALLS[number];
|
|
|
50
50
|
* [ALL_CALLS], [PUBLIC_CALLS] und [POS_CALLS] steht entweder hier oder in
|
|
51
51
|
* [CALLS_WITHOUT_EFFECT] (Waechter `test/ausgang-einordnung.test.ts`).
|
|
52
52
|
*/
|
|
53
|
-
export declare const UNKNOWN_OUTCOME_CALLS: readonly ["activateCashregister", "addVariant", "cancelInvoice", "cancelReceipt", "cancelStocktake", "changeStockCondition", "closeMyShift", "closeStocktake", "createArticle", "createCreditNote", "createCustomer", "createCustomerCashregister", "createInvoiceItem", "createPartnerCustomer", "createPartnerWebhook", "createPrintJob", "createReceipt", "createReservation", "createStocktake", "createVariantGroup", "createWebhook", "deactivateArticle", "deletePartnerWebhook", "deleteWebhook", "extendReservation", "financeWebService", "hobexPayApi", "hobexRefundApi", "issueInvoice", "logMyDrawerOpenings", "logReceiptOutputs", "openMyShift", "orderSignatureCard", "pairRegisterDevice", "receiveGoods", "recordInvoicePayment", "recordMyCashMovement", "recordMyStocktakeCount", "recordStockLoss", "recordStocktakeCount", "recountStocktake", "releaseReservation", "reportConnectState", "reportCustomerContract", "requestCustomerSignature", "reverseStockMovement", "reviewStocktake", "revokeCustomerMandate", "rotatePartnerWebhookSecret", "rotateWebhookSecret", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "sendWebhookTest", "setCustomerMandate", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "transferStock", "unpairRegisterDevice", "updateArticle", "updateCustomer", "updateInvoiceItem", "updatePartnerWebhook", "updateVariantGroup", "updateWebhook", "voidMyStocktakeCount", "voidStocktakeCount", "withdrawInvoiceItem"];
|
|
53
|
+
export declare const UNKNOWN_OUTCOME_CALLS: readonly ["activateCashregister", "addVariant", "cancelInvoice", "cancelReceipt", "cancelStocktake", "changeStockCondition", "closeMyShift", "closeStocktake", "createArticle", "createCreditNote", "createCustomer", "createCustomerCashregister", "createInvoiceItem", "createPartnerCustomer", "createPartnerWebhook", "createPrintJob", "createReceipt", "createReservation", "createStocktake", "createVariantGroup", "createWebhook", "deactivateArticle", "deletePartnerWebhook", "deleteWebhook", "extendReservation", "financeWebService", "hobexPayApi", "hobexRefundApi", "issueInvoice", "logMyDrawerOpenings", "logReceiptOutputs", "openMyShift", "orderSignatureCard", "pairRegisterDevice", "receiveGoods", "recordInvoicePayment", "recordMyCashMovement", "recordMyShiftCount", "recordMyStocktakeCount", "recordStockLoss", "recordStocktakeCount", "recountStocktake", "releaseReservation", "reportConnectState", "reportCustomerContract", "requestCustomerSignature", "reverseStockMovement", "reviewStocktake", "revokeCustomerMandate", "rotatePartnerWebhookSecret", "rotateWebhookSecret", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "sendWebhookTest", "setCustomerMandate", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "transferStock", "unpairRegisterDevice", "updateArticle", "updateCustomer", "updateInvoiceItem", "updatePartnerWebhook", "updateVariantGroup", "updateWebhook", "voidMyStocktakeCount", "voidStocktakeCount", "withdrawInvoiceItem"];
|
|
54
54
|
/** Warum ein Aufruf keine Wirkung hat, die ein Zeitlimit offen lassen koennte. */
|
|
55
55
|
export type CallWithoutEffectReason = 'read' | 'repeatable';
|
|
56
56
|
/**
|
|
@@ -144,6 +144,7 @@ export const ALL_CALLS = [
|
|
|
144
144
|
'logMyDrawerOpenings',
|
|
145
145
|
'getMyShiftReport',
|
|
146
146
|
'closeMyShift',
|
|
147
|
+
'recordMyShiftCount',
|
|
147
148
|
// Ausgaben eines Belegs (Drucke, Teilen) melden: nur ueber den Kassenweg.
|
|
148
149
|
'logReceiptOutputs',
|
|
149
150
|
// Kasseninfo fuer die Pruefung (Kassennachschau, Stufe 2b, ./pos): nur ueber den Kassenweg.
|
|
@@ -334,6 +335,7 @@ export const POS_CALLS = [
|
|
|
334
335
|
'logMyDrawerOpenings',
|
|
335
336
|
'getMyShiftReport',
|
|
336
337
|
'closeMyShift',
|
|
338
|
+
'recordMyShiftCount',
|
|
337
339
|
// Ausgaben eines Belegs melden: nur ueber den Kassenweg.
|
|
338
340
|
'logReceiptOutputs',
|
|
339
341
|
// DEP fuer die Kassennachschau (Stufe 2): zugleich oeffentlich; an der Kasse nur fuer den Chef (manager_only).
|
|
@@ -403,6 +405,7 @@ export const UNKNOWN_OUTCOME_CALLS = [
|
|
|
403
405
|
'receiveGoods',
|
|
404
406
|
'recordInvoicePayment',
|
|
405
407
|
'recordMyCashMovement',
|
|
408
|
+
'recordMyShiftCount',
|
|
406
409
|
'recordMyStocktakeCount',
|
|
407
410
|
'recordStockLoss',
|
|
408
411
|
'recordStocktakeCount',
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aufrunden-Vorschlaege fuer Trinkgeld: genau drei aufsteigende Gesamtbetraege
|
|
3
|
+
* in Cent ueber dem Bezugsbetrag. Nur Ganzzahlen; die Pruefaelle stehen in
|
|
4
|
+
* `fixtures/tip-round-up-cases.json` (gleich im Dart-Zwilling).
|
|
5
|
+
*/
|
|
6
|
+
export declare function roundUpSuggestions(amountCents: number): number[];
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aufrunden-Vorschlaege fuer Trinkgeld: genau drei aufsteigende Gesamtbetraege
|
|
3
|
+
* in Cent ueber dem Bezugsbetrag. Nur Ganzzahlen; die Pruefaelle stehen in
|
|
4
|
+
* `fixtures/tip-round-up-cases.json` (gleich im Dart-Zwilling).
|
|
5
|
+
*/
|
|
6
|
+
function steps(t) {
|
|
7
|
+
if (t < 1500)
|
|
8
|
+
return [50, 100];
|
|
9
|
+
if (t < 5000)
|
|
10
|
+
return [100, 500];
|
|
11
|
+
if (t < 20000)
|
|
12
|
+
return [500, 1000];
|
|
13
|
+
return [1000, 5000];
|
|
14
|
+
}
|
|
15
|
+
const ceilDiv = (a, b) => Math.floor((a + b - 1) / b);
|
|
16
|
+
export function roundUpSuggestions(amountCents) {
|
|
17
|
+
if (!Number.isInteger(amountCents) || amountCents <= 0)
|
|
18
|
+
return [];
|
|
19
|
+
const t = amountCents;
|
|
20
|
+
const [small, large] = steps(t);
|
|
21
|
+
const lo = Math.max(ceilDiv(t * 102, 100), t + 20);
|
|
22
|
+
const hi = Math.floor((t * (t < 1000 ? 125 : 120)) / 100);
|
|
23
|
+
const set = new Set();
|
|
24
|
+
for (const s of [small, large])
|
|
25
|
+
for (let m = ceilDiv(lo, s) * s; m <= hi; m += s)
|
|
26
|
+
set.add(m);
|
|
27
|
+
const candidates = [...set].sort((a, b) => a - b);
|
|
28
|
+
const chosen = new Set();
|
|
29
|
+
if (candidates.length > 0) {
|
|
30
|
+
const firstRound = candidates.find((k) => k % large === 0);
|
|
31
|
+
chosen.add(firstRound !== undefined && (firstRound - t) * 100 <= t * 10 ? firstRound : candidates[0]);
|
|
32
|
+
}
|
|
33
|
+
for (const target of [110, 115]) {
|
|
34
|
+
const free = candidates.filter((k) => !chosen.has(k));
|
|
35
|
+
if (free.length === 0)
|
|
36
|
+
break;
|
|
37
|
+
const dist = (k) => Math.abs(k * 100 - t * target);
|
|
38
|
+
const round = free.find((k) => k % large === 0 && dist(k) <= t * 3);
|
|
39
|
+
if (round !== undefined) {
|
|
40
|
+
chosen.add(round);
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
let best = free[0];
|
|
44
|
+
for (const k of free)
|
|
45
|
+
if (dist(k) < dist(best))
|
|
46
|
+
best = k;
|
|
47
|
+
chosen.add(best);
|
|
48
|
+
}
|
|
49
|
+
let next = chosen.size > 0 ? Math.max(...chosen) : ceilDiv(lo, small) * small - small;
|
|
50
|
+
while (chosen.size < 3) {
|
|
51
|
+
next = (Math.floor(next / small) + 1) * small;
|
|
52
|
+
if (next >= lo)
|
|
53
|
+
chosen.add(next);
|
|
54
|
+
}
|
|
55
|
+
return [...chosen].sort((a, b) => a - b);
|
|
56
|
+
}
|
package/dist/esm/pos/client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KasseneckValidationError } from '../client/errors.js';
|
|
2
2
|
import { posVoucherSettingsFromWire } from './gutschein.js';
|
|
3
|
-
import { POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, POS_BUSINESS_VALUES, POS_DEVICE_VALUES, POS_SHORTCUT_ACTIONS, POS_DEVICE_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_FIELDS, mergePosSettings, posShortcutConflict, _istAltwert0x, _optionalerWert, } from './settings.js';
|
|
3
|
+
import { POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, POS_BUSINESS_VALUES, POS_DEVICE_VALUES, POS_SHORTCUT_ACTIONS, POS_DEVICE_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_CHOICES, POS_DEVICE_OPTIONAL_CHOICES, mergePosSettings, posShortcutConflict, _istAltwert0x, _optionalerWert, } from './settings.js';
|
|
4
4
|
/*
|
|
5
5
|
* Die Einstellungs-Aufrufe am Draht `/api/v3`: Parameter und Antwort heissen
|
|
6
6
|
* `business`/`device`, Schluessel und Werte englisch (Nachtrag §11.7.2).
|
|
@@ -144,10 +144,21 @@ function pruefeTeil(name, teil, block, standard, werte) {
|
|
|
144
144
|
throw new KasseneckValidationError(name, `${teil}.${schluessel}: true oder false erwartet`, 'request');
|
|
145
145
|
continue;
|
|
146
146
|
}
|
|
147
|
-
|
|
147
|
+
const wahl = teil === 'business' ? POS_BUSINESS_OPTIONAL_CHOICES : POS_DEVICE_OPTIONAL_CHOICES;
|
|
148
|
+
if (!Object.prototype.hasOwnProperty.call(standard, schluessel) && !wahl.includes(schluessel)) {
|
|
148
149
|
throw new KasseneckValidationError(name, `${teil}.${schluessel}: unbekanntes Feld`, 'request');
|
|
149
150
|
}
|
|
150
151
|
const erlaubt = Object.prototype.hasOwnProperty.call(werte, schluessel) ? werte[schluessel] : undefined;
|
|
152
|
+
if (schluessel === 'tipKinds' && !Array.isArray(wert)) {
|
|
153
|
+
throw new KasseneckValidationError(name, `${teil}.${schluessel}: eine Liste von Trinkgeld-Arten erwartet`, 'request');
|
|
154
|
+
}
|
|
155
|
+
// Eine Liste (tipKinds): nichtleer, jeder Eintrag aus der Wertemenge, ohne Dubletten.
|
|
156
|
+
if (erlaubt && Array.isArray(wert)) {
|
|
157
|
+
if (wert.length === 0 || new Set(wert).size !== wert.length || !wert.every((e) => erlaubt.includes(e))) {
|
|
158
|
+
throw new KasseneckValidationError(name, `${teil}.${schluessel}: ungueltiger Wert (erlaubt: ${erlaubt.join(', ')}, jede Art hoechstens einmal)`, 'request');
|
|
159
|
+
}
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
151
162
|
if (erlaubt && !erlaubt.includes(wert)) {
|
|
152
163
|
// Kein Altwert: dann ein Wert, den der Server kennt und dieses Paket
|
|
153
164
|
// nicht. Er kam beim Lesen herein; wer den ganzen Block zurueckschickt,
|
package/dist/esm/pos/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* die Backend-Functions (die Rewrites-Waechter der Web-App leiten daraus ab)
|
|
7
7
|
* und sprechen den Kassenweg `/api/v3` (Schluessel und Werte englisch).
|
|
8
8
|
*/
|
|
9
|
-
export { type PosTheme, type PosFontSize, type PosWatermark, type PosQuantity, type PosTipMode, type PosCheckoutMode, type PosCardProvider, type PosReceiptOutput, type PosShortcutAction, type PosShortcutMap, POS_SHORTCUT_ACTIONS, POS_SHORTCUT_DEFAULTS, type PosLayout, type PosCategoryPosition, type PosTileHeight, type PosPrinterType, type PosTerminalVia, type PosTerminalType, type PosPaperSize, type PosCodePage, type PosCut, type PosDrawerAutoOpen, type PosQrMode, type PosLogoSize, type PosSettingsFontSize, type PosTileStyle, type PosAutoLogoutMinutes, type PosDiscount, type PosWatermarkSide, type PosWatermarkStrength, type PosLogoScale, type PosWatermarkScale, type PosDoneScreenSeconds, type PosToggleMap, type PosBusinessSettings, type PosDeviceSettings, type PosSettings, 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, type PosOpen, POS_SHORTCUT_SHARED_PAIRS, posShortcutConflict, 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';
|
|
9
|
+
export { type PosTheme, type PosFontSize, type PosWatermark, type PosQuantity, type PosTipMode, type PosCheckoutMode, type PosCardProvider, type PosReceiptOutput, type PosShortcutAction, type PosShortcutMap, POS_SHORTCUT_ACTIONS, POS_SHORTCUT_DEFAULTS, type PosLayout, type PosCategoryPosition, type PosTileHeight, type PosPrinterType, type PosTerminalVia, type PosTerminalType, type PosPaperSize, type PosCodePage, type PosCut, type PosDrawerAutoOpen, type PosQrMode, type PosLogoSize, type PosSettingsFontSize, type PosTileStyle, type PosAutoLogoutMinutes, type PosDiscount, type PosWatermarkSide, type PosWatermarkStrength, type PosLogoScale, type PosWatermarkScale, type PosDoneScreenSeconds, type PosToggleMap, type PosBusinessSettings, type PosDeviceSettings, type PosSettings, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, POS_DEVICE_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_CHOICES, POS_DEVICE_OPTIONAL_CHOICES, posTipKeptByDefault, posTipKinds, posTipStart, posCartWidth, POS_BUSINESS_VALUES, POS_DEVICE_VALUES, mergePosSettings, sanitizePosSettings, unknownPosSettingValues, posSettingsChanges, type PosOpen, POS_SHORTCUT_SHARED_PAIRS, posShortcutConflict, THEME, FONT_SIZE, WATERMARK, QUANTITY, TIP_MODE, TIP_KINDS, TIP_START, CART_WIDTH, type PosTipKind, type PosCartWidth, 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';
|
|
10
10
|
export { type ArticleGroup, type ArticleGroupPayload, fromArticleGroupPayload, type PosArticle, type PosArticlePayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, QUANTITY_RULES, type QuantityRule, type QuantityDefaults, quantityRuleForUnit, quantityDefaults, allowedQuantity, isBookableArticle, tilePrompts, } from './artikel.js';
|
|
11
11
|
export { REFERENCE_MODES, type ReferenceMode, type PosReference, REFERENCE_INPUT_MAX, REFERENCE_LABEL_MAX, REFERENCE_HINT_MAX, REFERENCE_PATTERN_MAX, REFERENCE_PATTERN_TEMPLATES, cleanReferenceText, isValidReferencePattern, isDigitsOnlyPattern, type ReferenceCheckResult, checkReference, referenceLineName, fromReferencePayload, } from './kachel-referenz.js';
|
|
12
12
|
export { ADD_ONS_MAX, ADD_ON_BLOCK_REASONS, type AddOnBlockReason, isSelectableAddOn, addOnsFor, addOnReferencesValid, addOnsOfItem, addOnRemap, addOnDisplayOrder, orderAddOnLines, } from './zusaetze.js';
|
|
@@ -24,9 +24,10 @@ export { type ListMyStocktakesOptions, type ListMyStocktakeItemsOptions, type Li
|
|
|
24
24
|
export type { Stocktake, StocktakeItem, StocktakeCount, StocktakeCountResult, StocktakeItemPage, StocktakeCountPage, StocktakeActor, StocktakeProgress, StocktakeReview, StocktakeRecount, StocktakeScope, } from '../inventory/typen.js';
|
|
25
25
|
export type { StocktakeStatus } from '../inventory/vertrag.js';
|
|
26
26
|
export { VOUCHER_KINDS, VOUCHER_STATUSES, checkVoucher, reprintVoucherLabel, VOUCHER_SETTINGS_DEFAULTS, posVoucherSettingsFromWire, VOUCHER_PAYOUTS, VOUCHER_TYPE_KINDS, VOUCHER_AMOUNT_MODES, VOUCHER_TYPE_VALIDITY_PATTERNS, type VoucherKind, type VoucherStatus, type VoucherValidity, type VoucherArticle, type VoucherCheck, type PosVoucherSettings, type PosVoucherReturnType, type VoucherPayout, type VoucherTypeKind, type PosVoucherType, type VoucherLabelTemplate, } from './gutschein.js';
|
|
27
|
-
export { type GetMyDrawerStateOptions, type OpenMyShiftOptions, type RecordMyCashMovementOptions, type DrawerOpeningEntry, type LogMyDrawerOpeningsOptions, type GetMyShiftReportOptions, type TipPayout, type CloseMyShiftOptions, type AfterCountOption, getMyDrawerState, openMyShift, recordMyCashMovement, logMyDrawerOpenings, getMyShiftReport, closeMyShift, sumDenominations, parseCentsAllowZero, newIdempotencyKey, shiftTipLines, durationText, type ShiftTipLine, type ShiftTipLineKey, } from './schicht.js';
|
|
28
|
-
export { EUR_DENOMINATIONS, MOVEMENT_TYPES, MANUAL_MOVEMENT_TYPES, CASH_LOCATIONS, OPENING_REASONS, MANUAL_OPENING_REASONS, SHIFT_RECEIPT_KINDS, AFTER_COUNT_TYPES, type AfterCountType, type AfterCount, type EurDenomination, type MovementType, type ManualMovementType, type CashLocation, type OpeningReason, type ManualOpeningReason, type ShiftReceiptKind, type ShiftStatus, type ShiftActorRole, type Denominations, type ShiftActor, type DrawerInfo, type DrawerRights, type NonCashAmount, type ShiftTipTotals, type ShiftTip, type ShiftRunningTotals, type ShiftReconciliation, type Shift, type TipClaim, type DrawerOpening, type DrawerState, type CashMovement, type ShiftReceiptHeader, type ShiftReceiptMovement, type ShiftReceiptTip, type ShiftSummaryReceipt, type CashMovementReceipt, type ShiftReceipt, type OpenShiftResult, type CashMovementResult, type DrawerOpeningsResult, type ShiftReport, type CloseShiftResult, } from './schicht-typen.js';
|
|
27
|
+
export { type GetMyDrawerStateOptions, type OpenMyShiftOptions, type RecordMyCashMovementOptions, type DrawerOpeningEntry, type LogMyDrawerOpeningsOptions, type GetMyShiftReportOptions, type TipPayout, type CloseMyShiftOptions, type AfterCountOption, type RecordMyShiftCountOptions, getMyDrawerState, openMyShift, recordMyCashMovement, logMyDrawerOpenings, getMyShiftReport, closeMyShift, recordMyShiftCount, sumDenominations, parseCentsAllowZero, newIdempotencyKey, shiftTipLines, durationText, type ShiftTipLine, type ShiftTipLineKey, } from './schicht.js';
|
|
28
|
+
export { EUR_DENOMINATIONS, MOVEMENT_TYPES, MANUAL_MOVEMENT_TYPES, CASH_LOCATIONS, OPENING_REASONS, MANUAL_OPENING_REASONS, SHIFT_RECEIPT_KINDS, AFTER_COUNT_TYPES, type AfterCountType, type AfterCount, EXPECTED_PART_KEYS, DIFFERENCE_PART_TYPES, type ExpectedPartKey, type ShiftExpectedPart, type DifferencePartType, type ShiftDifferencePart, type LastShift, type ShiftCountResult, type EurDenomination, type MovementType, type ManualMovementType, type CashLocation, type OpeningReason, type ManualOpeningReason, type ShiftReceiptKind, type ShiftStatus, type ShiftActorRole, type Denominations, type ShiftActor, type DrawerInfo, type DrawerRights, type NonCashAmount, type ShiftTipTotals, type ShiftTip, type ShiftOwnerTip, type ShiftRunningTotals, type ShiftReconciliation, type Shift, type TipClaim, type DrawerOpening, type DrawerState, type CashMovement, type ShiftReceiptHeader, type ShiftReceiptMovement, type ShiftReceiptTip, type ShiftSummaryReceipt, type CashMovementReceipt, type ShiftReceipt, type OpenShiftResult, type CashMovementResult, type DrawerOpeningsResult, type ShiftReport, type CloseShiftResult, } from './schicht-typen.js';
|
|
29
29
|
export { type ShiftReceiptLayoutOptions, shiftReceiptLayout, cashMovementLayout } from '../receipt/shift-sheet.js';
|
|
30
30
|
export { RECEIPT_OUTPUT_KINDS, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputKind, type ReceiptOutputResult } from '../models/receipt-output.js';
|
|
31
31
|
export { RETURN_DISPOSITIONS, isReturnDisposition, type ReturnDisposition } from '../models/cancellation.js';
|
|
32
32
|
export { MESSAGES, ERROR_RULES, ERROR_CODE_RULES, ERROR_OUTCOME_RULES, CALLS_WITH_EFFECT, findErrorRule, messageOutcome, messageText, messageAppliesTo, RECEIPT_EMAIL_ERROR_MESSAGES, receiptEmailErrorMessage, CANCELLATION_PAYMENT_ERROR_MESSAGES, cancellationPaymentErrorMessage, CANCELLATION_VOUCHER_ERROR_MESSAGES, cancellationErrorMessage, VOUCHER_ERROR_MESSAGES, voucherErrorMessage, LABELS, labelText, RETURN_DISPOSITION_LABELS, receiptOutputLabel, type TextEntry, type MessageKey, type ErrorKind, type ErrorRule, type ErrorRuleDetail, type Surface, type ReceiptEmailMessageCode, type CancellationPaymentMessageCode, type LabelKey, } from './texte.js';
|
|
33
|
+
export { roundUpSuggestions } from './aufrunden.js';
|
package/dist/esm/pos/index.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* die Backend-Functions (die Rewrites-Waechter der Web-App leiten daraus ab)
|
|
7
7
|
* und sprechen den Kassenweg `/api/v3` (Schluessel und Werte englisch).
|
|
8
8
|
*/
|
|
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,
|
|
9
|
+
export { POS_SHORTCUT_ACTIONS, POS_SHORTCUT_DEFAULTS, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, POS_DEVICE_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_CHOICES, POS_DEVICE_OPTIONAL_CHOICES, posTipKeptByDefault, posTipKinds, posTipStart, posCartWidth, 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
|
-
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';
|
|
11
|
+
THEME, FONT_SIZE, WATERMARK, QUANTITY, TIP_MODE, TIP_KINDS, TIP_START, CART_WIDTH, 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
12
|
export { fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, QUANTITY_RULES, quantityRuleForUnit, quantityDefaults, allowedQuantity, isBookableArticle, tilePrompts, } from './artikel.js';
|
|
13
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';
|
|
14
14
|
export { ADD_ONS_MAX, ADD_ON_BLOCK_REASONS, isSelectableAddOn, addOnsFor, addOnReferencesValid, addOnsOfItem, addOnRemap, addOnDisplayOrder, orderAddOnLines, } from './zusaetze.js';
|
|
@@ -31,8 +31,8 @@ export { listMyStocktakes, listMyStocktakeItems, listMyStocktakeCounts, recordMy
|
|
|
31
31
|
// Gutschein pruefen und Etikett nachdrucken an der Kasse; Gutschein-Sorten (Stufe 4b, 1.17.0).
|
|
32
32
|
export { VOUCHER_KINDS, VOUCHER_STATUSES, checkVoucher, reprintVoucherLabel, VOUCHER_SETTINGS_DEFAULTS, posVoucherSettingsFromWire, VOUCHER_PAYOUTS, VOUCHER_TYPE_KINDS, VOUCHER_AMOUNT_MODES, VOUCHER_TYPE_VALIDITY_PATTERNS, } from './gutschein.js';
|
|
33
33
|
// Schicht, Kassenstand und Lade-Protokoll (1.9.0): Aufrufe, Kataloge, Helfer, Bons.
|
|
34
|
-
export { getMyDrawerState, openMyShift, recordMyCashMovement, logMyDrawerOpenings, getMyShiftReport, closeMyShift, sumDenominations, parseCentsAllowZero, newIdempotencyKey, shiftTipLines, durationText, } from './schicht.js';
|
|
35
|
-
export { EUR_DENOMINATIONS, MOVEMENT_TYPES, MANUAL_MOVEMENT_TYPES, CASH_LOCATIONS, OPENING_REASONS, MANUAL_OPENING_REASONS, SHIFT_RECEIPT_KINDS, AFTER_COUNT_TYPES, } from './schicht-typen.js';
|
|
34
|
+
export { getMyDrawerState, openMyShift, recordMyCashMovement, logMyDrawerOpenings, getMyShiftReport, closeMyShift, recordMyShiftCount, sumDenominations, parseCentsAllowZero, newIdempotencyKey, shiftTipLines, durationText, } from './schicht.js';
|
|
35
|
+
export { EUR_DENOMINATIONS, MOVEMENT_TYPES, MANUAL_MOVEMENT_TYPES, CASH_LOCATIONS, OPENING_REASONS, MANUAL_OPENING_REASONS, SHIFT_RECEIPT_KINDS, AFTER_COUNT_TYPES, EXPECTED_PART_KEYS, DIFFERENCE_PART_TYPES, } from './schicht-typen.js';
|
|
36
36
|
export { shiftReceiptLayout, cashMovementLayout } from '../receipt/shift-sheet.js';
|
|
37
37
|
// Ausgaben eines Belegs (Belegdetail: Art und Ergebnis -> Beschriftung); dieselben Listen wie an der Wurzel.
|
|
38
38
|
export { RECEIPT_OUTPUT_KINDS, RECEIPT_OUTPUT_RESULTS } from '../models/receipt-output.js';
|
|
@@ -40,3 +40,4 @@ export { RECEIPT_OUTPUT_KINDS, RECEIPT_OUTPUT_RESULTS } from '../models/receipt-
|
|
|
40
40
|
export { RETURN_DISPOSITIONS, isReturnDisposition } from '../models/cancellation.js';
|
|
41
41
|
// Was die Kasse selbst sagt: ein Katalog fuer Browser-Kasse und App.
|
|
42
42
|
export { MESSAGES, ERROR_RULES, ERROR_CODE_RULES, ERROR_OUTCOME_RULES, CALLS_WITH_EFFECT, findErrorRule, messageOutcome, messageText, messageAppliesTo, RECEIPT_EMAIL_ERROR_MESSAGES, receiptEmailErrorMessage, CANCELLATION_PAYMENT_ERROR_MESSAGES, cancellationPaymentErrorMessage, CANCELLATION_VOUCHER_ERROR_MESSAGES, cancellationErrorMessage, VOUCHER_ERROR_MESSAGES, voucherErrorMessage, LABELS, labelText, RETURN_DISPOSITION_LABELS, receiptOutputLabel, } from './texte.js';
|
|
43
|
+
export { roundUpSuggestions } from './aufrunden.js';
|