@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.
- package/CHANGELOG.md +39 -0
- package/README.md +7 -2
- package/dist/cjs/client/status.d.ts +1 -1
- package/dist/cjs/client/status.js +1 -1
- package/dist/cjs/pos/artikel.d.ts +20 -0
- package/dist/cjs/pos/artikel.js +8 -0
- package/dist/cjs/pos/index.d.ts +1 -1
- package/dist/cjs/pos/index.js +2 -1
- package/dist/cjs/pos/texte.d.ts +41 -0
- package/dist/cjs/pos/texte.js +29 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client/status.d.ts +1 -1
- package/dist/esm/client/status.js +1 -1
- package/dist/esm/pos/artikel.d.ts +20 -0
- package/dist/esm/pos/artikel.js +8 -0
- package/dist/esm/pos/index.d.ts +1 -1
- package/dist/esm/pos/index.js +1 -1
- package/dist/esm/pos/texte.d.ts +41 -0
- package/dist/esm/pos/texte.js +28 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/code-table-receipts.json +2 -2
- package/fixtures/expected/cancellation-discount.lines.json +1 -1
- package/fixtures/expected/cancellation-discount.sheet32.json +1 -1
- package/fixtures/expected/cancellation-discount.sheet48.json +1 -1
- package/fixtures/expected/cancellation-full.lines.json +1 -1
- package/fixtures/expected/cancellation-full.sheet32.json +1 -1
- package/fixtures/expected/cancellation-full.sheet48.json +1 -1
- package/fixtures/expected/cancellation-partial.lines.json +1 -1
- package/fixtures/expected/cancellation-partial.sheet32.json +1 -1
- package/fixtures/expected/cancellation-partial.sheet48.json +1 -1
- package/fixtures/expected/cancellation-split-full.lines.json +1 -1
- package/fixtures/expected/cancellation-split-full.sheet32.json +1 -1
- package/fixtures/expected/cancellation-split-full.sheet48.json +1 -1
- package/fixtures/expected/cancellation-split-partial.lines.json +1 -1
- package/fixtures/expected/cancellation-split-partial.sheet32.json +1 -1
- package/fixtures/expected/cancellation-split-partial.sheet48.json +1 -1
- package/fixtures/expected/card-custom.lines.json +1 -1
- package/fixtures/expected/card-custom.sheet32.json +1 -1
- package/fixtures/expected/card-custom.sheet48.json +1 -1
- package/fixtures/expected/card-gptom-ios.lines.json +1 -1
- package/fixtures/expected/card-gptom-ios.sheet32.json +1 -1
- package/fixtures/expected/card-gptom-ios.sheet48.json +1 -1
- package/fixtures/expected/card-gptom.lines.json +1 -1
- package/fixtures/expected/card-gptom.sheet32.json +1 -1
- package/fixtures/expected/card-gptom.sheet48.json +1 -1
- package/fixtures/expected/card-hobex-cloud.lines.json +1 -1
- package/fixtures/expected/card-hobex-cloud.sheet32.json +1 -1
- package/fixtures/expected/card-hobex-cloud.sheet48.json +1 -1
- package/fixtures/expected/card-hobex-hps.lines.json +1 -1
- package/fixtures/expected/card-hobex-hps.sheet32.json +1 -1
- package/fixtures/expected/card-hobex-hps.sheet48.json +1 -1
- package/fixtures/expected/card-mypos.lines.json +1 -1
- package/fixtures/expected/card-mypos.sheet32.json +1 -1
- package/fixtures/expected/card-mypos.sheet48.json +1 -1
- package/fixtures/expected/card-stripe-eps.lines.json +1 -1
- package/fixtures/expected/card-stripe-eps.sheet32.json +1 -1
- package/fixtures/expected/card-stripe-eps.sheet48.json +1 -1
- package/fixtures/expected/card-stripe.lines.json +1 -1
- package/fixtures/expected/card-stripe.sheet32.json +1 -1
- package/fixtures/expected/card-stripe.sheet48.json +1 -1
- package/fixtures/expected/card-sumup.lines.json +1 -1
- package/fixtures/expected/card-sumup.sheet32.json +1 -1
- package/fixtures/expected/card-sumup.sheet48.json +1 -1
- package/fixtures/expected/code-table-receipt.long-item-name.iso8859_15.hex +1 -1
- package/fixtures/expected/code-table-receipt.long-item-name.pc437.hex +1 -1
- package/fixtures/expected/code-table-receipt.long-item-name.pc850.hex +1 -1
- package/fixtures/expected/code-table-receipt.long-item-name.pc858.hex +1 -1
- package/fixtures/expected/code-table-receipt.long-item-name.replacement.hex +2 -2
- package/fixtures/expected/code-table-receipt.long-item-name.wpc1252.hex +1 -1
- package/fixtures/expected/code-table-receipt.sale-cash.iso8859_15.hex +1 -1
- package/fixtures/expected/code-table-receipt.sale-cash.pc437.hex +1 -1
- package/fixtures/expected/code-table-receipt.sale-cash.pc850.hex +1 -1
- package/fixtures/expected/code-table-receipt.sale-cash.pc858.hex +1 -1
- package/fixtures/expected/code-table-receipt.sale-cash.replacement.hex +1 -1
- package/fixtures/expected/code-table-receipt.sale-cash.wpc1252.hex +1 -1
- package/fixtures/expected/code-table-receipt.special-characters.iso8859_15.hex +1 -1
- package/fixtures/expected/code-table-receipt.special-characters.pc437.hex +1 -1
- package/fixtures/expected/code-table-receipt.special-characters.pc850.hex +1 -1
- package/fixtures/expected/code-table-receipt.special-characters.pc858.hex +1 -1
- package/fixtures/expected/code-table-receipt.special-characters.replacement.hex +1 -1
- package/fixtures/expected/code-table-receipt.special-characters.wpc1252.hex +1 -1
- package/fixtures/expected/code-table-receipt.test-cashregister-sale.iso8859_15.hex +2 -2
- package/fixtures/expected/code-table-receipt.test-cashregister-sale.pc437.hex +2 -2
- package/fixtures/expected/code-table-receipt.test-cashregister-sale.pc850.hex +2 -2
- package/fixtures/expected/code-table-receipt.test-cashregister-sale.pc858.hex +2 -2
- package/fixtures/expected/code-table-receipt.test-cashregister-sale.replacement.hex +1 -1
- package/fixtures/expected/code-table-receipt.test-cashregister-sale.wpc1252.hex +2 -2
- package/fixtures/expected/discount-lines.lines.json +1 -1
- package/fixtures/expected/discount-lines.sheet32.json +1 -1
- package/fixtures/expected/discount-lines.sheet48.json +1 -1
- package/fixtures/expected/discount-owner-tip.lines.json +1 -1
- package/fixtures/expected/discount-owner-tip.sheet32.json +1 -1
- package/fixtures/expected/discount-owner-tip.sheet48.json +1 -1
- package/fixtures/expected/discount-simple.lines.json +1 -1
- package/fixtures/expected/discount-simple.sheet32.json +1 -1
- package/fixtures/expected/discount-simple.sheet48.json +1 -1
- package/fixtures/expected/discount-tip.lines.json +1 -1
- package/fixtures/expected/discount-tip.sheet32.json +1 -1
- package/fixtures/expected/discount-tip.sheet48.json +1 -1
- package/fixtures/expected/discount-value-voucher.lines.json +1 -1
- package/fixtures/expected/discount-value-voucher.sheet32.json +1 -1
- package/fixtures/expected/discount-value-voucher.sheet48.json +1 -1
- package/fixtures/expected/long-item-name.lines.json +1 -1
- package/fixtures/expected/long-item-name.sheet32.json +1 -1
- package/fixtures/expected/long-item-name.sheet48.json +1 -1
- package/fixtures/expected/sale-card.lines.json +1 -1
- package/fixtures/expected/sale-card.sheet32.json +1 -1
- package/fixtures/expected/sale-card.sheet48.json +1 -1
- package/fixtures/expected/sale-cash.lines.json +1 -1
- package/fixtures/expected/sale-cash.sheet32.json +1 -1
- package/fixtures/expected/sale-cash.sheet48.json +1 -1
- package/fixtures/expected/sale-small-business.lines.json +1 -1
- package/fixtures/expected/sale-small-business.sheet32.json +1 -1
- package/fixtures/expected/sale-small-business.sheet48.json +1 -1
- package/fixtures/expected/signature-outage-sale.lines.json +1 -1
- package/fixtures/expected/signature-outage-sale.sheet32.json +1 -1
- package/fixtures/expected/signature-outage-sale.sheet48.json +1 -1
- package/fixtures/expected/split-card-card-cash.lines.json +1 -1
- package/fixtures/expected/split-card-card-cash.sheet32.json +1 -1
- package/fixtures/expected/split-card-card-cash.sheet48.json +1 -1
- package/fixtures/expected/split-cash-change.lines.json +1 -1
- package/fixtures/expected/split-cash-change.sheet32.json +1 -1
- package/fixtures/expected/split-cash-change.sheet48.json +1 -1
- package/fixtures/expected/split-long-amount.lines.json +1 -1
- package/fixtures/expected/split-long-amount.sheet32.json +1 -1
- package/fixtures/expected/split-long-amount.sheet48.json +1 -1
- package/fixtures/expected/split-one-card-tip.lines.json +1 -1
- package/fixtures/expected/split-one-card-tip.sheet32.json +1 -1
- package/fixtures/expected/split-one-card-tip.sheet48.json +1 -1
- package/fixtures/expected/split-table-round-tip.lines.json +1 -1
- package/fixtures/expected/split-table-round-tip.sheet32.json +1 -1
- package/fixtures/expected/split-table-round-tip.sheet48.json +1 -1
- package/fixtures/expected/split-tip-card.lines.json +1 -1
- package/fixtures/expected/split-tip-card.sheet32.json +1 -1
- package/fixtures/expected/split-tip-card.sheet48.json +1 -1
- package/fixtures/expected/split-two-cards-same-provider.lines.json +1 -1
- package/fixtures/expected/split-two-cards-same-provider.sheet32.json +1 -1
- package/fixtures/expected/split-two-cards-same-provider.sheet48.json +1 -1
- package/fixtures/expected/test-cashregister-sale.lines.json +1 -1
- package/fixtures/expected/test-cashregister-sale.sheet32.json +1 -1
- package/fixtures/expected/test-cashregister-sale.sheet48.json +1 -1
- package/fixtures/expected/test-signature-sale.lines.json +1 -1
- package/fixtures/expected/test-signature-sale.sheet32.json +1 -1
- package/fixtures/expected/test-signature-sale.sheet48.json +1 -1
- package/fixtures/expected/training.lines.json +1 -1
- package/fixtures/expected/training.sheet32.json +1 -1
- package/fixtures/expected/training.sheet48.json +1 -1
- package/fixtures/expected/zero-annual.grid32.txt +1 -1
- package/fixtures/expected/zero-annual.grid48.txt +1 -1
- package/fixtures/expected/zero-annual.lines.json +2 -2
- package/fixtures/expected/zero-annual.sheet32.json +2 -2
- package/fixtures/expected/zero-annual.sheet48.json +2 -2
- package/fixtures/expected/zero-final.grid32.txt +1 -1
- package/fixtures/expected/zero-final.grid48.txt +1 -1
- package/fixtures/expected/zero-final.lines.json +2 -2
- package/fixtures/expected/zero-final.sheet32.json +2 -2
- package/fixtures/expected/zero-final.sheet48.json +2 -2
- package/fixtures/expected/zero-manual.grid32.txt +1 -1
- package/fixtures/expected/zero-manual.grid48.txt +1 -1
- package/fixtures/expected/zero-manual.lines.json +2 -2
- package/fixtures/expected/zero-manual.sheet32.json +2 -2
- package/fixtures/expected/zero-manual.sheet48.json +2 -2
- package/fixtures/expected/zero-monthly.grid32.txt +1 -1
- package/fixtures/expected/zero-monthly.grid48.txt +1 -1
- package/fixtures/expected/zero-monthly.lines.json +2 -2
- package/fixtures/expected/zero-monthly.sheet32.json +2 -2
- package/fixtures/expected/zero-monthly.sheet48.json +2 -2
- package/fixtures/expected/zero-outage-end.grid32.txt +1 -1
- package/fixtures/expected/zero-outage-end.grid48.txt +1 -1
- package/fixtures/expected/zero-outage-end.lines.json +2 -2
- package/fixtures/expected/zero-outage-end.sheet32.json +2 -2
- package/fixtures/expected/zero-outage-end.sheet48.json +2 -2
- package/fixtures/expected/zero-start.grid32.txt +1 -1
- package/fixtures/expected/zero-start.grid48.txt +1 -1
- package/fixtures/expected/zero-start.lines.json +2 -2
- package/fixtures/expected/zero-start.sheet32.json +2 -2
- package/fixtures/expected/zero-start.sheet48.json +2 -2
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/invoice-api.schema.json +1 -1
- package/fixtures/invoice-texts.json +1 -1
- package/fixtures/manifest.json +172 -172
- package/fixtures/pos-texts.json +36 -1
- package/fixtures/receipts/cancellation-discount.json +2 -2
- package/fixtures/receipts/cancellation-full.json +2 -2
- package/fixtures/receipts/cancellation-partial.json +2 -2
- package/fixtures/receipts/cancellation-split-full.json +2 -2
- package/fixtures/receipts/cancellation-split-partial.json +2 -2
- package/fixtures/receipts/card-custom.json +2 -2
- package/fixtures/receipts/card-gptom-ios.json +2 -2
- package/fixtures/receipts/card-gptom.json +2 -2
- package/fixtures/receipts/card-hobex-cloud.json +2 -2
- package/fixtures/receipts/card-hobex-hps.json +2 -2
- package/fixtures/receipts/card-mypos.json +2 -2
- package/fixtures/receipts/card-stripe-eps.json +2 -2
- package/fixtures/receipts/card-stripe.json +2 -2
- package/fixtures/receipts/card-sumup.json +2 -2
- package/fixtures/receipts/discount-lines.json +2 -2
- package/fixtures/receipts/discount-owner-tip.json +2 -2
- package/fixtures/receipts/discount-simple.json +2 -2
- package/fixtures/receipts/discount-tip.json +2 -2
- package/fixtures/receipts/discount-value-voucher.json +2 -2
- package/fixtures/receipts/long-item-name.json +2 -2
- package/fixtures/receipts/sale-card.json +2 -2
- package/fixtures/receipts/sale-cash.json +2 -2
- package/fixtures/receipts/sale-small-business.json +2 -2
- package/fixtures/receipts/signature-outage-sale.json +2 -2
- package/fixtures/receipts/split-card-card-cash.json +2 -2
- package/fixtures/receipts/split-cash-change.json +2 -2
- package/fixtures/receipts/split-long-amount.json +2 -2
- package/fixtures/receipts/split-one-card-tip.json +2 -2
- package/fixtures/receipts/split-table-round-tip.json +2 -2
- package/fixtures/receipts/split-tip-card.json +2 -2
- package/fixtures/receipts/split-two-cards-same-provider.json +2 -2
- package/fixtures/receipts/test-cashregister-sale.json +2 -2
- package/fixtures/receipts/test-signature-sale.json +2 -2
- package/fixtures/receipts/training.json +2 -2
- package/fixtures/receipts/zero-annual.json +2 -2
- package/fixtures/receipts/zero-final.json +2 -2
- package/fixtures/receipts/zero-manual.json +2 -2
- package/fixtures/receipts/zero-monthly.json +2 -2
- package/fixtures/receipts/zero-outage-end.json +2 -2
- package/fixtures/receipts/zero-start.json +2 -2
- package/fixtures/surface.json +1 -1
- 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
|
|
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. `
|
|
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. `
|
|
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
|
/**
|
package/dist/cjs/pos/artikel.js
CHANGED
|
@@ -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
|
/**
|
package/dist/cjs/pos/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/cjs/pos/index.js
CHANGED
|
@@ -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; } });
|
package/dist/cjs/pos/texte.d.ts
CHANGED
|
@@ -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. */
|
package/dist/cjs/pos/texte.js
CHANGED
|
@@ -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);
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
|
@@ -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. `
|
|
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. `
|
|
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
|
/**
|
package/dist/esm/pos/artikel.js
CHANGED
|
@@ -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
|
/**
|
package/dist/esm/pos/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/esm/pos/index.js
CHANGED
|
@@ -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';
|
package/dist/esm/pos/texte.d.ts
CHANGED
|
@@ -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. */
|
package/dist/esm/pos/texte.js
CHANGED
|
@@ -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);
|
package/dist/esm/version.d.ts
CHANGED
package/dist/esm/version.js
CHANGED
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
"paymentMethod": "cash",
|
|
68
68
|
"turnoverCounterAES256ICM": "UMSATZ",
|
|
69
69
|
"signaturePreviousReceipt": "VORGAENGER",
|
|
70
|
-
"certificateSerialNumber": "
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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",
|