@kreiseck/kasseneck-api 1.2.1 → 1.3.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 (226) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +7 -2
  3. package/dist/cjs/client/status.d.ts +1 -1
  4. package/dist/cjs/client/status.js +1 -1
  5. package/dist/cjs/pos/artikel.d.ts +20 -0
  6. package/dist/cjs/pos/artikel.js +8 -0
  7. package/dist/cjs/pos/index.d.ts +1 -1
  8. package/dist/cjs/pos/index.js +2 -1
  9. package/dist/cjs/pos/texte.d.ts +41 -0
  10. package/dist/cjs/pos/texte.js +29 -1
  11. package/dist/cjs/version.d.ts +1 -1
  12. package/dist/cjs/version.js +1 -1
  13. package/dist/esm/client/status.d.ts +1 -1
  14. package/dist/esm/client/status.js +1 -1
  15. package/dist/esm/pos/artikel.d.ts +20 -0
  16. package/dist/esm/pos/artikel.js +8 -0
  17. package/dist/esm/pos/index.d.ts +1 -1
  18. package/dist/esm/pos/index.js +1 -1
  19. package/dist/esm/pos/texte.d.ts +41 -0
  20. package/dist/esm/pos/texte.js +28 -0
  21. package/dist/esm/version.d.ts +1 -1
  22. package/dist/esm/version.js +1 -1
  23. package/fixtures/code-table-receipts.json +2 -2
  24. package/fixtures/expected/cancellation-discount.lines.json +1 -1
  25. package/fixtures/expected/cancellation-discount.sheet32.json +1 -1
  26. package/fixtures/expected/cancellation-discount.sheet48.json +1 -1
  27. package/fixtures/expected/cancellation-full.lines.json +1 -1
  28. package/fixtures/expected/cancellation-full.sheet32.json +1 -1
  29. package/fixtures/expected/cancellation-full.sheet48.json +1 -1
  30. package/fixtures/expected/cancellation-partial.lines.json +1 -1
  31. package/fixtures/expected/cancellation-partial.sheet32.json +1 -1
  32. package/fixtures/expected/cancellation-partial.sheet48.json +1 -1
  33. package/fixtures/expected/cancellation-split-full.lines.json +1 -1
  34. package/fixtures/expected/cancellation-split-full.sheet32.json +1 -1
  35. package/fixtures/expected/cancellation-split-full.sheet48.json +1 -1
  36. package/fixtures/expected/cancellation-split-partial.lines.json +1 -1
  37. package/fixtures/expected/cancellation-split-partial.sheet32.json +1 -1
  38. package/fixtures/expected/cancellation-split-partial.sheet48.json +1 -1
  39. package/fixtures/expected/card-custom.lines.json +1 -1
  40. package/fixtures/expected/card-custom.sheet32.json +1 -1
  41. package/fixtures/expected/card-custom.sheet48.json +1 -1
  42. package/fixtures/expected/card-gptom-ios.lines.json +1 -1
  43. package/fixtures/expected/card-gptom-ios.sheet32.json +1 -1
  44. package/fixtures/expected/card-gptom-ios.sheet48.json +1 -1
  45. package/fixtures/expected/card-gptom.lines.json +1 -1
  46. package/fixtures/expected/card-gptom.sheet32.json +1 -1
  47. package/fixtures/expected/card-gptom.sheet48.json +1 -1
  48. package/fixtures/expected/card-hobex-cloud.lines.json +1 -1
  49. package/fixtures/expected/card-hobex-cloud.sheet32.json +1 -1
  50. package/fixtures/expected/card-hobex-cloud.sheet48.json +1 -1
  51. package/fixtures/expected/card-hobex-hps.lines.json +1 -1
  52. package/fixtures/expected/card-hobex-hps.sheet32.json +1 -1
  53. package/fixtures/expected/card-hobex-hps.sheet48.json +1 -1
  54. package/fixtures/expected/card-mypos.lines.json +1 -1
  55. package/fixtures/expected/card-mypos.sheet32.json +1 -1
  56. package/fixtures/expected/card-mypos.sheet48.json +1 -1
  57. package/fixtures/expected/card-stripe-eps.lines.json +1 -1
  58. package/fixtures/expected/card-stripe-eps.sheet32.json +1 -1
  59. package/fixtures/expected/card-stripe-eps.sheet48.json +1 -1
  60. package/fixtures/expected/card-stripe.lines.json +1 -1
  61. package/fixtures/expected/card-stripe.sheet32.json +1 -1
  62. package/fixtures/expected/card-stripe.sheet48.json +1 -1
  63. package/fixtures/expected/card-sumup.lines.json +1 -1
  64. package/fixtures/expected/card-sumup.sheet32.json +1 -1
  65. package/fixtures/expected/card-sumup.sheet48.json +1 -1
  66. package/fixtures/expected/code-table-receipt.long-item-name.iso8859_15.hex +1 -1
  67. package/fixtures/expected/code-table-receipt.long-item-name.pc437.hex +1 -1
  68. package/fixtures/expected/code-table-receipt.long-item-name.pc850.hex +1 -1
  69. package/fixtures/expected/code-table-receipt.long-item-name.pc858.hex +1 -1
  70. package/fixtures/expected/code-table-receipt.long-item-name.replacement.hex +2 -2
  71. package/fixtures/expected/code-table-receipt.long-item-name.wpc1252.hex +1 -1
  72. package/fixtures/expected/code-table-receipt.sale-cash.iso8859_15.hex +1 -1
  73. package/fixtures/expected/code-table-receipt.sale-cash.pc437.hex +1 -1
  74. package/fixtures/expected/code-table-receipt.sale-cash.pc850.hex +1 -1
  75. package/fixtures/expected/code-table-receipt.sale-cash.pc858.hex +1 -1
  76. package/fixtures/expected/code-table-receipt.sale-cash.replacement.hex +1 -1
  77. package/fixtures/expected/code-table-receipt.sale-cash.wpc1252.hex +1 -1
  78. package/fixtures/expected/code-table-receipt.special-characters.iso8859_15.hex +1 -1
  79. package/fixtures/expected/code-table-receipt.special-characters.pc437.hex +1 -1
  80. package/fixtures/expected/code-table-receipt.special-characters.pc850.hex +1 -1
  81. package/fixtures/expected/code-table-receipt.special-characters.pc858.hex +1 -1
  82. package/fixtures/expected/code-table-receipt.special-characters.replacement.hex +1 -1
  83. package/fixtures/expected/code-table-receipt.special-characters.wpc1252.hex +1 -1
  84. package/fixtures/expected/code-table-receipt.test-cashregister-sale.iso8859_15.hex +2 -2
  85. package/fixtures/expected/code-table-receipt.test-cashregister-sale.pc437.hex +2 -2
  86. package/fixtures/expected/code-table-receipt.test-cashregister-sale.pc850.hex +2 -2
  87. package/fixtures/expected/code-table-receipt.test-cashregister-sale.pc858.hex +2 -2
  88. package/fixtures/expected/code-table-receipt.test-cashregister-sale.replacement.hex +1 -1
  89. package/fixtures/expected/code-table-receipt.test-cashregister-sale.wpc1252.hex +2 -2
  90. package/fixtures/expected/discount-lines.lines.json +1 -1
  91. package/fixtures/expected/discount-lines.sheet32.json +1 -1
  92. package/fixtures/expected/discount-lines.sheet48.json +1 -1
  93. package/fixtures/expected/discount-owner-tip.lines.json +1 -1
  94. package/fixtures/expected/discount-owner-tip.sheet32.json +1 -1
  95. package/fixtures/expected/discount-owner-tip.sheet48.json +1 -1
  96. package/fixtures/expected/discount-simple.lines.json +1 -1
  97. package/fixtures/expected/discount-simple.sheet32.json +1 -1
  98. package/fixtures/expected/discount-simple.sheet48.json +1 -1
  99. package/fixtures/expected/discount-tip.lines.json +1 -1
  100. package/fixtures/expected/discount-tip.sheet32.json +1 -1
  101. package/fixtures/expected/discount-tip.sheet48.json +1 -1
  102. package/fixtures/expected/discount-value-voucher.lines.json +1 -1
  103. package/fixtures/expected/discount-value-voucher.sheet32.json +1 -1
  104. package/fixtures/expected/discount-value-voucher.sheet48.json +1 -1
  105. package/fixtures/expected/long-item-name.lines.json +1 -1
  106. package/fixtures/expected/long-item-name.sheet32.json +1 -1
  107. package/fixtures/expected/long-item-name.sheet48.json +1 -1
  108. package/fixtures/expected/sale-card.lines.json +1 -1
  109. package/fixtures/expected/sale-card.sheet32.json +1 -1
  110. package/fixtures/expected/sale-card.sheet48.json +1 -1
  111. package/fixtures/expected/sale-cash.lines.json +1 -1
  112. package/fixtures/expected/sale-cash.sheet32.json +1 -1
  113. package/fixtures/expected/sale-cash.sheet48.json +1 -1
  114. package/fixtures/expected/sale-small-business.lines.json +1 -1
  115. package/fixtures/expected/sale-small-business.sheet32.json +1 -1
  116. package/fixtures/expected/sale-small-business.sheet48.json +1 -1
  117. package/fixtures/expected/signature-outage-sale.lines.json +1 -1
  118. package/fixtures/expected/signature-outage-sale.sheet32.json +1 -1
  119. package/fixtures/expected/signature-outage-sale.sheet48.json +1 -1
  120. package/fixtures/expected/split-card-card-cash.lines.json +1 -1
  121. package/fixtures/expected/split-card-card-cash.sheet32.json +1 -1
  122. package/fixtures/expected/split-card-card-cash.sheet48.json +1 -1
  123. package/fixtures/expected/split-cash-change.lines.json +1 -1
  124. package/fixtures/expected/split-cash-change.sheet32.json +1 -1
  125. package/fixtures/expected/split-cash-change.sheet48.json +1 -1
  126. package/fixtures/expected/split-long-amount.lines.json +1 -1
  127. package/fixtures/expected/split-long-amount.sheet32.json +1 -1
  128. package/fixtures/expected/split-long-amount.sheet48.json +1 -1
  129. package/fixtures/expected/split-one-card-tip.lines.json +1 -1
  130. package/fixtures/expected/split-one-card-tip.sheet32.json +1 -1
  131. package/fixtures/expected/split-one-card-tip.sheet48.json +1 -1
  132. package/fixtures/expected/split-table-round-tip.lines.json +1 -1
  133. package/fixtures/expected/split-table-round-tip.sheet32.json +1 -1
  134. package/fixtures/expected/split-table-round-tip.sheet48.json +1 -1
  135. package/fixtures/expected/split-tip-card.lines.json +1 -1
  136. package/fixtures/expected/split-tip-card.sheet32.json +1 -1
  137. package/fixtures/expected/split-tip-card.sheet48.json +1 -1
  138. package/fixtures/expected/split-two-cards-same-provider.lines.json +1 -1
  139. package/fixtures/expected/split-two-cards-same-provider.sheet32.json +1 -1
  140. package/fixtures/expected/split-two-cards-same-provider.sheet48.json +1 -1
  141. package/fixtures/expected/test-cashregister-sale.lines.json +1 -1
  142. package/fixtures/expected/test-cashregister-sale.sheet32.json +1 -1
  143. package/fixtures/expected/test-cashregister-sale.sheet48.json +1 -1
  144. package/fixtures/expected/test-signature-sale.lines.json +1 -1
  145. package/fixtures/expected/test-signature-sale.sheet32.json +1 -1
  146. package/fixtures/expected/test-signature-sale.sheet48.json +1 -1
  147. package/fixtures/expected/training.lines.json +1 -1
  148. package/fixtures/expected/training.sheet32.json +1 -1
  149. package/fixtures/expected/training.sheet48.json +1 -1
  150. package/fixtures/expected/zero-annual.grid32.txt +1 -1
  151. package/fixtures/expected/zero-annual.grid48.txt +1 -1
  152. package/fixtures/expected/zero-annual.lines.json +2 -2
  153. package/fixtures/expected/zero-annual.sheet32.json +2 -2
  154. package/fixtures/expected/zero-annual.sheet48.json +2 -2
  155. package/fixtures/expected/zero-final.grid32.txt +1 -1
  156. package/fixtures/expected/zero-final.grid48.txt +1 -1
  157. package/fixtures/expected/zero-final.lines.json +2 -2
  158. package/fixtures/expected/zero-final.sheet32.json +2 -2
  159. package/fixtures/expected/zero-final.sheet48.json +2 -2
  160. package/fixtures/expected/zero-manual.grid32.txt +1 -1
  161. package/fixtures/expected/zero-manual.grid48.txt +1 -1
  162. package/fixtures/expected/zero-manual.lines.json +2 -2
  163. package/fixtures/expected/zero-manual.sheet32.json +2 -2
  164. package/fixtures/expected/zero-manual.sheet48.json +2 -2
  165. package/fixtures/expected/zero-monthly.grid32.txt +1 -1
  166. package/fixtures/expected/zero-monthly.grid48.txt +1 -1
  167. package/fixtures/expected/zero-monthly.lines.json +2 -2
  168. package/fixtures/expected/zero-monthly.sheet32.json +2 -2
  169. package/fixtures/expected/zero-monthly.sheet48.json +2 -2
  170. package/fixtures/expected/zero-outage-end.grid32.txt +1 -1
  171. package/fixtures/expected/zero-outage-end.grid48.txt +1 -1
  172. package/fixtures/expected/zero-outage-end.lines.json +2 -2
  173. package/fixtures/expected/zero-outage-end.sheet32.json +2 -2
  174. package/fixtures/expected/zero-outage-end.sheet48.json +2 -2
  175. package/fixtures/expected/zero-start.grid32.txt +1 -1
  176. package/fixtures/expected/zero-start.grid48.txt +1 -1
  177. package/fixtures/expected/zero-start.lines.json +2 -2
  178. package/fixtures/expected/zero-start.sheet32.json +2 -2
  179. package/fixtures/expected/zero-start.sheet48.json +2 -2
  180. package/fixtures/hobex-hps-codes.json +1 -1
  181. package/fixtures/invoice-api.schema.json +1 -1
  182. package/fixtures/invoice-texts.json +1 -1
  183. package/fixtures/manifest.json +172 -172
  184. package/fixtures/pos-texts.json +36 -1
  185. package/fixtures/receipts/cancellation-discount.json +2 -2
  186. package/fixtures/receipts/cancellation-full.json +2 -2
  187. package/fixtures/receipts/cancellation-partial.json +2 -2
  188. package/fixtures/receipts/cancellation-split-full.json +2 -2
  189. package/fixtures/receipts/cancellation-split-partial.json +2 -2
  190. package/fixtures/receipts/card-custom.json +2 -2
  191. package/fixtures/receipts/card-gptom-ios.json +2 -2
  192. package/fixtures/receipts/card-gptom.json +2 -2
  193. package/fixtures/receipts/card-hobex-cloud.json +2 -2
  194. package/fixtures/receipts/card-hobex-hps.json +2 -2
  195. package/fixtures/receipts/card-mypos.json +2 -2
  196. package/fixtures/receipts/card-stripe-eps.json +2 -2
  197. package/fixtures/receipts/card-stripe.json +2 -2
  198. package/fixtures/receipts/card-sumup.json +2 -2
  199. package/fixtures/receipts/discount-lines.json +2 -2
  200. package/fixtures/receipts/discount-owner-tip.json +2 -2
  201. package/fixtures/receipts/discount-simple.json +2 -2
  202. package/fixtures/receipts/discount-tip.json +2 -2
  203. package/fixtures/receipts/discount-value-voucher.json +2 -2
  204. package/fixtures/receipts/long-item-name.json +2 -2
  205. package/fixtures/receipts/sale-card.json +2 -2
  206. package/fixtures/receipts/sale-cash.json +2 -2
  207. package/fixtures/receipts/sale-small-business.json +2 -2
  208. package/fixtures/receipts/signature-outage-sale.json +2 -2
  209. package/fixtures/receipts/split-card-card-cash.json +2 -2
  210. package/fixtures/receipts/split-cash-change.json +2 -2
  211. package/fixtures/receipts/split-long-amount.json +2 -2
  212. package/fixtures/receipts/split-one-card-tip.json +2 -2
  213. package/fixtures/receipts/split-table-round-tip.json +2 -2
  214. package/fixtures/receipts/split-tip-card.json +2 -2
  215. package/fixtures/receipts/split-two-cards-same-provider.json +2 -2
  216. package/fixtures/receipts/test-cashregister-sale.json +2 -2
  217. package/fixtures/receipts/test-signature-sale.json +2 -2
  218. package/fixtures/receipts/training.json +2 -2
  219. package/fixtures/receipts/zero-annual.json +2 -2
  220. package/fixtures/receipts/zero-final.json +2 -2
  221. package/fixtures/receipts/zero-manual.json +2 -2
  222. package/fixtures/receipts/zero-monthly.json +2 -2
  223. package/fixtures/receipts/zero-outage-end.json +2 -2
  224. package/fixtures/receipts/zero-start.json +2 -2
  225. package/fixtures/surface.json +1 -1
  226. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,45 @@ Was vor 0.7.0 geschah, steht in der Commit-Historie (`git log`); ab hier wird
4
4
  es hier geführt. Ein Eintrag nennt die Änderung **und ihren Grund** —
5
5
  nur der Grund überlebt den nächsten Umbau.
6
6
 
7
+ ## 1.3.0
8
+
9
+ Article codes on `PosArticle` and the stock words of the register in the
10
+ shared catalogue. Reason: the backend already sends `number`, `ean`,
11
+ `internalCode` and `stockTracked` per article in `listMyArticles` under
12
+ `/api/v3`, but the package dropped them, so the browser register could not
13
+ search by scanned code nor tell a stock-tracked article without guessing. The
14
+ stock labels lived locally in the browser register; the browser register and
15
+ the register app have to use the same words.
16
+
17
+ Additive, no breaking change; requests send the same bytes as in 1.2.2.
18
+
19
+ - **`PosArticle`** gains `number`, `ean`, `internalCode` (`string | null`) and
20
+ `stockTracked` (`boolean | null`). Optional on the type like
21
+ `stockLocationIds`, so existing object literals keep compiling; the reader
22
+ `fromPosArticlePayload` always sets them. Texts pass through unchanged
23
+ (leading zeros, case, spaces); an empty or whitespace-only text and a
24
+ value of the wrong type become `null`. `stockTracked: null` means the
25
+ response carries no statement (older backends), not `false`. `./stored`
26
+ (`fromStoredArticle`) returns the same fields.
27
+ - **Labels** (`LABELS`, `labelText`): `stock.all_articles`, `stock.location`,
28
+ `stock.default_location`, `stock.resolved`, `stock.where_to`,
29
+ `stock.available`, `stock.return_restock`, `stock.return_defective`,
30
+ `stock.return_disposed`. New `RETURN_DISPOSITION_LABELS` (`./pos`) maps each
31
+ `ReturnDisposition` to its label key.
32
+ - **Message** (`MESSAGES`, `messageText`): `cancellation.input_rejected`, for
33
+ a cancellation whose reason, note or lines the server rejected.
34
+ - **`fixtures/pos-texts.json`**: the new keys and a new top-level key
35
+ `returnDispositionLabels` after `labels`. `surface.json` and the other
36
+ contract files change only in their version.
37
+
38
+ ## 1.2.2
39
+
40
+ The receipt fixtures, goldens and tests carried the serial number of a real
41
+ signature card (signature card line, machine-readable code). It is replaced by
42
+ the made-up `5A1C3E07` (same length); the dependent ESC/POS hex goldens are
43
+ regenerated. Reason: fixtures only carry made-up identifiers; backend and web
44
+ use the same replacement. No code change. Same change as 0.32.2 on the legacy line.
45
+
7
46
  ## 1.2.1
8
47
 
9
48
  En dash instead of em dash in the visible texts of the invoice catalog
package/README.md CHANGED
@@ -823,7 +823,9 @@ sending a German value.
823
823
 
824
824
  The rest of `…/pos`: `listMyArticles` and `listMyArticleGroups` for the tiles
825
825
  (`visible`, `quantityRule: 'piece' | 'decimal'`, `askQuantity`,
826
- `maxQuantity`), `listMyPrinters`, `createPrintJob` and `getPrintJob` for
826
+ `maxQuantity`; for scanner search `number`, `ean` and `internalCode`, passed
827
+ through unchanged and `null` when empty; `stockTracked`, `null` when the
828
+ response says nothing), `listMyPrinters`, `createPrintJob` and `getPrintJob` for
827
829
  network printers (poll until `isPrintJobFinished(job)`; an unknown state is
828
830
  `'unknown'` and ends the polling), `listMyTipRecipients`, `setMyPosLogo`, and
829
831
  the register's text catalogue (`MESSAGES`, `LABELS`, `messageText`,
@@ -855,7 +857,10 @@ names none), registers `stockLocationId` (absent for the default location;
855
857
  only the result of `setMyCashregisterStockLocation` uses `null` for it), and
856
858
  `listRegisterUsersForDevice` returns `cashregister.stockLocationId`;
857
859
  errors such as `location_not_found` and `location_inactive` are in
858
- `POS_ERROR_CODES`.
860
+ `POS_ERROR_CODES`. The register's stock words are in the catalogue as
861
+ `stock.*` labels (`labelText('stock.where_to')`), and
862
+ `RETURN_DISPOSITION_LABELS` gives the label of each return choice
863
+ (`labelText(RETURN_DISPOSITION_LABELS.restock)` is "Zurück ins Lager").
859
864
 
860
865
  `stockViewOf(perms)` (also exported from the package root) tells whether a
861
866
  register user may see locations and quantities: a missing `stockView` counts
@@ -34,7 +34,7 @@ export type SignatureStatus = CashboxStatus | 'NOT_REGISTERED';
34
34
  export declare function getCashboxStatus(transport: InternerTransport): Promise<CashboxStatus>;
35
35
  /**
36
36
  * Status der Signatureinheit mit der Zertifikatsseriennummer [certificateSerialHex]
37
- * (hexadezimal, z. B. `6F0404F0`).
37
+ * (hexadezimal, z. B. `5A1C3E07`).
38
38
  *
39
39
  * **Der Returncode wird vor dem Status gelesen** (wie im Dart-Vorbild): `B33`
40
40
  * heisst "nicht registriert" und schlaegt jedes Statusfeld, das daneben stehen
@@ -20,7 +20,7 @@ async function getCashboxStatus(transport) {
20
20
  }
21
21
  /**
22
22
  * Status der Signatureinheit mit der Zertifikatsseriennummer [certificateSerialHex]
23
- * (hexadezimal, z. B. `6F0404F0`).
23
+ * (hexadezimal, z. B. `5A1C3E07`).
24
24
  *
25
25
  * **Der Returncode wird vor dem Status gelesen** (wie im Dart-Vorbild): `B33`
26
26
  * heisst "nicht registriert" und schlaegt jedes Statusfeld, das daneben stehen
@@ -72,6 +72,22 @@ export interface PosArticle {
72
72
  * (`fromPosArticlePayload`) setzt das Feld immer (`null` oder Liste).
73
73
  */
74
74
  stockLocationIds?: string[] | null;
75
+ /**
76
+ * Artikelnummer des Betriebs; null = keine. Diese und die drei folgenden
77
+ * Felder (Scanner-Suche, Lager) sind optional wie `stockLocationIds`, der
78
+ * Leser setzt sie immer. Texte kommen unveraendert durch (fuehrende Nullen,
79
+ * Schreibweise); nur ein leerer Text (auch reiner Leerraum) wird `null`.
80
+ */
81
+ number?: string | null;
82
+ /** EAN/GTIN, wie gespeichert; null = keine. */
83
+ ean?: string | null;
84
+ /** Interner Code des Betriebs (eigener Barcode/QR); null = keiner. */
85
+ internalCode?: string | null;
86
+ /**
87
+ * Bestandsgefuehrt (Lager-Modul). `null`, wenn die Antwort keine Angabe
88
+ * traegt (aeltere Backends) -- dann nicht aus anderen Feldern ableiten.
89
+ */
90
+ stockTracked?: boolean | null;
75
91
  }
76
92
  /** Deckelt eine gewuenschte Menge an der Hoechstmenge des Artikels (null = keine Grenze). */
77
93
  export declare function allowedQuantity(a: Pick<PosArticle, 'maxQuantity'>, wanted: number): number;
@@ -93,6 +109,10 @@ export interface PosArticlePayload {
93
109
  askQuantity?: boolean | null;
94
110
  maxQuantity?: number | null;
95
111
  stockLocationIds?: string[] | null;
112
+ number?: string | null;
113
+ ean?: string | null;
114
+ internalCode?: string | null;
115
+ stockTracked?: boolean | null;
96
116
  }
97
117
  export declare function fromPosArticlePayload(p: PosArticlePayload): PosArticle;
98
118
  /**
@@ -56,6 +56,10 @@ function quantityDefaults(a) {
56
56
  function allowedQuantity(a, wanted) {
57
57
  return a.maxQuantity != null && a.maxQuantity > 0 ? Math.min(wanted, a.maxQuantity) : wanted;
58
58
  }
59
+ /** Ein Text mit Inhalt, unveraendert; leer, nur Leerraum oder kein Text -> null. */
60
+ function textOderNull(wert) {
61
+ return typeof wert === 'string' && wert.trim() !== '' ? wert : null;
62
+ }
59
63
  function fromPosArticlePayload(p) {
60
64
  return {
61
65
  id: p.id ?? '',
@@ -74,6 +78,10 @@ function fromPosArticlePayload(p) {
74
78
  stockLocationIds: Array.isArray(p.stockLocationIds)
75
79
  ? p.stockLocationIds.filter((s) => typeof s === 'string' && s !== '')
76
80
  : null,
81
+ number: textOderNull(p.number),
82
+ ean: textOderNull(p.ean),
83
+ internalCode: textOderNull(p.internalCode),
84
+ stockTracked: typeof p.stockTracked === 'boolean' ? p.stockTracked : null,
77
85
  };
78
86
  }
79
87
  /**
@@ -15,4 +15,4 @@ export { type NetworkPrinter, type PrintJob, type PrintJobStatus, PRINT_JOB_STAT
15
15
  export { listMyTipRecipients } from './trinkgeld.js';
16
16
  export { STOCK_LOCATION_TYPES, type StockLocationType, type StockLocation, type StockLocationAddress, type StockLevel, type StockValue, type StockList, type ListMyStockOptions, type SetMyCashregisterStockLocationOptions, type CashregisterStockLocation, listMyStockLocations, listMyStock, setMyCashregisterStockLocation, } from './lager.js';
17
17
  export { RETURN_DISPOSITIONS, isReturnDisposition, type ReturnDisposition } from '../models/cancellation.js';
18
- 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, LABELS, labelText, type TextEntry, type MessageKey, type ErrorKind, type ErrorRule, type ErrorRuleDetail, type Surface, type ReceiptEmailMessageCode, type CancellationPaymentMessageCode, type LabelKey, } from './texte.js';
18
+ 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, LABELS, labelText, RETURN_DISPOSITION_LABELS, type TextEntry, type MessageKey, type ErrorKind, type ErrorRule, type ErrorRuleDetail, type Surface, type ReceiptEmailMessageCode, type CancellationPaymentMessageCode, type LabelKey, } from './texte.js';
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getPosSettings = exports.allowedQuantity = exports.quantityDefaults = exports.quantityRuleForUnit = exports.QUANTITY_RULES = exports.listMyArticles = exports.listMyArticleGroups = exports.fromPosArticlePayload = exports.fromArticleGroupPayload = exports.DONE_SCREEN_SECONDS = exports.WATERMARK_SCALE = exports.LOGO_SCALE = exports.WATERMARK_STRENGTH = exports.WATERMARK_SIDE = exports.DISCOUNT = exports.AUTO_LOGOUT_MINUTES = exports.TILE_STYLE = exports.SETTINGS_FONT_SIZE = exports.LOGO_SIZE = exports.QR_MODE = exports.DRAWER_AUTO_OPEN = exports.CUT = exports.CODE_PAGE = exports.PAPER_SIZE = exports.TERMINAL_TYPE = exports.TERMINAL_VIA = exports.PRINTER_TYPE = exports.TILE_HEIGHT = exports.CATEGORY_POSITION = exports.LAYOUT = exports.RECEIPT_OUTPUT = exports.CARD_PROVIDER = exports.CHECKOUT_MODE = exports.TIP_MODE = exports.QUANTITY = exports.WATERMARK = exports.FONT_SIZE = exports.THEME = exports.posShortcutConflict = exports.POS_SHORTCUT_SHARED_PAIRS = exports.posSettingsChanges = exports.unknownPosSettingValues = exports.sanitizePosSettings = exports.mergePosSettings = exports.POS_DEVICE_VALUES = exports.POS_BUSINESS_VALUES = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.POS_SHORTCUT_DEFAULTS = exports.POS_SHORTCUT_ACTIONS = void 0;
4
- exports.labelText = exports.LABELS = exports.cancellationPaymentErrorMessage = exports.CANCELLATION_PAYMENT_ERROR_MESSAGES = exports.receiptEmailErrorMessage = exports.RECEIPT_EMAIL_ERROR_MESSAGES = exports.messageAppliesTo = exports.messageText = exports.messageOutcome = exports.findErrorRule = exports.CALLS_WITH_EFFECT = exports.ERROR_OUTCOME_RULES = exports.ERROR_CODE_RULES = exports.ERROR_RULES = exports.MESSAGES = exports.isReturnDisposition = exports.RETURN_DISPOSITIONS = exports.setMyCashregisterStockLocation = exports.listMyStock = exports.listMyStockLocations = exports.STOCK_LOCATION_TYPES = exports.listMyTipRecipients = exports.getPrintJob = exports.createPrintJob = exports.listMyPrinters = exports.isPrintJobFinished = exports.PRINT_JOB_SOURCES = exports.PRINT_JOB_STATUSES = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.posFieldErrors = exports.isPosError = exports.posErrorCode = exports.isPosErrorCode = exports.POS_ERROR_CODES = exports.posSettingsFromWire = exports.setMyPosLogo = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = void 0;
4
+ exports.RETURN_DISPOSITION_LABELS = exports.labelText = exports.LABELS = exports.cancellationPaymentErrorMessage = exports.CANCELLATION_PAYMENT_ERROR_MESSAGES = exports.receiptEmailErrorMessage = exports.RECEIPT_EMAIL_ERROR_MESSAGES = exports.messageAppliesTo = exports.messageText = exports.messageOutcome = exports.findErrorRule = exports.CALLS_WITH_EFFECT = exports.ERROR_OUTCOME_RULES = exports.ERROR_CODE_RULES = exports.ERROR_RULES = exports.MESSAGES = exports.isReturnDisposition = exports.RETURN_DISPOSITIONS = exports.setMyCashregisterStockLocation = exports.listMyStock = exports.listMyStockLocations = exports.STOCK_LOCATION_TYPES = exports.listMyTipRecipients = exports.getPrintJob = exports.createPrintJob = exports.listMyPrinters = exports.isPrintJobFinished = exports.PRINT_JOB_SOURCES = exports.PRINT_JOB_STATUSES = exports.stockViewOf = exports.receiptsScopeOf = exports.cancelScopeOf = exports.distributeDiscount = exports.posFieldErrors = exports.isPosError = exports.posErrorCode = exports.isPosErrorCode = exports.POS_ERROR_CODES = exports.posSettingsFromWire = exports.setMyPosLogo = exports.setMyRegisterDeviceSettings = exports.setMyPosSettings = void 0;
5
5
  /**
6
6
  * Kachel-Kasse: Einstellungen, Artikelgruppen/Artikel fuer Kacheln,
7
7
  * Rabattverteilung, Drucker, Trinkgeld-Empfaenger, Lager (Standorte, Bestand,
@@ -116,3 +116,4 @@ Object.defineProperty(exports, "CANCELLATION_PAYMENT_ERROR_MESSAGES", { enumerab
116
116
  Object.defineProperty(exports, "cancellationPaymentErrorMessage", { enumerable: true, get: function () { return texte_js_1.cancellationPaymentErrorMessage; } });
117
117
  Object.defineProperty(exports, "LABELS", { enumerable: true, get: function () { return texte_js_1.LABELS; } });
118
118
  Object.defineProperty(exports, "labelText", { enumerable: true, get: function () { return texte_js_1.labelText; } });
119
+ Object.defineProperty(exports, "RETURN_DISPOSITION_LABELS", { enumerable: true, get: function () { return texte_js_1.RETURN_DISPOSITION_LABELS; } });
@@ -300,6 +300,9 @@ declare const MELDUNGEN_ROH: {
300
300
  readonly 'cancellation.cards_not_checked': {
301
301
  readonly text: "Noch ist nicht jede Karte abgehakt – bitte jede am Terminal gutschreiben. Ist das schon geschehen, zum Schließen noch einmal drücken.";
302
302
  };
303
+ readonly 'cancellation.input_rejected': {
304
+ readonly text: "Die Eingabe wurde abgelehnt – bitte das Storno neu beginnen.";
305
+ };
303
306
  readonly 'split.setting_hint': {
304
307
  readonly text: "Ein Tisch zahlt in Teilen: jede Zahlung bar oder mit Karte, mit eigenem Trinkgeld – am Ende ein Beleg für alles.";
305
308
  };
@@ -1015,9 +1018,47 @@ declare const BESCHRIFTUNGEN_ROH: {
1015
1018
  readonly 'codetable.other_row': {
1016
1019
  readonly text: "Andere Zeile";
1017
1020
  };
1021
+ readonly 'stock.all_articles': {
1022
+ readonly text: "Alle Artikel";
1023
+ };
1024
+ readonly 'stock.location': {
1025
+ readonly text: "Lager-Standort";
1026
+ };
1027
+ readonly 'stock.default_location': {
1028
+ readonly text: "Standard-Standort";
1029
+ };
1030
+ readonly 'stock.resolved': {
1031
+ readonly text: "aufgelöst";
1032
+ };
1033
+ readonly 'stock.where_to': {
1034
+ readonly text: "Wohin mit der Ware?";
1035
+ };
1036
+ readonly 'stock.available': {
1037
+ readonly text: "verfügbar";
1038
+ };
1039
+ readonly 'stock.return_restock': {
1040
+ readonly text: "Zurück ins Lager";
1041
+ };
1042
+ readonly 'stock.return_defective': {
1043
+ readonly text: "Defekt";
1044
+ };
1045
+ readonly 'stock.return_disposed': {
1046
+ readonly text: "Entsorgt";
1047
+ };
1018
1048
  };
1019
1049
  export type LabelKey = keyof typeof BESCHRIFTUNGEN_ROH;
1020
1050
  export declare const LABELS: Record<LabelKey, TextEntry>;
1051
+ /**
1052
+ * Rueckgabe beim Storno (`returnDisposition`): welche Beschriftung jede Wahl
1053
+ * traegt. Ein Objekt wie CANCELLATION_PAYMENT_ERROR_MESSAGES, keine Liste in
1054
+ * GROSSSCHRIFT (der Oberflaechen-Vertrag liest Listen als Enums ein); die
1055
+ * App liest die Zuordnung aus `fixtures/pos-texts.json`.
1056
+ */
1057
+ export declare const RETURN_DISPOSITION_LABELS: {
1058
+ readonly restock: "stock.return_restock";
1059
+ readonly defective: "stock.return_defective";
1060
+ readonly disposed: "stock.return_disposed";
1061
+ };
1021
1062
  /** Die Beschriftung zum Schluessel, Platzhalter ersetzt; fehlt ein Wert, wirft es wie `messageText`. */
1022
1063
  export declare function labelText(key: LabelKey, values?: Record<string, string | number>): string;
1023
1064
  /** Der Satz zum Schluessel, Platzhalter ersetzt. Fehlt ein Wert, wirft es — ein `{status}` am Tresen waere schlimmer. */
@@ -22,7 +22,7 @@
22
22
  * `placeholders` und `structure`).
23
23
  */
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.LABELS = exports.CANCELLATION_PAYMENT_ERROR_MESSAGES = exports.RECEIPT_EMAIL_ERROR_MESSAGES = exports.CALLS_WITH_EFFECT = exports.ERROR_OUTCOME_RULES = exports.ERROR_CODE_RULES = exports.ERROR_RULES = exports.MESSAGES = void 0;
25
+ exports.RETURN_DISPOSITION_LABELS = exports.LABELS = exports.CANCELLATION_PAYMENT_ERROR_MESSAGES = exports.RECEIPT_EMAIL_ERROR_MESSAGES = exports.CALLS_WITH_EFFECT = exports.ERROR_OUTCOME_RULES = exports.ERROR_CODE_RULES = exports.ERROR_RULES = exports.MESSAGES = void 0;
26
26
  exports.findErrorRule = findErrorRule;
27
27
  exports.messageOutcome = messageOutcome;
28
28
  exports.receiptEmailErrorMessage = receiptEmailErrorMessage;
@@ -172,6 +172,10 @@ const MELDUNGEN_ROH = {
172
172
  // nicht jede Karte abgehakt ist: einmal nachfragen -- eine vergessene
173
173
  // Gutschrift faellt sonst erst dem Gast auf.
174
174
  'cancellation.cards_not_checked': { text: 'Noch ist nicht jede Karte abgehakt – bitte jede am Terminal gutschreiben. Ist das schon geschehen, zum Schließen noch einmal drücken.' },
175
+ // Das Backend weist Grund, Notiz oder Positionen des Stornos zurueck
176
+ // (`unknown_reason`, `note_too_long`, `invalid_items`): am Server geschah
177
+ // nichts, der Kassier beginnt das Storno von vorn.
178
+ 'cancellation.input_rejected': { text: 'Die Eingabe wurde abgelehnt – bitte das Storno neu beginnen.' },
175
179
  // --- Getrennt zahlen -----------------------------------------------------
176
180
  // Ein Tisch zahlt in Teilen, ein Beleg fuer alles. Das Teure ist eine schon
177
181
  // belastete Karte: jeder Satz, der sie betrifft, nennt den Betrag, und keiner
@@ -598,8 +602,32 @@ const BESCHRIFTUNGEN_ROH = {
598
602
  'codetable.preview_title': { text: 'So steht es dann am Bon:' },
599
603
  'codetable.apply': { text: 'Übernehmen' },
600
604
  'codetable.other_row': { text: 'Andere Zeile' },
605
+ // --- Lager an der Kasse ----------------------------------------------------
606
+ // Standort-Auswahl, Bestandsanzeige und die Rueckgabe-Wahl beim Storno
607
+ // (`RETURN_DISPOSITION_LABELS`). „aufgelöst“ steht an einem Standort mit
608
+ // `active: false`, „verfügbar“ an der Menge `available`.
609
+ 'stock.all_articles': { text: 'Alle Artikel' },
610
+ 'stock.location': { text: 'Lager-Standort' },
611
+ 'stock.default_location': { text: 'Standard-Standort' },
612
+ 'stock.resolved': { text: 'aufgelöst' },
613
+ 'stock.where_to': { text: 'Wohin mit der Ware?' },
614
+ 'stock.available': { text: 'verfügbar' },
615
+ 'stock.return_restock': { text: 'Zurück ins Lager' },
616
+ 'stock.return_defective': { text: 'Defekt' },
617
+ 'stock.return_disposed': { text: 'Entsorgt' },
601
618
  };
602
619
  exports.LABELS = BESCHRIFTUNGEN_ROH;
620
+ /**
621
+ * Rueckgabe beim Storno (`returnDisposition`): welche Beschriftung jede Wahl
622
+ * traegt. Ein Objekt wie CANCELLATION_PAYMENT_ERROR_MESSAGES, keine Liste in
623
+ * GROSSSCHRIFT (der Oberflaechen-Vertrag liest Listen als Enums ein); die
624
+ * App liest die Zuordnung aus `fixtures/pos-texts.json`.
625
+ */
626
+ exports.RETURN_DISPOSITION_LABELS = {
627
+ restock: 'stock.return_restock',
628
+ defective: 'stock.return_defective',
629
+ disposed: 'stock.return_disposed',
630
+ };
603
631
  /** Die Beschriftung zum Schluessel, Platzhalter ersetzt; fehlt ein Wert, wirft es wie `messageText`. */
604
632
  function labelText(key, values = {}) {
605
633
  return ersetze(`labelText(${key})`, exports.LABELS[key].text, values);
@@ -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.2.1";
7
+ export declare const PACKAGE_VERSION = "1.3.0";
@@ -7,4 +7,4 @@ exports.PACKAGE_VERSION = void 0;
7
7
  * Client-Version, Nachtrag §6). Ein Test haelt sie gleich mit `package.json`;
8
8
  * beim Anheben der Version beide Stellen aendern.
9
9
  */
10
- exports.PACKAGE_VERSION = '1.2.1';
10
+ exports.PACKAGE_VERSION = '1.3.0';
@@ -34,7 +34,7 @@ export type SignatureStatus = CashboxStatus | 'NOT_REGISTERED';
34
34
  export declare function getCashboxStatus(transport: InternerTransport): Promise<CashboxStatus>;
35
35
  /**
36
36
  * Status der Signatureinheit mit der Zertifikatsseriennummer [certificateSerialHex]
37
- * (hexadezimal, z. B. `6F0404F0`).
37
+ * (hexadezimal, z. B. `5A1C3E07`).
38
38
  *
39
39
  * **Der Returncode wird vor dem Status gelesen** (wie im Dart-Vorbild): `B33`
40
40
  * heisst "nicht registriert" und schlaegt jedes Statusfeld, das daneben stehen
@@ -16,7 +16,7 @@ export async function getCashboxStatus(transport) {
16
16
  }
17
17
  /**
18
18
  * Status der Signatureinheit mit der Zertifikatsseriennummer [certificateSerialHex]
19
- * (hexadezimal, z. B. `6F0404F0`).
19
+ * (hexadezimal, z. B. `5A1C3E07`).
20
20
  *
21
21
  * **Der Returncode wird vor dem Status gelesen** (wie im Dart-Vorbild): `B33`
22
22
  * heisst "nicht registriert" und schlaegt jedes Statusfeld, das daneben stehen
@@ -72,6 +72,22 @@ export interface PosArticle {
72
72
  * (`fromPosArticlePayload`) setzt das Feld immer (`null` oder Liste).
73
73
  */
74
74
  stockLocationIds?: string[] | null;
75
+ /**
76
+ * Artikelnummer des Betriebs; null = keine. Diese und die drei folgenden
77
+ * Felder (Scanner-Suche, Lager) sind optional wie `stockLocationIds`, der
78
+ * Leser setzt sie immer. Texte kommen unveraendert durch (fuehrende Nullen,
79
+ * Schreibweise); nur ein leerer Text (auch reiner Leerraum) wird `null`.
80
+ */
81
+ number?: string | null;
82
+ /** EAN/GTIN, wie gespeichert; null = keine. */
83
+ ean?: string | null;
84
+ /** Interner Code des Betriebs (eigener Barcode/QR); null = keiner. */
85
+ internalCode?: string | null;
86
+ /**
87
+ * Bestandsgefuehrt (Lager-Modul). `null`, wenn die Antwort keine Angabe
88
+ * traegt (aeltere Backends) -- dann nicht aus anderen Feldern ableiten.
89
+ */
90
+ stockTracked?: boolean | null;
75
91
  }
76
92
  /** Deckelt eine gewuenschte Menge an der Hoechstmenge des Artikels (null = keine Grenze). */
77
93
  export declare function allowedQuantity(a: Pick<PosArticle, 'maxQuantity'>, wanted: number): number;
@@ -93,6 +109,10 @@ export interface PosArticlePayload {
93
109
  askQuantity?: boolean | null;
94
110
  maxQuantity?: number | null;
95
111
  stockLocationIds?: string[] | null;
112
+ number?: string | null;
113
+ ean?: string | null;
114
+ internalCode?: string | null;
115
+ stockTracked?: boolean | null;
96
116
  }
97
117
  export declare function fromPosArticlePayload(p: PosArticlePayload): PosArticle;
98
118
  /**
@@ -45,6 +45,10 @@ export function quantityDefaults(a) {
45
45
  export function allowedQuantity(a, wanted) {
46
46
  return a.maxQuantity != null && a.maxQuantity > 0 ? Math.min(wanted, a.maxQuantity) : wanted;
47
47
  }
48
+ /** Ein Text mit Inhalt, unveraendert; leer, nur Leerraum oder kein Text -> null. */
49
+ function textOderNull(wert) {
50
+ return typeof wert === 'string' && wert.trim() !== '' ? wert : null;
51
+ }
48
52
  export function fromPosArticlePayload(p) {
49
53
  return {
50
54
  id: p.id ?? '',
@@ -63,6 +67,10 @@ export function fromPosArticlePayload(p) {
63
67
  stockLocationIds: Array.isArray(p.stockLocationIds)
64
68
  ? p.stockLocationIds.filter((s) => typeof s === 'string' && s !== '')
65
69
  : null,
70
+ number: textOderNull(p.number),
71
+ ean: textOderNull(p.ean),
72
+ internalCode: textOderNull(p.internalCode),
73
+ stockTracked: typeof p.stockTracked === 'boolean' ? p.stockTracked : null,
66
74
  };
67
75
  }
68
76
  /**
@@ -15,4 +15,4 @@ export { type NetworkPrinter, type PrintJob, type PrintJobStatus, PRINT_JOB_STAT
15
15
  export { listMyTipRecipients } from './trinkgeld.js';
16
16
  export { STOCK_LOCATION_TYPES, type StockLocationType, type StockLocation, type StockLocationAddress, type StockLevel, type StockValue, type StockList, type ListMyStockOptions, type SetMyCashregisterStockLocationOptions, type CashregisterStockLocation, listMyStockLocations, listMyStock, setMyCashregisterStockLocation, } from './lager.js';
17
17
  export { RETURN_DISPOSITIONS, isReturnDisposition, type ReturnDisposition } from '../models/cancellation.js';
18
- 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, LABELS, labelText, type TextEntry, type MessageKey, type ErrorKind, type ErrorRule, type ErrorRuleDetail, type Surface, type ReceiptEmailMessageCode, type CancellationPaymentMessageCode, type LabelKey, } from './texte.js';
18
+ 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, LABELS, labelText, RETURN_DISPOSITION_LABELS, type TextEntry, type MessageKey, type ErrorKind, type ErrorRule, type ErrorRuleDetail, type Surface, type ReceiptEmailMessageCode, type CancellationPaymentMessageCode, type LabelKey, } from './texte.js';
@@ -21,4 +21,4 @@ export { STOCK_LOCATION_TYPES, listMyStockLocations, listMyStock, setMyCashregis
21
21
  // Rueckgabe-Wahl beim Storno (Kassen-Dialog); dieselbe Liste wie an der Wurzel.
22
22
  export { RETURN_DISPOSITIONS, isReturnDisposition } from '../models/cancellation.js';
23
23
  // Was die Kasse selbst sagt: ein Katalog fuer Browser-Kasse und App.
24
- 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, LABELS, labelText, } from './texte.js';
24
+ 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, LABELS, labelText, RETURN_DISPOSITION_LABELS, } from './texte.js';
@@ -300,6 +300,9 @@ declare const MELDUNGEN_ROH: {
300
300
  readonly 'cancellation.cards_not_checked': {
301
301
  readonly text: "Noch ist nicht jede Karte abgehakt – bitte jede am Terminal gutschreiben. Ist das schon geschehen, zum Schließen noch einmal drücken.";
302
302
  };
303
+ readonly 'cancellation.input_rejected': {
304
+ readonly text: "Die Eingabe wurde abgelehnt – bitte das Storno neu beginnen.";
305
+ };
303
306
  readonly 'split.setting_hint': {
304
307
  readonly text: "Ein Tisch zahlt in Teilen: jede Zahlung bar oder mit Karte, mit eigenem Trinkgeld – am Ende ein Beleg für alles.";
305
308
  };
@@ -1015,9 +1018,47 @@ declare const BESCHRIFTUNGEN_ROH: {
1015
1018
  readonly 'codetable.other_row': {
1016
1019
  readonly text: "Andere Zeile";
1017
1020
  };
1021
+ readonly 'stock.all_articles': {
1022
+ readonly text: "Alle Artikel";
1023
+ };
1024
+ readonly 'stock.location': {
1025
+ readonly text: "Lager-Standort";
1026
+ };
1027
+ readonly 'stock.default_location': {
1028
+ readonly text: "Standard-Standort";
1029
+ };
1030
+ readonly 'stock.resolved': {
1031
+ readonly text: "aufgelöst";
1032
+ };
1033
+ readonly 'stock.where_to': {
1034
+ readonly text: "Wohin mit der Ware?";
1035
+ };
1036
+ readonly 'stock.available': {
1037
+ readonly text: "verfügbar";
1038
+ };
1039
+ readonly 'stock.return_restock': {
1040
+ readonly text: "Zurück ins Lager";
1041
+ };
1042
+ readonly 'stock.return_defective': {
1043
+ readonly text: "Defekt";
1044
+ };
1045
+ readonly 'stock.return_disposed': {
1046
+ readonly text: "Entsorgt";
1047
+ };
1018
1048
  };
1019
1049
  export type LabelKey = keyof typeof BESCHRIFTUNGEN_ROH;
1020
1050
  export declare const LABELS: Record<LabelKey, TextEntry>;
1051
+ /**
1052
+ * Rueckgabe beim Storno (`returnDisposition`): welche Beschriftung jede Wahl
1053
+ * traegt. Ein Objekt wie CANCELLATION_PAYMENT_ERROR_MESSAGES, keine Liste in
1054
+ * GROSSSCHRIFT (der Oberflaechen-Vertrag liest Listen als Enums ein); die
1055
+ * App liest die Zuordnung aus `fixtures/pos-texts.json`.
1056
+ */
1057
+ export declare const RETURN_DISPOSITION_LABELS: {
1058
+ readonly restock: "stock.return_restock";
1059
+ readonly defective: "stock.return_defective";
1060
+ readonly disposed: "stock.return_disposed";
1061
+ };
1021
1062
  /** Die Beschriftung zum Schluessel, Platzhalter ersetzt; fehlt ein Wert, wirft es wie `messageText`. */
1022
1063
  export declare function labelText(key: LabelKey, values?: Record<string, string | number>): string;
1023
1064
  /** Der Satz zum Schluessel, Platzhalter ersetzt. Fehlt ein Wert, wirft es — ein `{status}` am Tresen waere schlimmer. */
@@ -162,6 +162,10 @@ const MELDUNGEN_ROH = {
162
162
  // nicht jede Karte abgehakt ist: einmal nachfragen -- eine vergessene
163
163
  // Gutschrift faellt sonst erst dem Gast auf.
164
164
  'cancellation.cards_not_checked': { text: 'Noch ist nicht jede Karte abgehakt – bitte jede am Terminal gutschreiben. Ist das schon geschehen, zum Schließen noch einmal drücken.' },
165
+ // Das Backend weist Grund, Notiz oder Positionen des Stornos zurueck
166
+ // (`unknown_reason`, `note_too_long`, `invalid_items`): am Server geschah
167
+ // nichts, der Kassier beginnt das Storno von vorn.
168
+ 'cancellation.input_rejected': { text: 'Die Eingabe wurde abgelehnt – bitte das Storno neu beginnen.' },
165
169
  // --- Getrennt zahlen -----------------------------------------------------
166
170
  // Ein Tisch zahlt in Teilen, ein Beleg fuer alles. Das Teure ist eine schon
167
171
  // belastete Karte: jeder Satz, der sie betrifft, nennt den Betrag, und keiner
@@ -588,8 +592,32 @@ const BESCHRIFTUNGEN_ROH = {
588
592
  'codetable.preview_title': { text: 'So steht es dann am Bon:' },
589
593
  'codetable.apply': { text: 'Übernehmen' },
590
594
  'codetable.other_row': { text: 'Andere Zeile' },
595
+ // --- Lager an der Kasse ----------------------------------------------------
596
+ // Standort-Auswahl, Bestandsanzeige und die Rueckgabe-Wahl beim Storno
597
+ // (`RETURN_DISPOSITION_LABELS`). „aufgelöst“ steht an einem Standort mit
598
+ // `active: false`, „verfügbar“ an der Menge `available`.
599
+ 'stock.all_articles': { text: 'Alle Artikel' },
600
+ 'stock.location': { text: 'Lager-Standort' },
601
+ 'stock.default_location': { text: 'Standard-Standort' },
602
+ 'stock.resolved': { text: 'aufgelöst' },
603
+ 'stock.where_to': { text: 'Wohin mit der Ware?' },
604
+ 'stock.available': { text: 'verfügbar' },
605
+ 'stock.return_restock': { text: 'Zurück ins Lager' },
606
+ 'stock.return_defective': { text: 'Defekt' },
607
+ 'stock.return_disposed': { text: 'Entsorgt' },
591
608
  };
592
609
  export const LABELS = BESCHRIFTUNGEN_ROH;
610
+ /**
611
+ * Rueckgabe beim Storno (`returnDisposition`): welche Beschriftung jede Wahl
612
+ * traegt. Ein Objekt wie CANCELLATION_PAYMENT_ERROR_MESSAGES, keine Liste in
613
+ * GROSSSCHRIFT (der Oberflaechen-Vertrag liest Listen als Enums ein); die
614
+ * App liest die Zuordnung aus `fixtures/pos-texts.json`.
615
+ */
616
+ export const RETURN_DISPOSITION_LABELS = {
617
+ restock: 'stock.return_restock',
618
+ defective: 'stock.return_defective',
619
+ disposed: 'stock.return_disposed',
620
+ };
593
621
  /** Die Beschriftung zum Schluessel, Platzhalter ersetzt; fehlt ein Wert, wirft es wie `messageText`. */
594
622
  export function labelText(key, values = {}) {
595
623
  return ersetze(`labelText(${key})`, LABELS[key].text, values);
@@ -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.2.1";
7
+ export declare const PACKAGE_VERSION = "1.3.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.2.1';
7
+ export const PACKAGE_VERSION = '1.3.0';
@@ -67,10 +67,10 @@
67
67
  "paymentMethod": "cash",
68
68
  "turnoverCounterAES256ICM": "UMSATZ",
69
69
  "signaturePreviousReceipt": "VORGAENGER",
70
- "certificateSerialNumber": "6F0404F0",
70
+ "certificateSerialNumber": "5A1C3E07",
71
71
  "receiptType": "standard",
72
72
  "sig": "eyJhbGciOiJFUzI1NiJ9.QVQx.SIGNATURWERT",
73
- "qr": "_R1-AT1_KASSE1_AT0-KASSE1-43_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_6F0404F0_SIGNATUR",
73
+ "qr": "_R1-AT1_KASSE1_AT0-KASSE1-43_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_5A1C3E07_SIGNATUR",
74
74
  "fullReceiptId": "VOLL",
75
75
  "customerDetails": [],
76
76
  "legalMessage": []
@@ -299,7 +299,7 @@
299
299
  },
300
300
  {
301
301
  "kind": "qr",
302
- "data": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_6F0404F0_SIGNATUR"
302
+ "data": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_5A1C3E07_SIGNATUR"
303
303
  },
304
304
  {
305
305
  "kind": "space",
@@ -212,7 +212,7 @@
212
212
  },
213
213
  {
214
214
  "kind": "qr",
215
- "payload": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_6F0404F0_SIGNATUR",
215
+ "payload": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_5A1C3E07_SIGNATUR",
216
216
  "widthFraction": 0.828125
217
217
  },
218
218
  {
@@ -200,7 +200,7 @@
200
200
  },
201
201
  {
202
202
  "kind": "qr",
203
- "payload": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_6F0404F0_SIGNATUR",
203
+ "payload": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_5A1C3E07_SIGNATUR",
204
204
  "widthFraction": 0.5520833333333334
205
205
  },
206
206
  {
@@ -259,7 +259,7 @@
259
259
  },
260
260
  {
261
261
  "kind": "qr",
262
- "data": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_6F0404F0_SIGNATUR"
262
+ "data": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_5A1C3E07_SIGNATUR"
263
263
  },
264
264
  {
265
265
  "kind": "space",
@@ -182,7 +182,7 @@
182
182
  },
183
183
  {
184
184
  "kind": "qr",
185
- "payload": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_6F0404F0_SIGNATUR",
185
+ "payload": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_5A1C3E07_SIGNATUR",
186
186
  "widthFraction": 0.828125
187
187
  },
188
188
  {
@@ -176,7 +176,7 @@
176
176
  },
177
177
  {
178
178
  "kind": "qr",
179
- "payload": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_6F0404F0_SIGNATUR",
179
+ "payload": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_5A1C3E07_SIGNATUR",
180
180
  "widthFraction": 0.5520833333333334
181
181
  },
182
182
  {
@@ -219,7 +219,7 @@
219
219
  },
220
220
  {
221
221
  "kind": "qr",
222
- "data": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_6F0404F0_SIGNATUR"
222
+ "data": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_5A1C3E07_SIGNATUR"
223
223
  },
224
224
  {
225
225
  "kind": "space",
@@ -170,7 +170,7 @@
170
170
  },
171
171
  {
172
172
  "kind": "qr",
173
- "payload": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_6F0404F0_SIGNATUR",
173
+ "payload": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_5A1C3E07_SIGNATUR",
174
174
  "widthFraction": 0.828125
175
175
  },
176
176
  {
@@ -164,7 +164,7 @@
164
164
  },
165
165
  {
166
166
  "kind": "qr",
167
- "payload": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_6F0404F0_SIGNATUR",
167
+ "payload": "_R1-AT1_KASSE1_AT0-KASSE1-42_2026-08-13T10:15:30_5,00_2,70_0,00_0,00_0,00_UMSATZ_VORGAENGER_5A1C3E07_SIGNATUR",
168
168
  "widthFraction": 0.5520833333333334
169
169
  },
170
170
  {
@@ -310,7 +310,7 @@
310
310
  },
311
311
  {
312
312
  "kind": "qr",
313
- "data": "_R1-AT1_KASSE1_AT0-KASSE1-76_2026-09-25T10:15:30_-20,00_-25,45_0,00_0,00_0,00_UMSATZ_VORGAENGER_6F0404F0_SIGNATUR"
313
+ "data": "_R1-AT1_KASSE1_AT0-KASSE1-76_2026-09-25T10:15:30_-20,00_-25,45_0,00_0,00_0,00_UMSATZ_VORGAENGER_5A1C3E07_SIGNATUR"
314
314
  },
315
315
  {
316
316
  "kind": "space",