@kreiseck/kasseneck-api 1.27.0 → 1.29.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 (104) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +84 -0
  3. package/dist/cjs/client/api.d.ts +15 -0
  4. package/dist/cjs/client/api.js +8 -0
  5. package/dist/cjs/client/aufrufe.d.ts +4 -4
  6. package/dist/cjs/client/aufrufe.js +31 -0
  7. package/dist/cjs/client/index.d.ts +1 -0
  8. package/dist/cjs/client/index.js +17 -1
  9. package/dist/cjs/client/terminal.d.ts +206 -0
  10. package/dist/cjs/client/terminal.js +288 -0
  11. package/dist/cjs/index.d.ts +1 -1
  12. package/dist/cjs/index.js +17 -1
  13. package/dist/cjs/pos/aufrunden.d.ts +6 -0
  14. package/dist/cjs/pos/aufrunden.js +59 -0
  15. package/dist/cjs/pos/client.js +12 -1
  16. package/dist/cjs/pos/index.d.ts +4 -3
  17. package/dist/cjs/pos/index.js +17 -4
  18. package/dist/cjs/pos/schicht-lesen.d.ts +2 -1
  19. package/dist/cjs/pos/schicht-lesen.js +48 -1
  20. package/dist/cjs/pos/schicht-typen.d.ts +106 -3
  21. package/dist/cjs/pos/schicht-typen.js +14 -4
  22. package/dist/cjs/pos/schicht.d.ts +28 -2
  23. package/dist/cjs/pos/schicht.js +19 -0
  24. package/dist/cjs/pos/settings.d.ts +39 -0
  25. package/dist/cjs/pos/settings.js +65 -4
  26. package/dist/cjs/pos/texte.d.ts +292 -0
  27. package/dist/cjs/pos/texte.js +108 -0
  28. package/dist/cjs/receipt/shift-sheet.js +29 -0
  29. package/dist/cjs/stored/einstellungen.js +31 -4
  30. package/dist/cjs/stored/vokabular.d.ts +1 -1
  31. package/dist/cjs/stored/vokabular.js +29 -2
  32. package/dist/cjs/version.d.ts +1 -1
  33. package/dist/cjs/version.js +1 -1
  34. package/dist/esm/client/api.d.ts +15 -0
  35. package/dist/esm/client/api.js +8 -0
  36. package/dist/esm/client/aufrufe.d.ts +4 -4
  37. package/dist/esm/client/aufrufe.js +31 -0
  38. package/dist/esm/client/index.d.ts +1 -0
  39. package/dist/esm/client/index.js +1 -0
  40. package/dist/esm/client/terminal.d.ts +206 -0
  41. package/dist/esm/client/terminal.js +278 -0
  42. package/dist/esm/index.d.ts +1 -1
  43. package/dist/esm/index.js +1 -1
  44. package/dist/esm/pos/aufrunden.d.ts +6 -0
  45. package/dist/esm/pos/aufrunden.js +56 -0
  46. package/dist/esm/pos/client.js +13 -2
  47. package/dist/esm/pos/index.d.ts +4 -3
  48. package/dist/esm/pos/index.js +5 -4
  49. package/dist/esm/pos/schicht-lesen.d.ts +2 -1
  50. package/dist/esm/pos/schicht-lesen.js +47 -1
  51. package/dist/esm/pos/schicht-typen.d.ts +106 -3
  52. package/dist/esm/pos/schicht-typen.js +13 -3
  53. package/dist/esm/pos/schicht.d.ts +28 -2
  54. package/dist/esm/pos/schicht.js +19 -1
  55. package/dist/esm/pos/settings.d.ts +39 -0
  56. package/dist/esm/pos/settings.js +60 -3
  57. package/dist/esm/pos/texte.d.ts +292 -0
  58. package/dist/esm/pos/texte.js +108 -0
  59. package/dist/esm/receipt/shift-sheet.js +29 -0
  60. package/dist/esm/stored/einstellungen.js +32 -5
  61. package/dist/esm/stored/vokabular.d.ts +1 -1
  62. package/dist/esm/stored/vokabular.js +29 -2
  63. package/dist/esm/version.d.ts +1 -1
  64. package/dist/esm/version.js +1 -1
  65. package/fixtures/duplicate-cases.json +6 -0
  66. package/fixtures/expected/duplicate.shift-close.hex +28 -27
  67. package/fixtures/expected/shift-close-blind.grid32.txt +1 -0
  68. package/fixtures/expected/shift-close-blind.grid48.txt +1 -0
  69. package/fixtures/expected/shift-close-blind.lines.json +6 -0
  70. package/fixtures/expected/shift-close-put-in.grid32.txt +1 -0
  71. package/fixtures/expected/shift-close-put-in.grid48.txt +1 -0
  72. package/fixtures/expected/shift-close-put-in.lines.json +6 -0
  73. package/fixtures/expected/shift-close-take-out.grid32.txt +1 -0
  74. package/fixtures/expected/shift-close-take-out.grid48.txt +1 -0
  75. package/fixtures/expected/shift-close-take-out.lines.json +6 -0
  76. package/fixtures/expected/shift-close.grid32.txt +1 -0
  77. package/fixtures/expected/shift-close.grid48.txt +1 -0
  78. package/fixtures/expected/shift-close.lines.json +6 -0
  79. package/fixtures/expected/shift-interim.grid32.txt +1 -0
  80. package/fixtures/expected/shift-interim.grid48.txt +1 -0
  81. package/fixtures/expected/shift-interim.lines.json +6 -0
  82. package/fixtures/hobex-hps-codes.json +1 -1
  83. package/fixtures/invoice-api.schema.json +1 -1
  84. package/fixtures/invoice-texts.json +1 -1
  85. package/fixtures/pos-texts.json +337 -1
  86. package/fixtures/renames-1.0.json +30 -0
  87. package/fixtures/shift-ablauf-cases.json +182 -0
  88. package/fixtures/shift-receipts.json +15 -15
  89. package/fixtures/surface.json +59 -4
  90. package/fixtures/tip-round-up-cases.json +27 -0
  91. package/fixtures/v3/antworten/belege.json +2 -2
  92. package/fixtures/v3/antworten/belegmail.json +2 -2
  93. package/fixtures/v3/antworten/berichte.json +2 -2
  94. package/fixtures/v3/antworten/kasse-belege.json +2 -2
  95. package/fixtures/v3/antworten/kasse.json +504 -4
  96. package/fixtures/v3/antworten/lager.json +1 -1
  97. package/fixtures/v3/antworten/rechnungen.json +2 -2
  98. package/fixtures/v3/antworten/storno.json +2 -2
  99. package/fixtures/v3/stored/belege.json +2 -2
  100. package/fixtures/v3/stored/kasse.json +520 -12
  101. package/fixtures/v3/stored/rechnungen.json +2 -2
  102. package/fixtures/v3/v3-vokabular.json +184 -11
  103. package/fixtures/v3/zahlbetrag-faelle.json +2 -2
  104. package/package.json +1 -1
@@ -892,6 +892,29 @@ declare const MELDUNGEN_ROH: {
892
892
  readonly placeholders: readonly ["target"];
893
893
  readonly only: readonly ["app"];
894
894
  };
895
+ readonly 'shift.started_taken_over': {
896
+ readonly text: "Schicht {number} hat begonnen – mit {amount} in der Lade, übernommen von Schicht {from} ({time}).";
897
+ readonly placeholders: readonly ["number", "amount", "from", "time"];
898
+ };
899
+ readonly 'tip.summary': {
900
+ readonly text: "Trinkgeld {tip} · der Gast zahlt {total}";
901
+ readonly placeholders: readonly ["tip", "total"];
902
+ };
903
+ readonly 'tip.total_below_sum': {
904
+ readonly text: "Der Betrag liegt unter der Summe.";
905
+ };
906
+ readonly 'shift.interim_saved': {
907
+ readonly text: "Zählung festgehalten.";
908
+ };
909
+ readonly 'shift.finish_step_first': {
910
+ readonly text: "Erst den Schritt rechts abschließen oder abbrechen.";
911
+ };
912
+ readonly 'tip.revenue_hint': {
913
+ readonly text: "Steuerpflichtiges Trinkgeld zählt als Umsatz des Betriebs und wird nicht ausgezahlt.";
914
+ };
915
+ readonly 'tip.unassigned_hint': {
916
+ readonly text: "Trinkgeld ohne angemeldeten Benutzer.";
917
+ };
895
918
  };
896
919
  export type MessageKey = keyof typeof MELDUNGEN_ROH;
897
920
  export declare const MESSAGES: Record<MessageKey, TextEntry>;
@@ -1683,6 +1706,9 @@ declare const BESCHRIFTUNGEN_ROH: {
1683
1706
  readonly 'cash_movement.type_handover_difference': {
1684
1707
  readonly text: "Übergabedifferenz";
1685
1708
  };
1709
+ readonly 'cash_movement.type_interim_difference': {
1710
+ readonly text: "Zwischenzählung";
1711
+ };
1686
1712
  readonly 'shift_receipt.title_close': {
1687
1713
  readonly text: "Schichtabschluss";
1688
1714
  };
@@ -2509,6 +2535,272 @@ declare const BESCHRIFTUNGEN_ROH: {
2509
2535
  readonly text: "Nullbeleg {number} erstellt, {time}";
2510
2536
  readonly placeholders: readonly ["number", "time"];
2511
2537
  };
2538
+ readonly 'zero_receipt.done_title': {
2539
+ readonly text: "Nullbeleg erstellt";
2540
+ };
2541
+ readonly 'zero_receipt.back': {
2542
+ readonly text: "Zurück zur Prüfung";
2543
+ };
2544
+ readonly 'dep.export': {
2545
+ readonly text: "DEP exportieren";
2546
+ };
2547
+ readonly 'dep.period_question': {
2548
+ readonly text: "Welcher Zeitraum?";
2549
+ };
2550
+ readonly 'common.close': {
2551
+ readonly text: "Schließen";
2552
+ };
2553
+ readonly 'shift.state_closed': {
2554
+ readonly text: "Schicht geschlossen";
2555
+ };
2556
+ readonly 'shift.start_title': {
2557
+ readonly text: "Schicht beginnen";
2558
+ };
2559
+ readonly 'shift.band_closed': {
2560
+ readonly text: "Zum Verkaufen rechts die Schicht beginnen.";
2561
+ };
2562
+ readonly 'shift.band_closing': {
2563
+ readonly text: "Verkaufen ist pausiert, bis du fertig bist oder abbrichst.";
2564
+ };
2565
+ readonly 'shift.band_interim': {
2566
+ readonly text: "Verkaufen ist kurz pausiert.";
2567
+ };
2568
+ readonly 'shift.band_cash': {
2569
+ readonly text: "Zum Verkaufen auf die Kacheln tippen.";
2570
+ };
2571
+ readonly 'tip.revenue_title': {
2572
+ readonly text: "Als Umsatz erfasst";
2573
+ };
2574
+ readonly 'tip.revenue_badge': {
2575
+ readonly text: "Umsatz";
2576
+ };
2577
+ readonly 'tip.unassigned': {
2578
+ readonly text: "Nicht zugeordnet";
2579
+ };
2580
+ readonly 'shift.last_shift': {
2581
+ readonly text: "Letzte Schicht";
2582
+ };
2583
+ readonly 'shift.in_drawer_by_system': {
2584
+ readonly text: "Laut Kasse in der Lade";
2585
+ };
2586
+ readonly 'shift.take_over_amount': {
2587
+ readonly text: "{amount} übernehmen";
2588
+ readonly placeholders: readonly ["amount"];
2589
+ };
2590
+ readonly 'shift.top_up': {
2591
+ readonly text: "Auffüllen";
2592
+ };
2593
+ readonly 'shift.missing': {
2594
+ readonly text: "fehlen {amount}";
2595
+ readonly placeholders: readonly ["amount"];
2596
+ };
2597
+ readonly 'shift.count_coins': {
2598
+ readonly text: "Scheine und Münzen zählen";
2599
+ };
2600
+ readonly 'shift.count_please': {
2601
+ readonly text: "Zähl bitte, was in der Lade liegt.";
2602
+ };
2603
+ readonly 'drawer.open_for_count': {
2604
+ readonly text: "Lade öffnen zum Zählen";
2605
+ };
2606
+ readonly 'drawer.open_for_tips': {
2607
+ readonly text: "Lade öffnen für Trinkgeld";
2608
+ };
2609
+ readonly 'drawer.open_for_take': {
2610
+ readonly text: "Lade öffnen zum Entnehmen";
2611
+ };
2612
+ readonly 'shift.close_title_numbered': {
2613
+ readonly text: "Schicht {number} schließen";
2614
+ readonly placeholders: readonly ["number"];
2615
+ };
2616
+ readonly 'shift.closed_title': {
2617
+ readonly text: "Schicht {number} geschlossen";
2618
+ readonly placeholders: readonly ["number"];
2619
+ };
2620
+ readonly 'shift.running_since_drawer': {
2621
+ readonly text: "{drawer} · läuft seit {time} ({duration})";
2622
+ readonly placeholders: readonly ["drawer", "time", "duration"];
2623
+ };
2624
+ readonly 'shift.step_count': {
2625
+ readonly text: "Zählen";
2626
+ };
2627
+ readonly 'shift.step_tips': {
2628
+ readonly text: "Trinkgeld";
2629
+ };
2630
+ readonly 'shift.step_take': {
2631
+ readonly text: "Entnehmen";
2632
+ };
2633
+ readonly 'shift.step_done': {
2634
+ readonly text: "Fertig";
2635
+ };
2636
+ readonly 'shift.expected': {
2637
+ readonly text: "In der Lade sollten sein";
2638
+ };
2639
+ readonly 'shift.of_which_cash_tips': {
2640
+ readonly text: "davon Trinkgeld bar";
2641
+ };
2642
+ readonly 'shift.breakdown': {
2643
+ readonly text: "So setzt sich das zusammen";
2644
+ };
2645
+ readonly 'shift.part_opening': {
2646
+ readonly text: "Anfang";
2647
+ };
2648
+ readonly 'shift.part_cash_sales': {
2649
+ readonly text: "Barverkäufe";
2650
+ };
2651
+ readonly 'shift.part_cash_tips': {
2652
+ readonly text: "Trinkgeld bar";
2653
+ };
2654
+ readonly 'shift.part_cancellations': {
2655
+ readonly text: "Storno bar";
2656
+ };
2657
+ readonly 'shift.part_cash_in': {
2658
+ readonly text: "Einzahlungen";
2659
+ };
2660
+ readonly 'shift.part_cash_out': {
2661
+ readonly text: "Ausgaben aus der Lade";
2662
+ };
2663
+ readonly 'shift.part_interim': {
2664
+ readonly text: "Zwischenzählung";
2665
+ };
2666
+ readonly 'tip.who_takes_now': {
2667
+ readonly text: "Wer nimmt sein Trinkgeld jetzt bar mit?";
2668
+ };
2669
+ readonly 'tip.later_hint': {
2670
+ readonly text: "Was du nicht auszahlst, bleibt offen und wird in einer späteren Schicht ausgezahlt.";
2671
+ };
2672
+ readonly 'tip.later': {
2673
+ readonly text: "Später";
2674
+ };
2675
+ readonly 'tip.pay_out': {
2676
+ readonly text: "Auszahlen";
2677
+ };
2678
+ readonly 'tip.pay_out_amount': {
2679
+ readonly text: "{amount} auszahlen";
2680
+ readonly placeholders: readonly ["amount"];
2681
+ };
2682
+ readonly 'shift.now_in_drawer': {
2683
+ readonly text: "Jetzt in der Lade";
2684
+ };
2685
+ readonly 'shift.interim_title': {
2686
+ readonly text: "Schicht {number} zählen";
2687
+ readonly placeholders: readonly ["number"];
2688
+ };
2689
+ readonly 'shift.interim_save': {
2690
+ readonly text: "Zählung festhalten";
2691
+ };
2692
+ readonly 'shift.opening_not_counted': {
2693
+ readonly text: "Anfang nicht gezählt";
2694
+ };
2695
+ readonly 'shift.taken_over_unchecked_by': {
2696
+ readonly text: "{name}, {time}";
2697
+ readonly placeholders: readonly ["name", "time"];
2698
+ };
2699
+ readonly 'shift.taken_over_unchecked': {
2700
+ readonly text: "Schicht {number} wurde ohne Zählen übernommen";
2701
+ readonly placeholders: readonly ["number"];
2702
+ };
2703
+ readonly 'tip.kind_percent': {
2704
+ readonly text: "Prozent";
2705
+ };
2706
+ readonly 'tip.kind_round_up': {
2707
+ readonly text: "Aufrunden";
2708
+ };
2709
+ readonly 'tip.kind_total': {
2710
+ readonly text: "Gesamt";
2711
+ };
2712
+ readonly 'tip.round_to': {
2713
+ readonly text: "auf {amount}";
2714
+ readonly placeholders: readonly ["amount"];
2715
+ };
2716
+ readonly 'tip.guest_pays_total': {
2717
+ readonly text: "Der Gast zahlt insgesamt";
2718
+ };
2719
+ readonly 'tip.remainder_is_tip': {
2720
+ readonly text: "Rest ist Trinkgeld";
2721
+ };
2722
+ readonly 'voucher.section': {
2723
+ readonly text: "Gutschein";
2724
+ };
2725
+ readonly 'voucher.code_placeholder': {
2726
+ readonly text: "Code eingeben oder scannen";
2727
+ };
2728
+ readonly 'settings.cart_width': {
2729
+ readonly text: "Breite der rechten Spalte";
2730
+ };
2731
+ readonly 'settings.cart_width_narrow': {
2732
+ readonly text: "Schmal";
2733
+ };
2734
+ readonly 'settings.cart_width_medium': {
2735
+ readonly text: "Mittel";
2736
+ };
2737
+ readonly 'settings.cart_width_wide': {
2738
+ readonly text: "Breit";
2739
+ };
2740
+ readonly 'shift_receipt.opening_not_counted': {
2741
+ readonly text: "Anfang übernommen, nicht gezählt";
2742
+ };
2743
+ readonly 'shift_receipt.interim_count': {
2744
+ readonly text: "Zwischenzählung";
2745
+ };
2746
+ readonly 'shift_receipt.counted_before_payout': {
2747
+ readonly text: "Gezählt";
2748
+ };
2749
+ readonly 'shift_receipt.difference_part_interim': {
2750
+ readonly text: "davon Zwischenzählung";
2751
+ };
2752
+ readonly 'shift_receipt.difference_part_closing': {
2753
+ readonly text: "davon Abschluss";
2754
+ };
2755
+ readonly 'shift.state_closing': {
2756
+ readonly text: "Schicht wird geschlossen";
2757
+ };
2758
+ readonly 'shift.state_interim': {
2759
+ readonly text: "Zwischenzählung";
2760
+ };
2761
+ readonly 'shift.tips_paid_out': {
2762
+ readonly text: "Trinkgeld ausgezahlt";
2763
+ };
2764
+ readonly 'shift.difference_none': {
2765
+ readonly text: "stimmt";
2766
+ };
2767
+ readonly 'shift.start_new': {
2768
+ readonly text: "Neue Schicht beginnen";
2769
+ };
2770
+ readonly 'shift.drawer_from_to': {
2771
+ readonly text: "{drawer} · {from} bis {to}";
2772
+ readonly placeholders: readonly ["drawer", "from", "to"];
2773
+ };
2774
+ readonly 'shift.running_since_by': {
2775
+ readonly text: "{drawer} · läuft seit {time} ({name})";
2776
+ readonly placeholders: readonly ["drawer", "time", "name"];
2777
+ };
2778
+ readonly 'shift.z_receipt_printed': {
2779
+ readonly text: "Z-Bon gedruckt";
2780
+ };
2781
+ readonly 'shift.count_now': {
2782
+ readonly text: "Jetzt zählen";
2783
+ };
2784
+ readonly 'shift.interim_entry': {
2785
+ readonly text: "Zwischenzählung";
2786
+ };
2787
+ readonly 'drawer.open': {
2788
+ readonly text: "Lade öffnen";
2789
+ };
2790
+ readonly 'time.today_at': {
2791
+ readonly text: "heute {time}";
2792
+ readonly placeholders: readonly ["time"];
2793
+ };
2794
+ readonly 'tip.summary_percent': {
2795
+ readonly text: "Trinkgeld {tip} ({percent} %)";
2796
+ readonly placeholders: readonly ["tip", "percent"];
2797
+ };
2798
+ readonly 'settings.tip_kinds': {
2799
+ readonly text: "Trinkgeld-Arten";
2800
+ };
2801
+ readonly 'settings.tip_start': {
2802
+ readonly text: "Zuerst offen";
2803
+ };
2512
2804
  };
2513
2805
  export type LabelKey = keyof typeof BESCHRIFTUNGEN_ROH;
2514
2806
  export declare const LABELS: Record<LabelKey, TextEntry>;
@@ -427,6 +427,15 @@ const MELDUNGEN_ROH = {
427
427
  // --- Nur App -------------------------------------------------------------
428
428
  'app.not_in_browser': { text: 'Die Kassen-App läuft nicht im Browser – dafür gibt es kasse.kasseneck.at.', only: ['app'] },
429
429
  'app.open_in_browser': { text: 'Bitte im Browser öffnen: {target}', placeholders: ['target'], only: ['app'] },
430
+ // --- Schicht-Ablauf der Kasse (1.28.0) -----------------------------------
431
+ 'shift.started_taken_over': { text: 'Schicht {number} hat begonnen – mit {amount} in der Lade, übernommen von Schicht {from} ({time}).', placeholders: ['number', 'amount', 'from', 'time'] },
432
+ 'tip.summary': { text: 'Trinkgeld {tip} · der Gast zahlt {total}', placeholders: ['tip', 'total'] },
433
+ 'tip.total_below_sum': { text: 'Der Betrag liegt unter der Summe.' },
434
+ 'shift.interim_saved': { text: 'Zählung festgehalten.' },
435
+ // Waehrend Zwischenzaehlung oder Abschluss rechts: getippte Wege der Kopfzeile sagen, warum sie gesperrt sind.
436
+ 'shift.finish_step_first': { text: 'Erst den Schritt rechts abschließen oder abbrechen.' },
437
+ 'tip.revenue_hint': { text: 'Steuerpflichtiges Trinkgeld zählt als Umsatz des Betriebs und wird nicht ausgezahlt.' },
438
+ 'tip.unassigned_hint': { text: 'Trinkgeld ohne angemeldeten Benutzer.' },
430
439
  };
431
440
  // Auf den gemeinsamen Typ gebracht: `Object.entries(MESSAGES)` liefert sonst
432
441
  // pro Schluessel den engsten Literaltyp, und `placeholders`/`only` waeren nur
@@ -908,6 +917,7 @@ const BESCHRIFTUNGEN_ROH = {
908
917
  'cash_movement.type_expense': { text: 'Barausgabe' },
909
918
  'cash_movement.type_count_difference': { text: 'Zähldifferenz' },
910
919
  'cash_movement.type_handover_difference': { text: 'Übergabedifferenz' },
920
+ 'cash_movement.type_interim_difference': { text: 'Zwischenzählung' },
911
921
  // Bon der Schicht (Z-Bon, X-Bon, Kassenbewegung): Titel und Zeilennamen.
912
922
  'shift_receipt.title_close': { text: 'Schichtabschluss' },
913
923
  'shift_receipt.title_interim': { text: 'Zwischenbericht' },
@@ -1200,6 +1210,104 @@ const BESCHRIFTUNGEN_ROH = {
1200
1210
  // mit Belegnummer und Uhrzeit. Scheitert er, gilt `completion.zero_receipt_failed`.
1201
1211
  'zero_receipt.create': { text: 'Nullbeleg erstellen' },
1202
1212
  'zero_receipt.created': { text: 'Nullbeleg {number} erstellt, {time}', placeholders: ['number', 'time'] },
1213
+ // Prüfung kompakt (1.28.0): der Nullbeleg steht danach wie ein Verkaufsbeleg da (Titel, Rückweg);
1214
+ // das DEP fragt den Zeitraum erst nach „DEP exportieren“ in einem Fenster.
1215
+ 'zero_receipt.done_title': { text: 'Nullbeleg erstellt' },
1216
+ 'zero_receipt.back': { text: 'Zurück zur Prüfung' },
1217
+ 'dep.export': { text: 'DEP exportieren' },
1218
+ 'dep.period_question': { text: 'Welcher Zeitraum?' },
1219
+ 'common.close': { text: 'Schließen' },
1220
+ // --- Schicht-Ablauf der Kasse (1.28.0) -----------------------------------
1221
+ // Schicht beginnen, laufen lassen, zaehlen, schliessen. `shift.close_title` und
1222
+ // `shift.running_since` gibt es seit 1.11.0 mit anderem Wortlaut und bleiben; die
1223
+ // Fassungen mit Nummer bzw. Lade heissen darum `shift.close_title_numbered` und
1224
+ // `shift.running_since_drawer`.
1225
+ 'shift.state_closed': { text: 'Schicht geschlossen' },
1226
+ 'shift.start_title': { text: 'Schicht beginnen' },
1227
+ 'shift.band_closed': { text: 'Zum Verkaufen rechts die Schicht beginnen.' },
1228
+ 'shift.band_closing': { text: 'Verkaufen ist pausiert, bis du fertig bist oder abbrichst.' },
1229
+ 'shift.band_interim': { text: 'Verkaufen ist kurz pausiert.' },
1230
+ 'shift.band_cash': { text: 'Zum Verkaufen auf die Kacheln tippen.' },
1231
+ // Trinkgeld, das als Umsatz zählt (steuerpflichtig, Inhaber) bzw. ohne Empfänger -- nur Anzeige im Kassenstand,
1232
+ // wortgleich mit dem Kundenbereich.
1233
+ 'tip.revenue_title': { text: 'Als Umsatz erfasst' },
1234
+ 'tip.revenue_badge': { text: 'Umsatz' },
1235
+ 'tip.unassigned': { text: 'Nicht zugeordnet' },
1236
+ 'shift.last_shift': { text: 'Letzte Schicht' },
1237
+ 'shift.in_drawer_by_system': { text: 'Laut Kasse in der Lade' },
1238
+ 'shift.take_over_amount': { text: '{amount} übernehmen', placeholders: ['amount'] },
1239
+ 'shift.top_up': { text: 'Auffüllen' },
1240
+ 'shift.missing': { text: 'fehlen {amount}', placeholders: ['amount'] },
1241
+ 'shift.count_coins': { text: 'Scheine und Münzen zählen' },
1242
+ 'shift.count_please': { text: 'Zähl bitte, was in der Lade liegt.' },
1243
+ 'drawer.open_for_count': { text: 'Lade öffnen zum Zählen' },
1244
+ 'drawer.open_for_tips': { text: 'Lade öffnen für Trinkgeld' },
1245
+ 'drawer.open_for_take': { text: 'Lade öffnen zum Entnehmen' },
1246
+ 'shift.close_title_numbered': { text: 'Schicht {number} schließen', placeholders: ['number'] },
1247
+ 'shift.closed_title': { text: 'Schicht {number} geschlossen', placeholders: ['number'] },
1248
+ 'shift.running_since_drawer': { text: '{drawer} · läuft seit {time} ({duration})', placeholders: ['drawer', 'time', 'duration'] },
1249
+ 'shift.step_count': { text: 'Zählen' },
1250
+ 'shift.step_tips': { text: 'Trinkgeld' },
1251
+ 'shift.step_take': { text: 'Entnehmen' },
1252
+ 'shift.step_done': { text: 'Fertig' },
1253
+ 'shift.expected': { text: 'In der Lade sollten sein' },
1254
+ 'shift.of_which_cash_tips': { text: 'davon Trinkgeld bar' },
1255
+ 'shift.breakdown': { text: 'So setzt sich das zusammen' },
1256
+ 'shift.part_opening': { text: 'Anfang' },
1257
+ 'shift.part_cash_sales': { text: 'Barverkäufe' },
1258
+ 'shift.part_cash_tips': { text: 'Trinkgeld bar' },
1259
+ 'shift.part_cancellations': { text: 'Storno bar' },
1260
+ 'shift.part_cash_in': { text: 'Einzahlungen' },
1261
+ 'shift.part_cash_out': { text: 'Ausgaben aus der Lade' },
1262
+ 'shift.part_interim': { text: 'Zwischenzählung' },
1263
+ 'tip.who_takes_now': { text: 'Wer nimmt sein Trinkgeld jetzt bar mit?' },
1264
+ 'tip.later_hint': { text: 'Was du nicht auszahlst, bleibt offen und wird in einer späteren Schicht ausgezahlt.' },
1265
+ 'tip.later': { text: 'Später' },
1266
+ 'tip.pay_out': { text: 'Auszahlen' },
1267
+ 'tip.pay_out_amount': { text: '{amount} auszahlen', placeholders: ['amount'] },
1268
+ 'shift.now_in_drawer': { text: 'Jetzt in der Lade' },
1269
+ 'shift.interim_title': { text: 'Schicht {number} zählen', placeholders: ['number'] },
1270
+ 'shift.interim_save': { text: 'Zählung festhalten' },
1271
+ 'shift.opening_not_counted': { text: 'Anfang nicht gezählt' },
1272
+ // Titel der Hinweiskarte, wenn eine Schicht ohne Zaehlen uebernommen wurde (Unterzeile: `shift.taken_over_unchecked_by`).
1273
+ 'shift.taken_over_unchecked_by': { text: '{name}, {time}', placeholders: ['name', 'time'] },
1274
+ 'shift.taken_over_unchecked': { text: 'Schicht {number} wurde ohne Zählen übernommen', placeholders: ['number'] },
1275
+ // Trinkgeld-Arten beim Kassieren (Reiter) und ihre Hilfstexte.
1276
+ 'tip.kind_percent': { text: 'Prozent' },
1277
+ 'tip.kind_round_up': { text: 'Aufrunden' },
1278
+ 'tip.kind_total': { text: 'Gesamt' },
1279
+ 'tip.round_to': { text: 'auf {amount}', placeholders: ['amount'] },
1280
+ 'tip.guest_pays_total': { text: 'Der Gast zahlt insgesamt' },
1281
+ 'tip.remainder_is_tip': { text: 'Rest ist Trinkgeld' },
1282
+ 'voucher.section': { text: 'Gutschein' },
1283
+ 'voucher.code_placeholder': { text: 'Code eingeben oder scannen' },
1284
+ // Breite der rechten Spalte (Geraete-Einstellung `cartWidth`) und ihre Werte.
1285
+ 'settings.cart_width': { text: 'Breite der rechten Spalte' },
1286
+ 'settings.cart_width_narrow': { text: 'Schmal' },
1287
+ 'settings.cart_width_medium': { text: 'Mittel' },
1288
+ 'settings.cart_width_wide': { text: 'Breit' },
1289
+ // Z-Bon der Schicht: Zwischenzaehlung, Zaehlung vor der Auszahlung, Teile der Differenz.
1290
+ 'shift_receipt.opening_not_counted': { text: 'Anfang übernommen, nicht gezählt' },
1291
+ 'shift_receipt.interim_count': { text: 'Zwischenzählung' },
1292
+ 'shift_receipt.counted_before_payout': { text: 'Gezählt' },
1293
+ 'shift_receipt.difference_part_interim': { text: 'davon Zwischenzählung' },
1294
+ 'shift_receipt.difference_part_closing': { text: 'davon Abschluss' },
1295
+ // Nachtrag Schicht-Ablauf (1.28.0): Band-Titel ohne Punkt wie `shift.state_closed`.
1296
+ 'shift.state_closing': { text: 'Schicht wird geschlossen' },
1297
+ 'shift.state_interim': { text: 'Zwischenzählung' },
1298
+ 'shift.tips_paid_out': { text: 'Trinkgeld ausgezahlt' },
1299
+ 'shift.difference_none': { text: 'stimmt' },
1300
+ 'shift.start_new': { text: 'Neue Schicht beginnen' },
1301
+ 'shift.drawer_from_to': { text: '{drawer} · {from} bis {to}', placeholders: ['drawer', 'from', 'to'] },
1302
+ 'shift.running_since_by': { text: '{drawer} · läuft seit {time} ({name})', placeholders: ['drawer', 'time', 'name'] },
1303
+ 'shift.z_receipt_printed': { text: 'Z-Bon gedruckt' },
1304
+ 'shift.count_now': { text: 'Jetzt zählen' },
1305
+ 'shift.interim_entry': { text: 'Zwischenzählung' },
1306
+ 'drawer.open': { text: 'Lade öffnen' },
1307
+ 'time.today_at': { text: 'heute {time}', placeholders: ['time'] },
1308
+ 'tip.summary_percent': { text: 'Trinkgeld {tip} ({percent} %)', placeholders: ['tip', 'percent'] },
1309
+ 'settings.tip_kinds': { text: 'Trinkgeld-Arten' },
1310
+ 'settings.tip_start': { text: 'Zuerst offen' },
1203
1311
  };
1204
1312
  export const LABELS = BESCHRIFTUNGEN_ROH;
1205
1313
  /**
@@ -59,6 +59,11 @@ const ortText = (ort) => beschriftung(`shift_receipt.location_${ort}`, ort);
59
59
  function zahlartText(methode) {
60
60
  return methode === 'card' ? labelText('payment_method.card') : methode;
61
61
  }
62
+ /** Uhrzeit in Wien als `HH:mm`; unlesbar -> `null`. */
63
+ function uhr(iso) {
64
+ const t = zeit(iso);
65
+ return t === null ? null : t.slice(11);
66
+ }
62
67
  /** Je Schein und Muenze eine eingerueckte Zeile, vom groessten Wert abwaerts; Anzahl 0 faellt weg. */
63
68
  function stueckelungZeilen(karte) {
64
69
  if (karte === null)
@@ -128,10 +133,17 @@ export function shiftReceiptLayout(receipt, options = {}) {
128
133
  else if (bon.openingFloatTakenOver)
129
134
  zeilen.push(text(start));
130
135
  zeilen.push(...stueckelungZeilen(bon.openingDenominations));
136
+ // Nur wenn der Server den Anfang ausdruecklich als nicht gezaehlt meldet; ohne das Feld bleibt der Bon wie bisher.
137
+ if (bon.openingCounted === false)
138
+ zeilen.push(text(labelText('shift_receipt.opening_not_counted')));
131
139
  if (bon.cashSalesCents !== null)
132
140
  zeilen.push(betrag(labelText('shift_receipt.cash_sales'), bon.cashSalesCents));
133
141
  if (bon.cashCancellationsCents !== null)
134
142
  zeilen.push(betrag(labelText('shift_receipt.cash_cancellations'), bon.cashCancellationsCents));
143
+ // Summe der Zwischenzaehlungs-Differenzen: damit Start + Bar + Bewegungen + diese = Soll aufgeht.
144
+ if (bon.interimDifferenceCents !== undefined && bon.interimDifferenceCents !== 0) {
145
+ zeilen.push(betrag(labelText('shift_receipt.interim_count'), bon.interimDifferenceCents));
146
+ }
135
147
  if (bon.movements.length > 0) {
136
148
  zeilen.push(text(labelText('shift_receipt.movements'), 'left', true));
137
149
  for (const m of bon.movements) {
@@ -142,12 +154,29 @@ export function shiftReceiptLayout(receipt, options = {}) {
142
154
  }
143
155
  if (bon.expectedCents !== null)
144
156
  zeilen.push(betrag(labelText('shift_receipt.expected'), bon.expectedCents));
157
+ // Mit `countedBeforePayout` geschlossen: erst der Rohwert der Zaehlung („Gezaehlt“, mit Stueckelung), dann das Ist nach der Auszahlung.
158
+ if (bon.countedBeforePayoutCents !== undefined && bon.countedBeforePayoutCents !== null) {
159
+ zeilen.push(betrag(labelText('shift_receipt.counted_before_payout'), bon.countedBeforePayoutCents));
160
+ zeilen.push(...stueckelungZeilen(bon.countedBeforePayoutDenominations ?? null));
161
+ }
145
162
  if (bon.countedCents !== null) {
146
163
  zeilen.push(betrag(labelText('shift_receipt.counted'), bon.countedCents));
147
164
  zeilen.push(...stueckelungZeilen(bon.countedDenominations));
148
165
  }
149
166
  if (bon.differenceCents !== null)
150
167
  zeilen.push(betrag(labelText('shift_receipt.difference'), bon.differenceCents));
168
+ // Die Gesamtdifferenz in Teilen: je Zwischenzaehlung (mit Uhrzeit) und der Abschluss; eine Zwischenzaehlung ohne Differenz faellt weg.
169
+ for (const t of bon.differenceParts ?? []) {
170
+ if (t.type === 'interim' && t.cents === 0)
171
+ continue;
172
+ if (t.type === 'interim') {
173
+ const um = uhr(t.at);
174
+ zeilen.push(betrag(`${labelText('shift_receipt.difference_part_interim')}${um === null ? '' : ` ${um}`}`, t.cents));
175
+ }
176
+ else if (t.type === 'closing') {
177
+ zeilen.push(betrag(labelText('shift_receipt.difference_part_closing'), t.cents));
178
+ }
179
+ }
151
180
  if (bon.comment)
152
181
  zeilen.push(text(`${labelText('shift_receipt.comment')}: ${bon.comment}`));
153
182
  zeilen.push(...nachZaehlungZeilen(bon));
@@ -1,4 +1,4 @@
1
- import { POS_BUSINESS_DEFAULTS, POS_BUSINESS_VALUES, POS_DEVICE_DEFAULTS, POS_DEVICE_OPTIONAL_FIELDS, POS_DEVICE_VALUES, POS_SHORTCUT_DEFAULTS, POS_SHORTCUT_SHARED_PAIRS, POS_BUSINESS_OPTIONAL_FIELDS, _optionalerWert, } from '../pos/settings.js';
1
+ import { POS_BUSINESS_DEFAULTS, POS_BUSINESS_VALUES, POS_DEVICE_DEFAULTS, POS_DEVICE_OPTIONAL_FIELDS, POS_DEVICE_VALUES, POS_SHORTCUT_DEFAULTS, POS_SHORTCUT_SHARED_PAIRS, POS_BUSINESS_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_CHOICES, POS_DEVICE_OPTIONAL_CHOICES, _optionalerWert, } from '../pos/settings.js';
2
2
  import { hat, innereNamen, istObjekt, regel } from './draht.js';
3
3
  import { katalogVon } from './draht.js';
4
4
  import { SCHEMAS } from './vokabular.js';
@@ -55,6 +55,13 @@ const GERAET_OPTIONAL = Object.fromEntries(POS_DEVICE_OPTIONAL_FIELDS.map((feld)
55
55
  * gespeichert sind; sonst fehlen sie still.
56
56
  */
57
57
  const BETRIEB_OPTIONAL = Object.fromEntries(POS_BUSINESS_OPTIONAL_FIELDS.map((feld) => [feld, (v) => typeof v === 'boolean']));
58
+ /**
59
+ * Optionale Wahlfelder (Zwilling von `BETRIEB_OPTIONAL.tgArten/tgStart` und `GERAET_OPTIONAL.korbBreite`):
60
+ * gespeichert in der inneren Form (`['prozent', 'aufrunden']`, `'schmal'`), nur gueltige Werte gehen
61
+ * hinaus, uebersetzt durch den Katalog. `tipKinds` ist eine nichtleere Teilmenge ohne Dubletten
62
+ * (`tgArtenListe`). Ob der Start unter den Arten liegt, rechnet der Leser ([posTipStart]).
63
+ */
64
+ const WAHLFELDER = { business: POS_BUSINESS_OPTIONAL_CHOICES, device: POS_DEVICE_OPTIONAL_CHOICES };
58
65
  /** Aufzaehlungen (aussen, englisch) je Teil. */
59
66
  const AUFZAEHLUNGEN = {
60
67
  business: POS_BUSINESS_VALUES, device: POS_DEVICE_VALUES,
@@ -71,7 +78,8 @@ function teilSchema(teil) {
71
78
  return regel(SCHEMAS.getKasseSettings.data[teil]).unter;
72
79
  }
73
80
  function katalogFuer(teil, aussen) {
74
- const verweis = SCHEMAS.getKasseSettings.werte[`${teil}.${aussen}`];
81
+ const werte = SCHEMAS.getKasseSettings.werte;
82
+ const verweis = werte[`${teil}.${aussen}`] ?? werte[`${teil}.${aussen}[]`];
75
83
  return verweis ? katalogVon(verweis) ?? null : null;
76
84
  }
77
85
  /** Tasten: aeussere und innere Aktionsnamen, Vorgabe und Paare in innerer Form. */
@@ -138,6 +146,22 @@ function teilNachAussen(teil, gespeichert, weg) {
138
146
  if (aussen === undefined || w === undefined)
139
147
  continue;
140
148
  const pfad = `${teil}.${aussen}`;
149
+ if (hat(WAHLFELDER, teil) && WAHLFELDER[teil].includes(aussen)) {
150
+ const katalog = katalogFuer(teil, aussen);
151
+ const einzeln = (e) => (typeof e === 'string' && katalog !== null && hat(katalog, e) ? katalog[e] : undefined);
152
+ if (aussen === 'tipKinds') {
153
+ const arten = Array.isArray(w) && w.length > 0 && w.length <= (katalog ? Object.keys(katalog).length : 0) && new Set(w).size === w.length
154
+ ? w.map(einzeln) : null;
155
+ if (arten !== null && arten.every((a) => a !== undefined))
156
+ raus[aussen] = arten;
157
+ }
158
+ else {
159
+ const wert = einzeln(w);
160
+ if (wert !== undefined)
161
+ raus[aussen] = wert;
162
+ }
163
+ continue;
164
+ }
141
165
  if (teil === 'device' && hat(GERAET_OPTIONAL, aussen)) {
142
166
  if (GERAET_OPTIONAL[aussen](w))
143
167
  raus[aussen] = w;
@@ -214,7 +238,10 @@ export function _storedPosSettingsToWire(stored) {
214
238
  }
215
239
  /** Nur fuer den Test: die Feldliste der Pruefer (muss mit der Vorgabe deckungsgleich sein). */
216
240
  export const _PRUEFER_FELDER = Object.freeze({
217
- business: [...Object.keys(PRUEFER.business), ...Object.keys(POS_BUSINESS_VALUES), ...Object.keys(BETRIEB_OPTIONAL), ...Object.keys(KARTEN)],
218
- device: [...Object.keys(PRUEFER.device), ...Object.keys(POS_DEVICE_VALUES), ...Object.keys(GERAET_OPTIONAL), 'shortcuts'],
219
- standard: { business: [...Object.keys(POS_BUSINESS_DEFAULTS), ...POS_BUSINESS_OPTIONAL_FIELDS], device: [...Object.keys(POS_DEVICE_DEFAULTS), ...POS_DEVICE_OPTIONAL_FIELDS] },
241
+ business: [...new Set([...Object.keys(PRUEFER.business), ...Object.keys(POS_BUSINESS_VALUES), ...Object.keys(BETRIEB_OPTIONAL), ...Object.keys(KARTEN)])],
242
+ device: [...new Set([...Object.keys(PRUEFER.device), ...Object.keys(POS_DEVICE_VALUES), ...Object.keys(GERAET_OPTIONAL), 'shortcuts'])],
243
+ standard: {
244
+ business: [...Object.keys(POS_BUSINESS_DEFAULTS), ...POS_BUSINESS_OPTIONAL_FIELDS, ...POS_BUSINESS_OPTIONAL_CHOICES],
245
+ device: [...Object.keys(POS_DEVICE_DEFAULTS), ...POS_DEVICE_OPTIONAL_FIELDS, ...POS_DEVICE_OPTIONAL_CHOICES],
246
+ },
220
247
  });
@@ -1,5 +1,5 @@
1
1
  /** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
2
- export declare const VOKABULAR_QUELLE = "842340e1f94c14fab01ffe96277d76dff4482b97df2e355daa583ff49c2db634";
2
+ export declare const VOKABULAR_QUELLE = "c137b0f64dd1a06c8cddd9d9164bd2360ecbc3133cc04ca2b82d0e37f9d4fe5d";
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 = "842340e1f94c14fab01ffe96277d76dff4482b97df2e355daa583ff49c2db634";
4
+ export const VOKABULAR_QUELLE = "c137b0f64dd1a06c8cddd9d9164bd2360ecbc3133cc04ca2b82d0e37f9d4fe5d";
5
5
  /** Schema je Endpunkt (aussen -> innen) und Wertverweise auf die Kataloge. */
6
6
  export const SCHEMAS = {
7
7
  "getReceipt": {
@@ -150,6 +150,8 @@ export const SCHEMAS = {
150
150
  "tipChips": "tgChips",
151
151
  "exactCash": "schnellbar",
152
152
  "tipKeptByDefault": "tgDirekt",
153
+ "tipKinds": "tgArten",
154
+ "tipStart": "tgStart",
153
155
  "checkoutMode": "kassierenModus",
154
156
  "receiptOutput": "belegAusgabe",
155
157
  "doneScreenSeconds": "fertigSekunden",
@@ -214,7 +216,8 @@ export const SCHEMAS = {
214
216
  "terminalTid": "terminalTid",
215
217
  "terminalVia": "terminalVia",
216
218
  "terminalType": "terminalArt",
217
- "shortcutHints": "tastenMarken"
219
+ "shortcutHints": "tastenMarken",
220
+ "cartWidth": "korbBreite"
218
221
  },
219
222
  "vouchers": {
220
223
  "__": "gutscheine",
@@ -319,6 +322,12 @@ export const SCHEMAS = {
319
322
  "business.tipMode": {
320
323
  "$catalog": "KASSE_BETRIEB_WERTE.tipMode"
321
324
  },
325
+ "business.tipKinds[]": {
326
+ "$catalog": "KASSE_BETRIEB_WERTE.tipKinds[]"
327
+ },
328
+ "business.tipStart": {
329
+ "$catalog": "KASSE_BETRIEB_WERTE.tipStart"
330
+ },
322
331
  "business.checkoutMode": {
323
332
  "$catalog": "KASSE_BETRIEB_WERTE.checkoutMode"
324
333
  },
@@ -346,6 +355,9 @@ export const SCHEMAS = {
346
355
  "device.terminalType": {
347
356
  "$catalog": "KASSE_GERAET_WERTE.terminalType"
348
357
  },
358
+ "device.cartWidth": {
359
+ "$catalog": "KASSE_GERAET_WERTE.cartWidth"
360
+ },
349
361
  "vouchers.valueVoucherType": {
350
362
  "mehrzweck": "multi_purpose",
351
363
  "einzweck": "single_purpose"
@@ -654,11 +666,21 @@ export const KATALOGE = {
654
666
  "streifen": "stripe",
655
667
  "voll": "full"
656
668
  },
669
+ "KASSE_BETRIEB_WERTE.tipKinds[]": {
670
+ "prozent": "percent",
671
+ "aufrunden": "round_up",
672
+ "gesamt": "total"
673
+ },
657
674
  "KASSE_BETRIEB_WERTE.tipMode": {
658
675
  "betrag": "amount",
659
676
  "gesamt": "total",
660
677
  "beides": "both"
661
678
  },
679
+ "KASSE_BETRIEB_WERTE.tipStart": {
680
+ "prozent": "percent",
681
+ "aufrunden": "round_up",
682
+ "gesamt": "total"
683
+ },
662
684
  "KASSE_BETRIEB_WERTE.watermark": {
663
685
  "aus": "off",
664
686
  "anmeldung": "login",
@@ -669,6 +691,11 @@ export const KATALOGE = {
669
691
  "mitte": "center",
670
692
  "rechts": "right"
671
693
  },
694
+ "KASSE_GERAET_WERTE.cartWidth": {
695
+ "schmal": "narrow",
696
+ "mittel": "medium",
697
+ "breit": "wide"
698
+ },
672
699
  "KASSE_GERAET_WERTE.categoryPosition": {
673
700
  "oben": "top",
674
701
  "links": "left"
@@ -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.27.0";
7
+ export declare const PACKAGE_VERSION = "1.29.0";