@kreiseck/kasseneck-api 1.39.0 → 1.40.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cjs/pos/client.d.ts +1 -0
  3. package/dist/cjs/pos/client.js +7 -0
  4. package/dist/cjs/pos/errors.d.ts +1 -1
  5. package/dist/cjs/pos/errors.js +1 -0
  6. package/dist/cjs/pos/index.d.ts +1 -1
  7. package/dist/cjs/pos/index.js +7 -5
  8. package/dist/cjs/pos/settings.d.ts +32 -2
  9. package/dist/cjs/pos/settings.js +36 -3
  10. package/dist/cjs/pos/texte.d.ts +147 -0
  11. package/dist/cjs/pos/texte.js +44 -0
  12. package/dist/cjs/receipt/layout.js +11 -3
  13. package/dist/cjs/stored/vokabular.d.ts +1 -1
  14. package/dist/cjs/stored/vokabular.js +11 -2
  15. package/dist/cjs/version.d.ts +1 -1
  16. package/dist/cjs/version.js +1 -1
  17. package/dist/esm/pos/client.d.ts +1 -0
  18. package/dist/esm/pos/client.js +8 -1
  19. package/dist/esm/pos/errors.d.ts +1 -1
  20. package/dist/esm/pos/errors.js +1 -0
  21. package/dist/esm/pos/index.d.ts +1 -1
  22. package/dist/esm/pos/index.js +1 -1
  23. package/dist/esm/pos/settings.d.ts +32 -2
  24. package/dist/esm/pos/settings.js +33 -2
  25. package/dist/esm/pos/texte.d.ts +147 -0
  26. package/dist/esm/pos/texte.js +44 -0
  27. package/dist/esm/receipt/layout.js +11 -3
  28. package/dist/esm/stored/vokabular.d.ts +1 -1
  29. package/dist/esm/stored/vokabular.js +11 -2
  30. package/dist/esm/version.d.ts +1 -1
  31. package/dist/esm/version.js +1 -1
  32. package/fixtures/hobex-hps-codes.json +1 -1
  33. package/fixtures/invoice-api.schema.json +1 -1
  34. package/fixtures/invoice-texts.json +1 -1
  35. package/fixtures/manifest.json +6 -6
  36. package/fixtures/pos-texts.json +235 -1
  37. package/fixtures/receipts/card-sumup.json +1 -1
  38. package/fixtures/receipts/split-card-card-cash.json +1 -1
  39. package/fixtures/receipts/split-one-card-tip.json +1 -1
  40. package/fixtures/receipts/split-table-round-tip.json +2 -2
  41. package/fixtures/receipts/split-tip-card.json +1 -1
  42. package/fixtures/receipts/split-two-cards-same-provider.json +2 -2
  43. package/fixtures/renames-1.0.json +4 -2
  44. package/fixtures/surface.json +7 -2
  45. package/fixtures/v3/antworten/belege.json +2 -2
  46. package/fixtures/v3/antworten/belegmail.json +2 -2
  47. package/fixtures/v3/antworten/berichte.json +2 -2
  48. package/fixtures/v3/antworten/kasse-belege.json +2 -2
  49. package/fixtures/v3/antworten/kasse.json +3 -3
  50. package/fixtures/v3/antworten/lager.json +1 -1
  51. package/fixtures/v3/antworten/rechnungen.json +2 -2
  52. package/fixtures/v3/antworten/storno.json +2 -2
  53. package/fixtures/v3/stored/belege.json +2 -2
  54. package/fixtures/v3/stored/kasse.json +3 -3
  55. package/fixtures/v3/stored/rechnungen.json +2 -2
  56. package/fixtures/v3/v3-vokabular.json +42 -4
  57. package/fixtures/v3/zahlbetrag-faelle.json +2 -2
  58. package/package.json +1 -1
@@ -10,6 +10,7 @@ export declare function posSettingsFromWire(data: {
10
10
  device?: unknown;
11
11
  vouchers?: unknown;
12
12
  deposit?: unknown;
13
+ cardTerminal?: unknown;
13
14
  } | null | undefined): PosSettings;
14
15
  /** Betriebsweite Einstellungen schreiben (Recht `layout`); liefert den gemischten Stand. */
15
16
  export declare function setMyPosSettings(transport: InternerTransport, business: Partial<PosBusinessSettings>): Promise<PosBusinessSettings>;
@@ -2,7 +2,7 @@ import { KasseneckValidationError } from '../client/errors.js';
2
2
  import { posVoucherSettingsFromWire } from './gutschein.js';
3
3
  import { posDepositSettingsFromWire } from './pfand.js';
4
4
  import { checkDiscountPresets, INVALID_DISCOUNT_PRESET } from './rabatt-vorlagen.js';
5
- import { POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, POS_BUSINESS_VALUES, POS_DEVICE_VALUES, POS_SHORTCUT_ACTIONS, POS_DEVICE_OPTIONAL_FIELDS, POS_DEVICE_OPTIONAL_SWITCHES, POS_BUSINESS_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_CHOICES, POS_BUSINESS_OPTIONAL_LISTS, POS_DEVICE_OPTIONAL_CHOICES, mergePosSettings, posShortcutConflict, _istAltwert0x, _optionalerWert, } from './settings.js';
5
+ import { POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, POS_BUSINESS_VALUES, POS_DEVICE_VALUES, POS_SHORTCUT_ACTIONS, POS_DEVICE_OPTIONAL_FIELDS, POS_DEVICE_OPTIONAL_SWITCHES, POS_BUSINESS_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_CHOICES, POS_BUSINESS_OPTIONAL_LISTS, POS_DEVICE_OPTIONAL_CHOICES, mergePosSettings, posShortcutConflict, _istAltwert0x, _optionalerWert, POS_BUSINESS_OPTIONAL_IDS, _optionaleBetriebsKennung, posCardTerminalFromWire, } from './settings.js';
6
6
  /*
7
7
  * Die Einstellungs-Aufrufe am Draht `/api/v3`: Parameter und Antwort heissen
8
8
  * `business`/`device`, Schluessel und Werte englisch (Nachtrag §11.7.2).
@@ -33,11 +33,13 @@ export async function getPosSettings(transport, options = {}) {
33
33
  /** `{business, device, vouchers}` einer Antwort, gemischt mit den Standardwerten. */
34
34
  export function posSettingsFromWire(data) {
35
35
  const deposit = posDepositSettingsFromWire(data?.deposit);
36
+ const cardTerminal = posCardTerminalFromWire(data?.cardTerminal);
36
37
  return {
37
38
  vouchers: posVoucherSettingsFromWire(data?.vouchers),
38
39
  business: mergePosSettings(POS_BUSINESS_DEFAULTS, objekt(data?.business)),
39
40
  device: mergePosSettings(POS_DEVICE_DEFAULTS, objekt(data?.device)),
40
41
  ...(deposit ? { deposit } : {}),
42
+ ...(cardTerminal ? { cardTerminal } : {}),
41
43
  };
42
44
  }
43
45
  /** Betriebsweite Einstellungen schreiben (Recht `layout`); liefert den gemischten Stand. */
@@ -143,6 +145,11 @@ function pruefeTeil(name, teil, block, standard, werte) {
143
145
  throw new KasseneckValidationError(name, `${teil}.${schluessel}: Kennung oder null erwartet`, 'request');
144
146
  continue;
145
147
  }
148
+ if (teil === 'business' && POS_BUSINESS_OPTIONAL_IDS.includes(schluessel)) {
149
+ if (!_optionaleBetriebsKennung(wert, true))
150
+ throw new KasseneckValidationError(name, `${teil}.${schluessel}: Nummer (4 bis 20 Buchstaben oder Ziffern) oder null erwartet`, 'request');
151
+ continue;
152
+ }
146
153
  const schalter = teil === 'business' ? POS_BUSINESS_OPTIONAL_FIELDS : POS_DEVICE_OPTIONAL_SWITCHES;
147
154
  if (schalter.includes(schluessel)) {
148
155
  if (typeof wert !== 'boolean')
@@ -21,7 +21,7 @@ import { KasseneckApiError } from '../client/errors.js';
21
21
  * ueber `KasseneckApiError.code` lesbar; die Kasse braucht dafuer einen
22
22
  * Rueckfallzweig.
23
23
  */
24
- export declare const POS_ERROR_CODES: readonly ["account_not_found", "action_confirmation_required", "admin_required", "after_count_not_permitted", "api_not_approved", "app_check_invalid", "app_check_missing", "article_not_found", "article_not_in_scope", "article_not_tracked", "cash_movement_exceeds_balance", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "comment_required", "count_already_voided", "count_not_found", "deposit_follows_item", "deposit_not_enabled", "deposit_return_not_offered", "deposit_set_by_server", "deposit_type_in_use", "deposit_type_not_found", "deposit_type_not_issued", "device_not_found", "dialect_mismatch", "drawer_inactive", "drawer_not_found", "filler_role_required", "idempotency_conflict", "idempotency_key_required", "internal_translation_error", "invalid_amount", "invalid_cursor", "invalid_denominations", "invalid_deposit", "invalid_deposit_quantity", "invalid_discount_preset", "invalid_item_kind", "invalid_movement_type", "invalid_quantity", "invalid_serial", "live_not_enabled", "location_inactive", "location_not_found", "logo_invalid", "logo_invalid_type", "logo_too_large", "method_not_allowed", "mfa_required", "module_inactive", "not_a_person_login", "not_found", "not_permitted", "note_required", "password_change_required", "print_job_not_found", "print_layout_failed", "printer_not_found", "recount_exhausted", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "second_factor_required", "serial_already_counted", "serial_not_allowed", "serial_required", "server_error", "session_expired", "session_other_cashregister", "shift_already_open", "shift_closed", "shift_mode_off", "shift_not_open", "stocktake_closed", "stocktake_closing", "stocktake_not_found", "stocktake_not_open", "tip_payout_exceeds_claim", "too_many_counts", "too_many_deposit_types", "transfer_same_drawer", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
24
+ export declare const POS_ERROR_CODES: readonly ["account_not_found", "action_confirmation_required", "admin_required", "after_count_not_permitted", "api_not_approved", "app_check_invalid", "app_check_missing", "article_not_found", "article_not_in_scope", "article_not_tracked", "cash_movement_exceeds_balance", "cashregister_not_assigned", "cashregister_not_found", "cashregister_token_invalid", "cashregister_token_missing", "comment_required", "count_already_voided", "count_not_found", "deposit_follows_item", "deposit_not_enabled", "deposit_return_not_offered", "deposit_set_by_server", "deposit_type_in_use", "deposit_type_not_found", "deposit_type_not_issued", "device_not_found", "dialect_mismatch", "drawer_inactive", "drawer_not_found", "filler_role_required", "idempotency_conflict", "idempotency_key_required", "internal_translation_error", "invalid_amount", "invalid_cursor", "invalid_denominations", "invalid_deposit", "invalid_deposit_quantity", "invalid_discount_preset", "invalid_item_kind", "invalid_movement_type", "invalid_quantity", "invalid_serial", "live_not_enabled", "location_inactive", "location_not_found", "logo_invalid", "logo_invalid_type", "logo_too_large", "method_not_allowed", "mfa_required", "module_inactive", "not_a_person_login", "not_found", "not_permitted", "note_required", "password_change_required", "print_job_not_found", "print_layout_failed", "printer_not_found", "recount_exhausted", "register_user_no_business", "register_user_not_allowed", "register_user_not_found", "response_translation_failed", "second_factor_required", "serial_already_counted", "serial_not_allowed", "serial_required", "server_error", "session_expired", "session_other_cashregister", "shift_already_open", "shift_closed", "shift_mode_off", "shift_not_open", "stocktake_closed", "stocktake_closing", "stocktake_not_found", "stocktake_not_open", "sumup_merchant_already_bound", "tip_payout_exceeds_claim", "too_many_counts", "too_many_deposit_types", "transfer_same_drawer", "unauthorized", "user_disabled", "user_verification_failed", "validation", "route_missing"];
25
25
  export type PosErrorCode = typeof POS_ERROR_CODES[number];
26
26
  export declare function isPosErrorCode(value: unknown): value is PosErrorCode;
27
27
  /** Der Code eines geworfenen Fehlers, wenn er in [POS_ERROR_CODES] steht; sonst `undefined`. */
@@ -102,6 +102,7 @@ export const POS_ERROR_CODES = Object.freeze([
102
102
  'stocktake_closing',
103
103
  'stocktake_not_found',
104
104
  'stocktake_not_open',
105
+ 'sumup_merchant_already_bound',
105
106
  'tip_payout_exceeds_claim',
106
107
  'too_many_counts',
107
108
  'too_many_deposit_types',
@@ -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_DEVICE_OPTIONAL_SWITCHES, posPrinterHint, POS_BUSINESS_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_CHOICES, POS_DEVICE_OPTIONAL_CHOICES, posTipKeptByDefault, posCustomDiscountAllowed, posTipKeptMode, posTipCardKeptByDefault, posTipCardKeptMode, posTipSelfPayout, tipKeptFor, type TipKeptDecision, type TipPaymentKind, DISCOUNT_PRESET_KIND, type PosDiscountPreset, type PosDiscountPresetKind, POS_BUSINESS_OPTIONAL_LISTS, 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, TIP_KEPT_MODE, TIP_CARD_KEPT_MODE, type PosTipKeptMode, 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';
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_DEVICE_OPTIONAL_SWITCHES, posPrinterHint, POS_BUSINESS_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_IDS, posCardTerminalFromWire, type PosCardTerminal, POS_BUSINESS_OPTIONAL_CHOICES, POS_DEVICE_OPTIONAL_CHOICES, posTipKeptByDefault, posCustomDiscountAllowed, posTipKeptMode, posTipCardKeptByDefault, posTipCardKeptMode, posTipSelfPayout, tipKeptFor, type TipKeptDecision, type TipPaymentKind, DISCOUNT_PRESET_KIND, type PosDiscountPreset, type PosDiscountPresetKind, POS_BUSINESS_OPTIONAL_LISTS, 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, TIP_KEPT_MODE, TIP_CARD_KEPT_MODE, type PosTipKeptMode, 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';
@@ -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 { POS_SHORTCUT_ACTIONS, POS_SHORTCUT_DEFAULTS, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, POS_DEVICE_OPTIONAL_FIELDS, POS_DEVICE_OPTIONAL_SWITCHES, posPrinterHint, POS_BUSINESS_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_CHOICES, POS_DEVICE_OPTIONAL_CHOICES, posTipKeptByDefault, posCustomDiscountAllowed, posTipKeptMode, posTipCardKeptByDefault, posTipCardKeptMode, posTipSelfPayout, tipKeptFor, DISCOUNT_PRESET_KIND, POS_BUSINESS_OPTIONAL_LISTS, posTipKinds, posTipStart, posCartWidth, 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_DEVICE_OPTIONAL_SWITCHES, posPrinterHint, POS_BUSINESS_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_IDS, posCardTerminalFromWire, POS_BUSINESS_OPTIONAL_CHOICES, POS_DEVICE_OPTIONAL_CHOICES, posTipKeptByDefault, posCustomDiscountAllowed, posTipKeptMode, posTipCardKeptByDefault, posTipCardKeptMode, posTipSelfPayout, tipKeptFor, DISCOUNT_PRESET_KIND, POS_BUSINESS_OPTIONAL_LISTS, 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
11
  THEME, FONT_SIZE, WATERMARK, QUANTITY, TIP_MODE, TIP_KINDS, TIP_START, TIP_KEPT_MODE, TIP_CARD_KEPT_MODE, 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';
@@ -62,8 +62,11 @@ export declare const CART_WIDTH: readonly ["narrow", "medium", "wide"];
62
62
  export type PosCartWidth = typeof CART_WIDTH[number];
63
63
  export declare const CHECKOUT_MODE: readonly ["page", "panel"];
64
64
  export type PosCheckoutMode = typeof CHECKOUT_MODE[number];
65
- /** Kartenanbieter: Karte gibt es erst mit eingerichtetem Anbieter; 'external' = eigenes Terminal ohne Anbindung. */
66
- export declare const CARD_PROVIDER: readonly ["none", "external", "gptom", "hobex", "mypos", "stripe"];
65
+ /**
66
+ * Kartenanbieter: Karte gibt es erst mit eingerichtetem Anbieter; 'external' = eigenes Terminal ohne Anbindung.
67
+ * 'sumup' bindet nur die Kassen-App auf Android an (SumUp-SDK); Browser-Kasse und iOS kassieren damit wie 'external'.
68
+ */
69
+ export declare const CARD_PROVIDER: readonly ["none", "external", "gptom", "hobex", "mypos", "stripe", "sumup"];
67
70
  export type PosCardProvider = typeof CARD_PROVIDER[number];
68
71
  export declare const RECEIPT_OUTPUT: readonly ["qr", "print", "email", "sms", "ask"];
69
72
  export type PosReceiptOutput = typeof RECEIPT_OUTPUT[number];
@@ -258,6 +261,12 @@ export interface PosBusinessSettings {
258
261
  * `false` = eigenes Trinkgeld nur mit dem Recht `shift` auszahlbar (R49). Lesen ueber [posTipSelfPayout].
259
262
  */
260
263
  tipSelfPayout?: boolean;
264
+ /**
265
+ * SumUp-Haendlernummer, an die der Betrieb gebunden ist (Spec 2026-11-14-sumup-kasse). Optional: fehlt, solange keine
266
+ * gebunden ist. Schreiben nimmt die Nummer oder `null` (Bindung loesen); eine andere Nummer bei bestehender Bindung
267
+ * weist der Server mit `sumup_merchant_already_bound` ab. Siehe [POS_BUSINESS_OPTIONAL_IDS].
268
+ */
269
+ sumupMerchantCode?: string;
261
270
  /**
262
271
  * Benannte Rabatt-Chips (Prozent oder Betrag, hoechstens 5). Optional: der Server sendet das Feld nur, wenn es
263
272
  * gespeichert ist; dann sind die Vorlagen die Quelle der Chips und `discountChips` spiegelt ihre Prozentwerte fuer
@@ -362,7 +371,20 @@ export interface PosSettings {
362
371
  vouchers: PosVoucherSettings;
363
372
  /** Pfand & Leergut (Block `deposit`); fehlt, solange der Betrieb kein Pfand eingeschaltet hat. */
364
373
  deposit?: DepositSettings;
374
+ /** Kartenterminal-Zugang (Block `cardTerminal`); fehlt, solange an diesem Geraet kein angebundenes Terminal gilt. */
375
+ cardTerminal?: PosCardTerminal;
365
376
  }
377
+ /**
378
+ * Zugang zu einem angebundenen Kartenterminal (Spec 2026-11-14-sumup-kasse). Der Server liefert den SumUp-Affiliate-Key
379
+ * nur an ein Geraet, an dem der Kartenanbieter `sumup` gilt.
380
+ */
381
+ export interface PosCardTerminal {
382
+ sumup?: {
383
+ affiliateKey: string;
384
+ };
385
+ }
386
+ /** `cardTerminal` aus einer Antwort lesen; unbrauchbar oder ohne Inhalt → `null`. */
387
+ export declare function posCardTerminalFromWire(value: unknown): PosCardTerminal | null;
366
388
  export declare const POS_BUSINESS_DEFAULTS: Readonly<PosBusinessSettings>;
367
389
  export declare const POS_DEVICE_DEFAULTS: Readonly<PosDeviceSettings>;
368
390
  /**
@@ -388,6 +410,14 @@ export declare const POS_DEVICE_OPTIONAL_SWITCHES: readonly ["printerHint"];
388
410
  * nimmt nur `true`/`false`.
389
411
  */
390
412
  export declare const POS_BUSINESS_OPTIONAL_FIELDS: readonly ["tipKeptByDefault", "customDiscountAllowed", "tipCardKeptByDefault", "tipSelfPayout"];
413
+ /**
414
+ * Optionale Betriebs-Kennungen (Backend `BETRIEB_OPTIONAL`, z. B. `sumupHaendler`): ohne Standardwert, der Server sendet
415
+ * sie nur, wenn sie gesetzt sind. [mergePosSettings] uebernimmt eine gueltige Nummer; der Schreibweg nimmt sie oder
416
+ * `null` (loesen).
417
+ */
418
+ export declare const POS_BUSINESS_OPTIONAL_IDS: readonly ["sumupMerchantCode"];
419
+ /** Gilt dieser Wert fuer eine optionale Betriebs-Kennung? Lesen: nur eine Nummer; Schreiben: auch `null`. */
420
+ export declare function _optionaleBetriebsKennung(wert: unknown, schreiben: boolean): boolean;
391
421
  /**
392
422
  * Optionale Betriebs-Einstellungen mit Wertemenge (Backend `BETRIEB_OPTIONAL`, Katalog
393
423
  * `KASSE_BETRIEB_WERTE.tipKinds[]`, `.tipStart` und `.tipKeptMode`): ohne Standardwert, der Server sendet sie nur,
@@ -49,8 +49,11 @@ export const DISCOUNT_PRESET_KIND = ['percent', 'amount'];
49
49
  /** Breite der rechten Spalte (Korb) an diesem Geraet (`device.cartWidth`); in der schmalen Ansicht ohne Wirkung. */
50
50
  export const CART_WIDTH = ['narrow', 'medium', 'wide'];
51
51
  export const CHECKOUT_MODE = ['page', 'panel'];
52
- /** Kartenanbieter: Karte gibt es erst mit eingerichtetem Anbieter; 'external' = eigenes Terminal ohne Anbindung. */
53
- export const CARD_PROVIDER = ['none', 'external', 'gptom', 'hobex', 'mypos', 'stripe'];
52
+ /**
53
+ * Kartenanbieter: Karte gibt es erst mit eingerichtetem Anbieter; 'external' = eigenes Terminal ohne Anbindung.
54
+ * 'sumup' bindet nur die Kassen-App auf Android an (SumUp-SDK); Browser-Kasse und iOS kassieren damit wie 'external'.
55
+ */
56
+ export const CARD_PROVIDER = ['none', 'external', 'gptom', 'hobex', 'mypos', 'stripe', 'sumup'];
54
57
  export const RECEIPT_OUTPUT = ['qr', 'print', 'email', 'sms', 'ask'];
55
58
  export const LAYOUT = ['right', 'left', 'fullscreen'];
56
59
  export const CATEGORY_POSITION = ['top', 'left'];
@@ -175,6 +178,13 @@ export function posShortcutConflict(shortcuts) {
175
178
  }
176
179
  return null;
177
180
  }
181
+ /** `cardTerminal` aus einer Antwort lesen; unbrauchbar oder ohne Inhalt → `null`. */
182
+ export function posCardTerminalFromWire(value) {
183
+ const block = value !== null && typeof value === 'object' && !Array.isArray(value) ? value : null;
184
+ const sumup = block && block.sumup !== null && typeof block.sumup === 'object' ? block.sumup : null;
185
+ const key = sumup && typeof sumup.affiliateKey === 'string' ? sumup.affiliateKey : '';
186
+ return key ? { sumup: { affiliateKey: key } } : null;
187
+ }
178
188
  export const POS_BUSINESS_DEFAULTS = Object.freeze({
179
189
  // Das Petrol der Marke: die Aktionsfarbe des Design-Systems (Rolle `brand`).
180
190
  logoText: 'K', logoEnabled: true, logoSize: 'M', watermark: 'login', color: '#136B6B',
@@ -232,6 +242,19 @@ const OPTIONALE_GERAETE_SCHALTER = new Set(POS_DEVICE_OPTIONAL_SWITCHES);
232
242
  */
233
243
  export const POS_BUSINESS_OPTIONAL_FIELDS = Object.freeze(['tipKeptByDefault', 'customDiscountAllowed', 'tipCardKeptByDefault', 'tipSelfPayout']);
234
244
  const OPTIONALE_SCHALTER = new Set(POS_BUSINESS_OPTIONAL_FIELDS);
245
+ /**
246
+ * Optionale Betriebs-Kennungen (Backend `BETRIEB_OPTIONAL`, z. B. `sumupHaendler`): ohne Standardwert, der Server sendet
247
+ * sie nur, wenn sie gesetzt sind. [mergePosSettings] uebernimmt eine gueltige Nummer; der Schreibweg nimmt sie oder
248
+ * `null` (loesen).
249
+ */
250
+ export const POS_BUSINESS_OPTIONAL_IDS = Object.freeze(['sumupMerchantCode']);
251
+ /** Form der SumUp-Haendlernummer (Backend `sumup-kasse-core.HAENDLER_MUSTER`, dort gross geschrieben). */
252
+ const SUMUP_HAENDLER = /^[A-Za-z0-9]{4,20}$/;
253
+ /** Gilt dieser Wert fuer eine optionale Betriebs-Kennung? Lesen: nur eine Nummer; Schreiben: auch `null`. */
254
+ export function _optionaleBetriebsKennung(wert, schreiben) {
255
+ return (schreiben && wert === null) || (typeof wert === 'string' && SUMUP_HAENDLER.test(wert));
256
+ }
257
+ const OPTIONALE_BETRIEBS_KENNUNGEN = new Set(POS_BUSINESS_OPTIONAL_IDS);
235
258
  /**
236
259
  * Optionale Betriebs-Einstellungen mit Wertemenge (Backend `BETRIEB_OPTIONAL`, Katalog
237
260
  * `KASSE_BETRIEB_WERTE.tipKinds[]`, `.tipStart` und `.tipKeptMode`): ohne Standardwert, der Server sendet sie nur,
@@ -430,6 +453,8 @@ export function mergePosSettings(standard, stored) {
430
453
  out[key] = wert;
431
454
  if (OPTIONALE_SCHALTER.has(key) && typeof wert === 'boolean')
432
455
  out[key] = wert;
456
+ if (OPTIONALE_BETRIEBS_KENNUNGEN.has(key) && _optionaleBetriebsKennung(wert, false))
457
+ out[key] = wert;
433
458
  if (OPTIONALE_GERAETE_SCHALTER.has(key) && typeof wert === 'boolean')
434
459
  out[key] = wert;
435
460
  if (OPTIONALE_WAHL.has(key) && _optionalerWahlwert(key, wert))
@@ -487,8 +512,14 @@ export function sanitizePosSettings(stored) {
487
512
  device: mergePosSettings(POS_DEVICE_DEFAULTS, teil('device')),
488
513
  vouchers: posVoucherSettingsFromWire(eigen(roh, 'vouchers') ? roh['vouchers'] : undefined),
489
514
  ...pfandBlock(eigen(roh, 'deposit') ? roh['deposit'] : undefined),
515
+ ...kartenterminalBlock(eigen(roh, 'cardTerminal') ? roh['cardTerminal'] : undefined),
490
516
  };
491
517
  }
518
+ /** `{ cardTerminal }`, wenn der Block lesbar ist, sonst nichts. */
519
+ function kartenterminalBlock(wert) {
520
+ const cardTerminal = posCardTerminalFromWire(wert);
521
+ return cardTerminal ? { cardTerminal } : {};
522
+ }
492
523
  /**
493
524
  * Die Felder, deren Wert dieses Paket nicht kennt (neuer Wert des Servers),
494
525
  * als Pfade (`business.theme`, `device.printerType`). Die Oberflaeche kann sie
@@ -335,6 +335,109 @@ declare const MELDUNGEN_ROH: {
335
335
  readonly placeholders: readonly ["reference"];
336
336
  readonly only: readonly ["app"];
337
337
  };
338
+ readonly 'sumup.key_missing': {
339
+ readonly text: "SumUp ist für diese Kasse noch nicht eingerichtet – bitte Kasseneck kontaktieren.";
340
+ readonly only: readonly ["app"];
341
+ };
342
+ readonly 'sumup.not_logged_in': {
343
+ readonly text: "Nicht bei SumUp angemeldet. Bitte in den Einstellungen unter Kartenterminal anmelden.";
344
+ readonly only: readonly ["app"];
345
+ };
346
+ readonly 'sumup.other_account': {
347
+ readonly text: "Hier ist ein anderes SumUp-Konto angemeldet ({current}) als das der Kasse ({bound}). Bitte abmelden und mit dem richtigen Konto anmelden.";
348
+ readonly placeholders: readonly ["current", "bound"];
349
+ readonly only: readonly ["app"];
350
+ };
351
+ readonly 'sumup.bind_question': {
352
+ readonly text: "Diese Kasse mit dem SumUp-Konto {merchant} verbinden? Danach kassieren alle Geräte nur noch auf dieses Konto.";
353
+ readonly placeholders: readonly ["merchant"];
354
+ readonly only: readonly ["app"];
355
+ };
356
+ readonly 'sumup.unbind_question': {
357
+ readonly text: "Die Verbindung zum SumUp-Konto lösen? Danach kann sich ein anderes Konto verbinden.";
358
+ readonly only: readonly ["app"];
359
+ };
360
+ readonly 'sumup.wrong_currency': {
361
+ readonly text: "Das SumUp-Konto rechnet in {currency}, die Kasse in Euro. Bitte ein Konto in Euro verwenden.";
362
+ readonly placeholders: readonly ["currency"];
363
+ readonly only: readonly ["app"];
364
+ };
365
+ readonly 'sumup.login_failed': {
366
+ readonly text: "Die Anmeldung bei SumUp hat nicht geklappt. Bitte erneut versuchen.";
367
+ readonly only: readonly ["app"];
368
+ };
369
+ readonly 'sumup.declined': {
370
+ readonly text: "SumUp hat die Zahlung nicht durchgeführt, es wurde nichts abgebucht.";
371
+ readonly only: readonly ["app"];
372
+ };
373
+ readonly 'sumup.not_bound': {
374
+ readonly text: "Die Kasse ist noch mit keinem SumUp-Konto verbunden. Bitte in den Einstellungen unter Kartenterminal verbinden.";
375
+ readonly only: readonly ["app"];
376
+ };
377
+ readonly 'sumup.amount_mismatch': {
378
+ readonly text: "SumUp meldet einen anderen Betrag als die Kasse. Bitte in der SumUp-App nachsehen, BEVOR neu kassiert wird.";
379
+ readonly only: readonly ["app"];
380
+ };
381
+ readonly 'sumup.below_minimum': {
382
+ readonly text: "Mit SumUp geht Karte erst ab 1,00 €.";
383
+ readonly only: readonly ["app"];
384
+ };
385
+ readonly 'sumup.check_in_app': {
386
+ readonly text: "In der SumUp-App unter Transaktionen nachsehen: {amount}, {time}.";
387
+ readonly placeholders: readonly ["amount", "time"];
388
+ readonly only: readonly ["app"];
389
+ };
390
+ readonly 'sumup.code_optional_label': {
391
+ readonly text: "SumUp-Transaktionscode (aus der SumUp-App, freiwillig)";
392
+ readonly only: readonly ["app"];
393
+ };
394
+ readonly 'sumup.refund_hint': {
395
+ readonly text: "Die Kartenzahlung bitte in der SumUp-App zurückbuchen (Transaktion {code}, Karte endet auf {digits}).";
396
+ readonly placeholders: readonly ["code", "digits"];
397
+ readonly only: readonly ["app"];
398
+ };
399
+ readonly 'sumup.ios_external': {
400
+ readonly text: "SumUp ist auf diesem Gerät nicht angebunden: den Betrag am SumUp-Gerät eintippen, die Kasse bucht Karte.";
401
+ readonly only: readonly ["app"];
402
+ };
403
+ readonly 'sumup.status_logged_in': {
404
+ readonly text: "Bei SumUp angemeldet als {merchant}.";
405
+ readonly placeholders: readonly ["merchant"];
406
+ readonly only: readonly ["app"];
407
+ };
408
+ readonly 'sumup.status_logged_out': {
409
+ readonly text: "Nicht bei SumUp angemeldet.";
410
+ readonly only: readonly ["app"];
411
+ };
412
+ readonly 'sumup.location_question': {
413
+ readonly text: "SumUp verlangt für Kartenzahlungen den Standort dieses Geräts. Gleich fragt Android danach.";
414
+ readonly only: readonly ["app"];
415
+ };
416
+ readonly 'sumup.location_hint': {
417
+ readonly text: "Bitte „Bei Nutzung der App“ wählen.";
418
+ readonly only: readonly ["app"];
419
+ };
420
+ readonly 'sumup.location_denied': {
421
+ readonly text: "Der Standort ist für die Kasse gesperrt. Ohne ihn meldet SumUp nicht an.";
422
+ readonly only: readonly ["app"];
423
+ };
424
+ readonly 'sumup.location_denied_hint': {
425
+ readonly text: "In den Einstellungen der App unter „Berechtigungen“ den Standort erlauben.";
426
+ readonly only: readonly ["app"];
427
+ };
428
+ readonly 'sumup.location_off': {
429
+ readonly text: "Der Standort ist an diesem Gerät ausgeschaltet. SumUp braucht ihn für Kartenzahlungen.";
430
+ readonly only: readonly ["app"];
431
+ };
432
+ readonly 'sumup.reader_ready': {
433
+ readonly text: "Leser {name} ist eingerichtet.";
434
+ readonly placeholders: readonly ["name"];
435
+ readonly only: readonly ["app"];
436
+ };
437
+ readonly 'sumup.location_missing': {
438
+ readonly text: "Ohne Standort keine Anmeldung bei SumUp. Bitte den Standort erlauben und erneut anmelden.";
439
+ readonly only: readonly ["app"];
440
+ };
338
441
  readonly 'log.empty': {
339
442
  readonly text: "Noch keine Einträge – das Protokoll füllt sich mit der ersten Kartenzahlung.";
340
443
  };
@@ -3375,6 +3478,50 @@ declare const BESCHRIFTUNGEN_ROH: {
3375
3478
  readonly text: "Fassung {version} · {time}";
3376
3479
  readonly placeholders: readonly ["version", "time"];
3377
3480
  };
3481
+ readonly 'sumup.location_title': {
3482
+ readonly text: "Standort für SumUp";
3483
+ readonly only: readonly ["app"];
3484
+ };
3485
+ readonly 'sumup.location_allow': {
3486
+ readonly text: "Standort erlauben";
3487
+ readonly only: readonly ["app"];
3488
+ };
3489
+ readonly 'sumup.location_denied_title': {
3490
+ readonly text: "Standort gesperrt";
3491
+ readonly only: readonly ["app"];
3492
+ };
3493
+ readonly 'sumup.open_app_settings': {
3494
+ readonly text: "Einstellungen öffnen";
3495
+ readonly only: readonly ["app"];
3496
+ };
3497
+ readonly 'sumup.location_off_title': {
3498
+ readonly text: "Standort ist aus";
3499
+ readonly only: readonly ["app"];
3500
+ };
3501
+ readonly 'sumup.location_turn_on': {
3502
+ readonly text: "Standort einschalten";
3503
+ readonly only: readonly ["app"];
3504
+ };
3505
+ readonly 'sumup.bind_title': {
3506
+ readonly text: "Mit SumUp verbinden";
3507
+ readonly only: readonly ["app"];
3508
+ };
3509
+ readonly 'sumup.bind': {
3510
+ readonly text: "Verbinden";
3511
+ readonly only: readonly ["app"];
3512
+ };
3513
+ readonly 'sumup.unbind_title': {
3514
+ readonly text: "Verbindung lösen";
3515
+ readonly only: readonly ["app"];
3516
+ };
3517
+ readonly 'sumup.unbind': {
3518
+ readonly text: "Lösen";
3519
+ readonly only: readonly ["app"];
3520
+ };
3521
+ readonly 'sumup.reader_change': {
3522
+ readonly text: "Leser ändern";
3523
+ readonly only: readonly ["app"];
3524
+ };
3378
3525
  readonly 'tip.line_cash_kept': {
3379
3526
  readonly text: "{amount} gleich einstecken";
3380
3527
  readonly placeholders: readonly ["amount"];
@@ -172,6 +172,37 @@ const MELDUNGEN_ROH = {
172
172
  // Antwort blieb aus. Deshalb derselbe Ton wie card_payment.unknown.
173
173
  'gptom.timeout': { text: 'Das Terminal hat in der Frist nicht geantwortet – die Karte kann belastet sein. Bitte am Terminal-Beleg nachsehen, BEVOR neu kassiert wird.', only: ['app'] },
174
174
  'gptom.timeout_with_id': { text: 'Das Terminal hat in der Frist nicht geantwortet – die Karte kann belastet sein. Bitte am Terminal-Beleg nachsehen, BEVOR neu kassiert wird. Kennung der Zahlung: {reference}.', placeholders: ['reference'], only: ['app'] },
175
+ // --- SumUp (Kassen-App, Android; Spec 2026-11-14-sumup-kasse) -------------
176
+ // Angemeldet wird nur in den Einstellungen, nie mitten in einer Zahlung. Die Kasse ist an ein SumUp-Konto gebunden.
177
+ 'sumup.key_missing': { text: 'SumUp ist für diese Kasse noch nicht eingerichtet – bitte Kasseneck kontaktieren.', only: ['app'] },
178
+ 'sumup.not_logged_in': { text: 'Nicht bei SumUp angemeldet. Bitte in den Einstellungen unter Kartenterminal anmelden.', only: ['app'] },
179
+ 'sumup.other_account': { text: 'Hier ist ein anderes SumUp-Konto angemeldet ({current}) als das der Kasse ({bound}). Bitte abmelden und mit dem richtigen Konto anmelden.', placeholders: ['current', 'bound'], only: ['app'] },
180
+ 'sumup.bind_question': { text: 'Diese Kasse mit dem SumUp-Konto {merchant} verbinden? Danach kassieren alle Geräte nur noch auf dieses Konto.', placeholders: ['merchant'], only: ['app'] },
181
+ 'sumup.unbind_question': { text: 'Die Verbindung zum SumUp-Konto lösen? Danach kann sich ein anderes Konto verbinden.', only: ['app'] },
182
+ 'sumup.wrong_currency': { text: 'Das SumUp-Konto rechnet in {currency}, die Kasse in Euro. Bitte ein Konto in Euro verwenden.', placeholders: ['currency'], only: ['app'] },
183
+ 'sumup.login_failed': { text: 'Die Anmeldung bei SumUp hat nicht geklappt. Bitte erneut versuchen.', only: ['app'] },
184
+ // Nicht durchgeführt heißt: SumUp hat entschieden, es ist sicher nichts gebucht. Den Grund zeigt SumUp selbst auf
185
+ // seinem Fehlerschirm; die Kasse gibt keinen rohen (oft englischen) SDK-Text weiter.
186
+ 'sumup.declined': { text: 'SumUp hat die Zahlung nicht durchgeführt, es wurde nichts abgebucht.', only: ['app'] },
187
+ 'sumup.not_bound': { text: 'Die Kasse ist noch mit keinem SumUp-Konto verbunden. Bitte in den Einstellungen unter Kartenterminal verbinden.', only: ['app'] },
188
+ // Weicht der Betrag ab, kann trotzdem gebucht sein: derselbe Ton wie card_payment.unknown.
189
+ 'sumup.amount_mismatch': { text: 'SumUp meldet einen anderen Betrag als die Kasse. Bitte in der SumUp-App nachsehen, BEVOR neu kassiert wird.', only: ['app'] },
190
+ 'sumup.below_minimum': { text: 'Mit SumUp geht Karte erst ab 1,00 €.', only: ['app'] },
191
+ 'sumup.check_in_app': { text: 'In der SumUp-App unter Transaktionen nachsehen: {amount}, {time}.', placeholders: ['amount', 'time'], only: ['app'] },
192
+ 'sumup.code_optional_label': { text: 'SumUp-Transaktionscode (aus der SumUp-App, freiwillig)', only: ['app'] },
193
+ 'sumup.refund_hint': { text: 'Die Kartenzahlung bitte in der SumUp-App zurückbuchen (Transaktion {code}, Karte endet auf {digits}).', placeholders: ['code', 'digits'], only: ['app'] },
194
+ 'sumup.ios_external': { text: 'SumUp ist auf diesem Gerät nicht angebunden: den Betrag am SumUp-Gerät eintippen, die Kasse bucht Karte.', only: ['app'] },
195
+ 'sumup.status_logged_in': { text: 'Bei SumUp angemeldet als {merchant}.', placeholders: ['merchant'], only: ['app'] },
196
+ 'sumup.status_logged_out': { text: 'Nicht bei SumUp angemeldet.', only: ['app'] },
197
+ // Die Blätter vor der SumUp-Anmeldung: Titel und Knöpfe stehen bei den Beschriftungen (sumup.location_title …).
198
+ 'sumup.location_question': { text: 'SumUp verlangt für Kartenzahlungen den Standort dieses Geräts. Gleich fragt Android danach.', only: ['app'] },
199
+ 'sumup.location_hint': { text: 'Bitte „Bei Nutzung der App“ wählen.', only: ['app'] },
200
+ 'sumup.location_denied': { text: 'Der Standort ist für die Kasse gesperrt. Ohne ihn meldet SumUp nicht an.', only: ['app'] },
201
+ 'sumup.location_denied_hint': { text: 'In den Einstellungen der App unter „Berechtigungen“ den Standort erlauben.', only: ['app'] },
202
+ 'sumup.location_off': { text: 'Der Standort ist an diesem Gerät ausgeschaltet. SumUp braucht ihn für Kartenzahlungen.', only: ['app'] },
203
+ // Statuszeile „Kartenleser“, sobald SumUp einen Leser eingerichtet hat ({name}: Name des Lesers, etwa „UL924“).
204
+ 'sumup.reader_ready': { text: 'Leser {name} ist eingerichtet.', placeholders: ['name'], only: ['app'] },
205
+ 'sumup.location_missing': { text: 'Ohne Standort keine Anmeldung bei SumUp. Bitte den Standort erlauben und erneut anmelden.', only: ['app'] },
175
206
  // --- Terminal-Protokoll --------------------------------------------------
176
207
  'log.empty': { text: 'Noch keine Einträge – das Protokoll füllt sich mit der ersten Kartenzahlung.' },
177
208
  'log.copied': { text: 'Das Protokoll liegt in der Zwischenablage.' },
@@ -1617,6 +1648,19 @@ const BESCHRIFTUNGEN_ROH = {
1617
1648
  'version.reload': { text: 'Neu laden', only: ['web'] },
1618
1649
  // --- Fassung der Kasse, leise Zeile in den Einstellungen und auf dem PIN-Schirm (beide Kassen) ---
1619
1650
  'version.line': { text: 'Fassung {version} · {time}', placeholders: ['version', 'time'] },
1651
+ // --- SumUp in der Kassen-App: Titel und Knöpfe der Blätter für Standort und Bindung (1.40.0) ---
1652
+ // Zweiter Knopf: devices.not_now (Standort) bzw. common.cancel (Bindung).
1653
+ 'sumup.location_title': { text: 'Standort für SumUp', only: ['app'] },
1654
+ 'sumup.location_allow': { text: 'Standort erlauben', only: ['app'] },
1655
+ 'sumup.location_denied_title': { text: 'Standort gesperrt', only: ['app'] },
1656
+ 'sumup.open_app_settings': { text: 'Einstellungen öffnen', only: ['app'] },
1657
+ 'sumup.location_off_title': { text: 'Standort ist aus', only: ['app'] },
1658
+ 'sumup.location_turn_on': { text: 'Standort einschalten', only: ['app'] },
1659
+ 'sumup.bind_title': { text: 'Mit SumUp verbinden', only: ['app'] },
1660
+ 'sumup.bind': { text: 'Verbinden', only: ['app'] },
1661
+ 'sumup.unbind_title': { text: 'Verbindung lösen', only: ['app'] },
1662
+ 'sumup.unbind': { text: 'Lösen', only: ['app'] },
1663
+ 'sumup.reader_change': { text: 'Leser ändern', only: ['app'] },
1620
1664
  // --- Kartentrinkgeld an der Kasse (Spec 2026-11-11-kartentrinkgeld, 1.37.0) ---
1621
1665
  // Die eine Zeile beim Kassieren je Zahlart und Ergebnis (tipStatus), mit Betrag; einzeilig.
1622
1666
  'tip.line_cash_kept': { text: '{amount} gleich einstecken', placeholders: ['amount'] },
@@ -179,11 +179,19 @@ function gpTomBlock(daten) {
179
179
  }
180
180
  return zeilen;
181
181
  }
182
+ /**
183
+ * SumUp liefert `amount` in Euro (SDK-Antwort, so am Beleg gespeichert: 25, 14.09).
184
+ * Auch eine ganze Zahl ist Euro, nie Cent. Zeichenkette mit Punkt wird gelesen,
185
+ * alles andere ergibt einen Strich.
186
+ */
187
+ function sumupBetrag(roh) {
188
+ const zahl = typeof roh === 'number' ? roh
189
+ : (typeof roh === 'string' && /^-?\d+(\.\d+)?$/.test(roh.trim()) ? Number(roh.trim()) : NaN);
190
+ return Number.isFinite(zahl) ? zahl.toFixed(2).replace('.', ',') : '-';
191
+ }
182
192
  function sumupBlock(daten) {
183
193
  const feld = (k) => kartenFeld(daten, k);
184
- const betrag = typeof daten.amount === 'number'
185
- ? (Number.isInteger(daten.amount) ? formatCents(daten.amount) : daten.amount.toFixed(2).replace('.', ','))
186
- : '-';
194
+ const betrag = sumupBetrag(daten.amount);
187
195
  return [
188
196
  textZeile('Sumup Beleg', 'center', true),
189
197
  paarZeile('Kartentyp:', feld('cardType') || 'n/a'),
@@ -1,5 +1,5 @@
1
1
  /** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
2
- export declare const VOKABULAR_QUELLE = "ab188a33a1f0d07b187347e0293b935e41435fa61dc1078cd164b10cc2be5f46";
2
+ export declare const VOKABULAR_QUELLE = "558614ea07d6a5bab99cac9ad20e8c934947f262f89594c51449b69244059a9a";
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 = "ab188a33a1f0d07b187347e0293b935e41435fa61dc1078cd164b10cc2be5f46";
4
+ export const VOKABULAR_QUELLE = "558614ea07d6a5bab99cac9ad20e8c934947f262f89594c51449b69244059a9a";
5
5
  /** Schema je Endpunkt (aussen -> innen) und Wertverweise auf die Kataloge. */
6
6
  export const SCHEMAS = {
7
7
  "getReceipt": {
@@ -187,6 +187,7 @@ export const SCHEMAS = {
187
187
  "tipCardKeptByDefault": "tgKarteDirekt",
188
188
  "tipCardKeptMode": "tgKarteModus",
189
189
  "tipSelfPayout": "tgSelbstAuszahlen",
190
+ "sumupMerchantCode": "sumupHaendler",
190
191
  "checkoutMode": "kassierenModus",
191
192
  "receiptOutput": "belegAusgabe",
192
193
  "doneScreenSeconds": "fertigSekunden",
@@ -365,6 +366,13 @@ export const SCHEMAS = {
365
366
  "active": "aktiv"
366
367
  }
367
368
  ]
369
+ },
370
+ "cardTerminal": {
371
+ "__": "kartenterminal",
372
+ "sumup": {
373
+ "__": "sumup",
374
+ "affiliateKey": "affiliateKey"
375
+ }
368
376
  }
369
377
  },
370
378
  "werte": {
@@ -739,7 +747,8 @@ export const KATALOGE = {
739
747
  "gptom": "gptom",
740
748
  "hobex": "hobex",
741
749
  "mypos": "mypos",
742
- "stripe": "stripe"
750
+ "stripe": "stripe",
751
+ "sumup": "sumup"
743
752
  },
744
753
  "KASSE_BETRIEB_WERTE.checkoutMode": {
745
754
  "seite": "page",
@@ -4,4 +4,4 @@
4
4
  * Client-Version, Nachtrag §6). Ein Test haelt sie gleich mit `package.json`;
5
5
  * beim Anheben der Version beide Stellen aendern.
6
6
  */
7
- export declare const PACKAGE_VERSION = "1.39.0";
7
+ export declare const PACKAGE_VERSION = "1.40.0";
@@ -4,4 +4,4 @@
4
4
  * Client-Version, Nachtrag §6). Ein Test haelt sie gleich mit `package.json`;
5
5
  * beim Anheben der Version beide Stellen aendern.
6
6
  */
7
- export const PACKAGE_VERSION = '1.39.0';
7
+ export const PACKAGE_VERSION = '1.40.0';
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.39.0",
2
+ "version": "1.40.0",
3
3
  "measuredOn": {
4
4
  "tid": "3600335",
5
5
  "hpsVersion": "1.10.0",
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "title": "Kasseneck Rechnungs-API",
4
4
  "version": 2,
5
- "package": "1.39.0",
5
+ "package": "1.40.0",
6
6
  "endpoints": {
7
7
  "createCustomer": {
8
8
  "request": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.39.0",
2
+ "version": "1.40.0",
3
3
  "languages": [
4
4
  "de",
5
5
  "en"