@kreiseck/kasseneck-api 1.38.0 → 1.39.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 +19 -2
- package/README.md +3 -1
- package/dist/cjs/client/aufrufe.d.ts +2 -2
- package/dist/cjs/client/aufrufe.js +12 -0
- package/dist/cjs/payments/hobex-hps/connect-client.d.ts +17 -0
- package/dist/cjs/payments/hobex-hps/connect-client.js +17 -0
- package/dist/cjs/payments/hobex-hps/index.d.ts +1 -1
- package/dist/cjs/payments/index.d.ts +1 -1
- package/dist/cjs/pos/client.js +2 -1
- package/dist/cjs/pos/index.d.ts +1 -1
- package/dist/cjs/pos/index.js +7 -5
- package/dist/cjs/pos/settings.d.ts +14 -1
- package/dist/cjs/pos/settings.js +16 -2
- package/dist/cjs/pos/texte.d.ts +387 -0
- package/dist/cjs/pos/texte.js +134 -0
- package/dist/cjs/register/errors.d.ts +1 -1
- package/dist/cjs/register/errors.js +4 -0
- package/dist/cjs/register/index.d.ts +1 -1
- package/dist/cjs/register/index.js +3 -1
- package/dist/cjs/register/pairing.d.ts +51 -0
- package/dist/cjs/register/pairing.js +59 -0
- package/dist/cjs/stored/einstellungen.js +5 -2
- package/dist/cjs/stored/vokabular.d.ts +1 -1
- package/dist/cjs/stored/vokabular.js +2 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client/aufrufe.d.ts +2 -2
- package/dist/esm/client/aufrufe.js +12 -0
- package/dist/esm/payments/hobex-hps/connect-client.d.ts +17 -0
- package/dist/esm/payments/hobex-hps/connect-client.js +17 -0
- package/dist/esm/payments/hobex-hps/index.d.ts +1 -1
- package/dist/esm/payments/index.d.ts +1 -1
- package/dist/esm/pos/client.js +3 -2
- package/dist/esm/pos/index.d.ts +1 -1
- package/dist/esm/pos/index.js +1 -1
- package/dist/esm/pos/settings.d.ts +14 -1
- package/dist/esm/pos/settings.js +14 -1
- package/dist/esm/pos/texte.d.ts +387 -0
- package/dist/esm/pos/texte.js +134 -0
- package/dist/esm/register/errors.d.ts +1 -1
- package/dist/esm/register/errors.js +4 -0
- package/dist/esm/register/index.d.ts +1 -1
- package/dist/esm/register/index.js +1 -1
- package/dist/esm/register/pairing.d.ts +51 -0
- package/dist/esm/register/pairing.js +57 -0
- package/dist/esm/stored/einstellungen.js +6 -3
- package/dist/esm/stored/vokabular.d.ts +1 -1
- package/dist/esm/stored/vokabular.js +2 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/invoice-api.schema.json +1 -1
- package/fixtures/invoice-texts.json +1 -1
- package/fixtures/pos-texts.json +445 -1
- package/fixtures/receipt-due-generated.json +1 -1
- package/fixtures/receipt-due-voucher-generated.json +1 -1
- package/fixtures/surface.json +14 -3
- package/fixtures/v3/antworten/belege.json +1 -1
- package/fixtures/v3/antworten/belegmail.json +1 -1
- package/fixtures/v3/antworten/berichte.json +1 -1
- package/fixtures/v3/antworten/kasse-belege.json +1 -1
- package/fixtures/v3/antworten/kasse.json +695 -3
- package/fixtures/v3/antworten/lager.json +1 -1
- package/fixtures/v3/antworten/rechnungen.json +1 -1
- package/fixtures/v3/antworten/storno.json +1 -1
- package/fixtures/v3/stored/belege.json +1 -1
- package/fixtures/v3/stored/kasse.json +209 -3
- package/fixtures/v3/stored/rechnungen.json +1 -1
- package/fixtures/v3/v3-vokabular.json +67 -4
- package/fixtures/v3/zahlbetrag-faelle.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,24 @@ 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.
|
|
7
|
+
## 1.39.0 - 2026-11-14
|
|
8
|
+
|
|
9
|
+
Texts for the device operation of both registers (printer, paper, terminal, lock screen), an address callback in the HPS Connect client, a call to report a new terminal address, a call to report the running register version and the device switch `printerHint` (backend spec 2026-11-09-connect-betrieb, stage 2). Additive; every existing call, golden and text behaves as before.
|
|
10
|
+
|
|
11
|
+
- **`onEndpoint(endpoint)` in `createHpsConnectClient`** (type `HpsConnectEndpoint`: `host`, `port`, `relocated`): called with the address Kasseneck Connect really used, but only from an answer with `ok: true` that carries a complete `endpoint` (Connect 1.5.0 and later). An error envelope never calls it, not even when it carries an `endpoint`; neither does an answer of Connect 1.4.2 (no field) or an incomplete address. A throw in the callback leaves the payment untouched. Reason: the register adopts a new terminal address only from a successful answer, and an old Connect must behave exactly as before.
|
|
12
|
+
- **Printer and paper sentences** (both registers): `printer.paper_out`, `printer.cover_open`, `printer.not_ready`, `printer.paper_near_end`, `printer.unreachable`, `printer.none`, and the new `printer.no_status_answer` („Drucker antwortet nicht – Deckel und Papier prüfen.“) for a printer that stays silent on the status query – a hint only, the receipt is printed anyway. Label `printer.hint_setting` („Warnen, wenn der Drucker nicht antwortet“) for the switch that hides that hint. `printer.warn_unreachable` and `printer.warn_none` are unchanged.
|
|
13
|
+
- **Terminal and lock screen sentences** (both registers): `terminal.unreachable`, `terminal.tid_mismatch`, `terminal.tid_hint`, `manager.ask`, `print.test_ruler_hint` and the five lock screen lines `lock_screen.card_payment_unclear`, `.receipt_unclear`, `.payout_unclear`, `.reversal_unclear`, `.split_open` („… bitte anmelden und prüfen.“).
|
|
14
|
+
- **Connect sentences** (`only: ['web']`): `connect.browser_blocks`, `connect.updating`, `connect.other_installation`, `connect.other_installation_hint`. `connect.not_responding` is unchanged.
|
|
15
|
+
- **Sentences that stood in the code of the browser register** (`only: ['web']`, wording unchanged): the rest of the Connect error messages (`connect.pair_invalid`, `.pair_request_throttled`, `.print_in_progress`, `.printer_timeout`, `.printer_refused`, `.bad_request`, `.unreadable_answer`, `.error_generic`), the success sentences `connect.unpaired_done` and `connect.switched_over` plus the label `connect.code_prompt` (no explanatory hints of the settings: spec 2.1 of the Connect operation spec; the composed search and pairing sentences of the browser register are built from the labels below and are not in the catalogue).
|
|
16
|
+
- **Labels and buttons** `devices.*` (61 entries, both registers): status lines („Bondrucker bereit“, „Kartenterminal bereit“, „Verbunden“ …), field names („Papierbreite“, „Zeichensatz“, „Kassenlade“ …), placeholders `{n}`, `{width}`, `{count}`, `{tid}`, `{ip}`, `{port}`, and buttons („Nochmal prüfen“, „Nicht jetzt“, „Neu suchen“ …). Among them the short labels of the device settings `devices.check` („prüfen“), `devices.searching` („Sucht …“), `devices.search` („Suchen“), `devices.none` („keiner“), `devices.yes` („ja“), `devices.no` („nein“) and `devices.test_print_paper` („Testdruck auf Papier ({width}, {count} Zeichen)“). Existing buttons are reused, not duplicated: `common.cancel`, `nav.settings`, `printer.set_up`, `receipts.open` („Öffnen“), `codetable.print_again`, `codetable.apply` („Übernehmen“), `split.remove` („Entfernen“), `cancellation.tip_refund_yes` („Ja“), `cancellation.tip_refund_no` („Nein“).
|
|
17
|
+
- **Titles of the device settings** (labels, both registers, wording unchanged from the browser register; no explanatory sentences, spec 2.1 of the Connect operation spec, apart from `terminal.tid_hint`): `printer.section_title` („Drucker & Lade“), `connect.status_title`, `.install_title`, `.name`, `.switch_title`, `printer.use`, `.bluetooth_title`, `.print_qr`, `.old_way_title`, `.cut_title`, `.bon_texts_title`, `.test_page_print`, `.drawer_title`, `.drawer_auto_title`, `.drawer_open_now`, `terminal.card_terminal`, `.tid_title`, `.search_title`, `.ip_title`, `.port_title`, the hint `terminal.change_in_panel` („Im Panel ändern“) and, browser register only, the buttons `connect.pair` („Koppeln“), `.unpair` („Entkoppeln“), `.unpair_yes` („Ja, entkoppeln“).
|
|
18
|
+
- **`reportMyTerminalAddress({ ownerUid, deviceId, deviceSecret, tid, host, port })`** (`./register`, `POS_CALLS` now 54; only on the register path, device credentials like `listRegisterUsersForDevice`, no session of a person): the register reports silently that the card terminal answers under a new address. The server writes only the two fields `terminalIp`/`terminalPort`, and only when the TID matches the device's setup; every change is entered in the register log. Answer `{ changed }` (`false` = the address was already stored). The form is checked before sending (`KasseneckValidationError`, `scope: 'request'`: credentials, `tid` and `host` non-empty, `port` a whole number from 1 to 65535); the device secret goes as `secretParams`, never into a log or error. After a timeout the outcome stays `rejected` (repeatable: the same address again is `changed: false`). The register shows nothing about it. New error codes in `REGISTER_ERROR_CODES`: `terminal_id_mismatch`, `invalid_terminal_address`, `too_many_changes` (changed too often today), and `server_error`. Because `isRegisterError` looks only at the code, never at the call, `isRegisterError(e)` without a code is now also `true` for the `server_error` of every register call (before: `false`); a branch that used it to tell sign-in errors from the rest decides at the code instead.
|
|
19
|
+
- **`reportMyRegisterClient({ ownerUid, deviceId, deviceSecret, app })`** (`./register`, `POS_CALLS` now 55; register path only, device credentials like `reportMyTerminalAddress`, no session of a person): the register reports silently which version of it runs on this device (`app` is the build identifier: `1.39.0/2026-11-13T18:20Z` in the browser, `kasse-app/1.0.3+34` in the app). The server stores it with the time of the report and writes only when the identifier changed or the last report is at least 10 minutes old; answer `{ written }` (`false` = nothing to write, no error). Meant for the start, after sign-in and a beat of about 15 minutes. The form is checked before sending (`KasseneckValidationError`, `scope: 'request'`: credentials and `app` non-empty); the device secret goes as `secretParams`. After a timeout the outcome stays `rejected` (repeatable). No new error codes (`device_not_paired`, `server_error`). The register shows nothing about it. Reason: the admin shows per device which version runs and whether it is outdated.
|
|
20
|
+
- **Version texts** (`version.line` label, both registers: „Fassung {version} · {time}“, the quiet line in the settings and on the PIN screen; `version.updated` message, `only: ['web']`: „Kasse aktualisiert auf {version}.“, shown once after the browser register reloaded itself).
|
|
21
|
+
- **Device setting `printerHint`** (optional switch, `PosDeviceSettings.printerHint?`, `POS_DEVICE_OPTIONAL_SWITCHES`, `posPrinterHint(device)`): shows or hides the "printer does not answer" hint at the print buttons. No default value, the server sends it only when stored; absent means on. Written with `true`/`false` through `setMyRegisterDeviceSettings`, read through `posSettingsFromWire`/`./stored`.
|
|
22
|
+
- `fixtures/pos-texts.json`, `surface.json`, `invoice-texts.json`, `invoice-api.schema.json` and `hobex-hps-codes.json` regenerated for the version.
|
|
23
|
+
|
|
24
|
+
## 1.38.0 - 2026-11-12
|
|
8
25
|
|
|
9
26
|
Payment on invoices: when an invoice is paid in cash or by card on site, the server writes a payment receipt ("Zahlung auf Rechnung") into the cash register the money goes into. This version reads, prints and explains such receipts. Additive; every existing call, receipt and golden behaves as before (all existing goldens are byte-identical, eight new ones are added).
|
|
10
27
|
|
|
@@ -25,7 +42,7 @@ Payment on invoices: when an invoice is paid in cash or by card on site, the ser
|
|
|
25
42
|
- `fixtures/surface.json`, `pos-texts.json`, `invoice-texts.json`, `hobex-hps-codes.json` and `invoice-api.schema.json` regenerated for the version.
|
|
26
43
|
|
|
27
44
|
|
|
28
|
-
## 1.37.0 -
|
|
45
|
+
## 1.37.0 - 2026-11-12
|
|
29
46
|
|
|
30
47
|
Late terminal query for a card payment with an open outcome (`HpsPayments.clarifyPayment` in `./payments`). Additive; `pay`, `refund` and `cancel` behave as before. Card tips at the register (backend spec 2026-11-11-kartentrinkgeld, stages 1 and 2). Additive; every existing call, golden and text behaves as before, except the wording changes named below.
|
|
31
48
|
|
package/README.md
CHANGED
|
@@ -302,7 +302,7 @@ const register = registerUserAuth({
|
|
|
302
302
|
|
|
303
303
|
### Calls without any authentication
|
|
304
304
|
|
|
305
|
-
|
|
305
|
+
Eight calls run **without any identity**, because they are how an identity comes
|
|
306
306
|
into being or how a device manages itself. They live in `…/register` and take
|
|
307
307
|
**no authentication**, only the connection settings (`posBaseUrl`, timeout,
|
|
308
308
|
`fetch`); they always go to the register path:
|
|
@@ -311,6 +311,8 @@ into being or how a device manages itself. They live in `…/register` and take
|
|
|
311
311
|
|---|---|
|
|
312
312
|
| `pairRegisterDevice` | the pairing code from the panel |
|
|
313
313
|
| `listRegisterUsersForDevice`, `listRegisterSessionsForDevice` | the device credentials from pairing |
|
|
314
|
+
| `reportMyTerminalAddress` | the device credentials from pairing (no session; register path only) |
|
|
315
|
+
| `reportMyRegisterClient` | the device credentials from pairing (no session; register path only) |
|
|
314
316
|
| `unpairRegisterDevice` | the device credentials; locks the device in the backend |
|
|
315
317
|
| `registerUserLogin` | device credentials, user and PIN |
|
|
316
318
|
| `registerPinLogin` | device credentials and PIN, without choosing a user |
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* umhuellt, muss ihn weiterhin absetzen koennen.
|
|
14
14
|
*/
|
|
15
15
|
import type { FileOrData, FileOrDataCallOptions, PdfOrData, TransportBodyFields, TransportCallOptions } from './transport.js';
|
|
16
|
-
export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createDepExport", "createDepHandoverLink", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCashregisterReport", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getDepExport", "getDepExportFile", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceSetupStatus", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "getReportV2", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listBrands", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyStock", "listMyStockLocations", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listReceipts", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "revokeDepHandoverLink", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook", "getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf", "orderSignatureCard", "getSignatureCardOrder", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "getRegisterInspectionInfo", "reportConnectState", "learnMyLeergutCode", "listMyLeergutCodes", "getMyTipBalance", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady", "unfixTerminal", "listDepositTypes", "getEwpReport", "setEwpExtraQuantities"];
|
|
16
|
+
export declare const ALL_CALLS: readonly ["activateCashregister", "cancelInvoice", "cancelReceipt", "createCreditNote", "createCustomer", "createCustomerCashregister", "createDepExport", "createDepHandoverLink", "createPartnerCustomer", "checkPartnerCustomerEmail", "createPartnerWebhook", "createPaymentLinkStripe", "createPrintJob", "createReceipt", "deletePartnerWebhook", "downloadDailyReport", "downloadReport", "endRegisterSession", "financeWebService", "generateFullReceiptId", "getCashregisterReport", "getCustomer", "getCustomerCredentials", "getCustomerSignatureStatus", "getDepExport", "getDepExportFile", "getFirstReceiptDate", "getInvoice", "getInvoicePdf", "getInvoiceSetupStatus", "getInvoiceXml", "getKasseSettings", "getPartnerCustomer", "getPartnerInfo", "getPrintJob", "getReceipt", "getReportV2", "hobexPayApi", "hobexRefundApi", "issueInvoice", "listCustomerCashregisters", "listInvoices", "listBrands", "listMyArticleGroups", "listMyArticles", "listMyCashregisters", "listMyPrinters", "listMyReceipts", "listMyStock", "listMyStockLocations", "listMyTipRecipients", "listPartnerCustomers", "listPartnerWebhookDeliveries", "listPartnerWebhooks", "listReceipts", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "pairRegisterDevice", "recordInvoicePayment", "registerPinLogin", "registerUserLogin", "renewRegisterSession", "reportCustomerContract", "requestCustomerSignature", "revokeDepHandoverLink", "searchCustomers", "sendPartnerCustomerFonLink", "sendPartnerWebhookTest", "sendReceiptEmail", "setMyCashregisterStockLocation", "setMyKasseLogo", "setMyKasseSettings", "setMyRegisterDeviceSettings", "stripeCaptureIntent", "unpairRegisterDevice", "rotatePartnerWebhookSecret", "updateCustomer", "updatePartnerWebhook", "getArticle", "listArticles", "lookupArticleByCode", "listLocations", "getStock", "listStock", "listStockMovements", "createWebhook", "updateWebhook", "deleteWebhook", "listWebhooks", "sendWebhookTest", "rotateWebhookSecret", "listWebhookDeliveries", "createArticle", "updateArticle", "deactivateArticle", "receiveGoods", "transferStock", "recordStockLoss", "changeStockCondition", "reverseStockMovement", "createReservation", "extendReservation", "releaseReservation", "getReservation", "listReservations", "createVariantGroup", "updateVariantGroup", "getVariantGroup", "listVariantGroups", "addVariant", "createStocktake", "listStocktakes", "getStocktake", "listStocktakeItems", "recordStocktakeCount", "voidStocktakeCount", "listStocktakeCounts", "reviewStocktake", "recountStocktake", "closeStocktake", "cancelStocktake", "getStocktakePdf", "orderSignatureCard", "getSignatureCardOrder", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "getRegisterInspectionInfo", "reportConnectState", "learnMyLeergutCode", "listMyLeergutCodes", "getMyTipBalance", "reportMyTerminalAddress", "reportMyRegisterClient", "registerTerminalDevice", "getTerminalAccess", "claimTerminal", "requestTerminalCode", "getTerminalCode", "reportTerminalLogin", "reportTerminalReady", "unfixTerminal", "listDepositTypes", "getEwpReport", "setEwpExtraQuantities"];
|
|
17
17
|
export type ApiCall = typeof ALL_CALLS[number];
|
|
18
18
|
/**
|
|
19
19
|
* Die oeffentlichen Endpunkte unter `/v3` (`https://api.kasseneck.at/v3/<name>`),
|
|
@@ -29,7 +29,7 @@ export declare const PUBLIC_CALLS: readonly ["createReceipt", "getReceipt", "can
|
|
|
29
29
|
* die fuenf DEP-Aufrufe); die Kasse ruft sie trotzdem ueber diesen Weg (ein Dialekt
|
|
30
30
|
* je Client, Nachtrag §5.2).
|
|
31
31
|
*/
|
|
32
|
-
export declare const POS_CALLS: readonly ["pairRegisterDevice", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "registerUserLogin", "registerPinLogin", "renewRegisterSession", "endRegisterSession", "unpairRegisterDevice", "listMyCashregisters", "listMyReceipts", "getReceipt", "createReceipt", "generateFullReceiptId", "cancelReceipt", "sendReceiptEmail", "listMyArticleGroups", "listMyArticles", "getKasseSettings", "setMyKasseSettings", "setMyKasseLogo", "setMyRegisterDeviceSettings", "listMyPrinters", "createPrintJob", "getPrintJob", "listMyTipRecipients", "listMyStockLocations", "listMyStock", "setMyCashregisterStockLocation", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "createDepExport", "getDepExport", "getDepExportFile", "createDepHandoverLink", "revokeDepHandoverLink", "getRegisterInspectionInfo", "reportConnectState", "learnMyLeergutCode", "listMyLeergutCodes", "getMyTipBalance"];
|
|
32
|
+
export declare const POS_CALLS: readonly ["pairRegisterDevice", "listRegisterUsersForDevice", "listRegisterSessionsForDevice", "registerUserLogin", "registerPinLogin", "renewRegisterSession", "endRegisterSession", "unpairRegisterDevice", "listMyCashregisters", "listMyReceipts", "getReceipt", "createReceipt", "generateFullReceiptId", "cancelReceipt", "sendReceiptEmail", "listMyArticleGroups", "listMyArticles", "getKasseSettings", "setMyKasseSettings", "setMyKasseLogo", "setMyRegisterDeviceSettings", "listMyPrinters", "createPrintJob", "getPrintJob", "listMyTipRecipients", "listMyStockLocations", "listMyStock", "setMyCashregisterStockLocation", "listMyStocktakes", "listMyStocktakeItems", "listMyStocktakeCounts", "recordMyStocktakeCount", "voidMyStocktakeCount", "checkVoucher", "reprintVoucherLabel", "getMyDrawerState", "openMyShift", "recordMyCashMovement", "logMyDrawerOpenings", "getMyShiftReport", "closeMyShift", "recordMyShiftCount", "logReceiptOutputs", "createDepExport", "getDepExport", "getDepExportFile", "createDepHandoverLink", "revokeDepHandoverLink", "getRegisterInspectionInfo", "reportConnectState", "learnMyLeergutCode", "listMyLeergutCodes", "getMyTipBalance", "reportMyTerminalAddress", "reportMyRegisterClient"];
|
|
33
33
|
export type PublicCall = typeof PUBLIC_CALLS[number];
|
|
34
34
|
export type PosCall = typeof POS_CALLS[number];
|
|
35
35
|
/**
|
|
@@ -162,6 +162,10 @@ exports.ALL_CALLS = [
|
|
|
162
162
|
'listMyLeergutCodes',
|
|
163
163
|
// „Mein Trinkgeld“ (./pos): Stand der angemeldeten Person; nur ueber den Kassenweg.
|
|
164
164
|
'getMyTipBalance',
|
|
165
|
+
// Neue Adresse des Kartenterminals still melden (./register, Ausweis des Geraets); nur ueber den Kassenweg.
|
|
166
|
+
'reportMyTerminalAddress',
|
|
167
|
+
// Laufende Fassung der Kasse still melden (./register, Ausweis des Geraets); nur ueber den Kassenweg.
|
|
168
|
+
'reportMyRegisterClient',
|
|
165
169
|
// Kartenterminal am Handy: Geraet, Zugang, TID und Code (nur /v3).
|
|
166
170
|
'registerTerminalDevice',
|
|
167
171
|
'getTerminalAccess',
|
|
@@ -394,6 +398,10 @@ exports.POS_CALLS = [
|
|
|
394
398
|
'listMyLeergutCodes',
|
|
395
399
|
// „Mein Trinkgeld“: nur ueber den Kassenweg, nur persoenliche Anmeldung.
|
|
396
400
|
'getMyTipBalance',
|
|
401
|
+
// Neue Adresse des Kartenterminals melden: nur ueber den Kassenweg, Ausweis des Geraets (keine Sitzung).
|
|
402
|
+
'reportMyTerminalAddress',
|
|
403
|
+
// Laufende Fassung melden: nur ueber den Kassenweg, Ausweis des Geraets (keine Sitzung).
|
|
404
|
+
'reportMyRegisterClient',
|
|
397
405
|
];
|
|
398
406
|
/**
|
|
399
407
|
* Die Aufrufe **mit Wirkung**, alphabetisch: sie legen etwas an, aendern oder
|
|
@@ -610,6 +618,10 @@ exports.CALLS_WITHOUT_EFFECT = Object.freeze({
|
|
|
610
618
|
registerUserLogin: 'repeatable',
|
|
611
619
|
renewRegisterSession: 'repeatable',
|
|
612
620
|
// Kartenterminal: Anmeldung und Einrichtung melden schreiben denselben Stand noch einmal.
|
|
621
|
+
// Dieselbe Adresse noch einmal gemeldet aendert nichts (`changed: false`); der Tageszaehler zaehlt nur echte Aenderungen.
|
|
622
|
+
reportMyTerminalAddress: 'repeatable',
|
|
623
|
+
// Dieselbe Kennung noch einmal gemeldet schreibt nichts (`written: false`).
|
|
624
|
+
reportMyRegisterClient: 'repeatable',
|
|
613
625
|
reportTerminalLogin: 'repeatable',
|
|
614
626
|
reportTerminalReady: 'repeatable',
|
|
615
627
|
// Kartenterminal: die feste Bindung noch einmal loesen aendert nichts am Server.
|
|
@@ -105,6 +105,16 @@ export type HpsConnectFetch = (url: string, init: {
|
|
|
105
105
|
body: string;
|
|
106
106
|
signal: AbortSignal;
|
|
107
107
|
}) => Promise<HpsConnectFetchResponse>;
|
|
108
|
+
/**
|
|
109
|
+
* Die Adresse, unter der Connect das Terminal tatsaechlich erreicht hat
|
|
110
|
+
* (Feld `endpoint` der Antwort ab Connect 1.5.0). `relocated: true` heisst:
|
|
111
|
+
* nicht die mitgegebene, sondern eine wiedergefundene Adresse.
|
|
112
|
+
*/
|
|
113
|
+
export interface HpsConnectEndpoint {
|
|
114
|
+
host: string;
|
|
115
|
+
port: number;
|
|
116
|
+
relocated: boolean;
|
|
117
|
+
}
|
|
108
118
|
export interface HpsConnectClientOptions {
|
|
109
119
|
/** Basisadresse des Agenten. Vorgabe `http://127.0.0.1:27182` (README `kasseneck-connect`). */
|
|
110
120
|
baseUrl?: string;
|
|
@@ -124,6 +134,13 @@ export interface HpsConnectClientOptions {
|
|
|
124
134
|
paymentTimeoutMs?: number;
|
|
125
135
|
/** Eigene `fetch`-Umsetzung (Tests). Vorgabe: globales `fetch`. */
|
|
126
136
|
fetch?: HpsConnectFetch;
|
|
137
|
+
/**
|
|
138
|
+
* Wird mit der benutzten Adresse des Terminals aufgerufen, wenn Connect sie
|
|
139
|
+
* in einer ERFOLGREICHEN Antwort (`ok: true`) mitschickt (ab Connect 1.5.0).
|
|
140
|
+
* Bei einer Fehlerhuelle und bei Antworten ohne `endpoint` (Connect 1.4.2)
|
|
141
|
+
* nie. Ein Wurf des Aufrufers bleibt ohne Wirkung auf die Zahlung.
|
|
142
|
+
*/
|
|
143
|
+
onEndpoint?: (endpoint: HpsConnectEndpoint) => void;
|
|
127
144
|
}
|
|
128
145
|
export interface HpsConnectClient {
|
|
129
146
|
payment(options: HpsConnectPaymentOptions): Promise<HpsTransactionResponse>;
|
|
@@ -63,6 +63,22 @@ function createHpsConnectClient(options) {
|
|
|
63
63
|
const shortTimeoutMs = options.shortTimeoutMs ?? DEFAULT_SHORT_TIMEOUT_MS;
|
|
64
64
|
const paymentTimeoutMs = options.paymentTimeoutMs ?? DEFAULT_PAYMENT_TIMEOUT_MS;
|
|
65
65
|
const holen = options.fetch ?? globalHpsConnectFetch();
|
|
66
|
+
// Nur aus einer Antwort mit `ok: true` und einer vollstaendigen Adresse;
|
|
67
|
+
// alles andere bleibt unbeachtet. Die Zahlung haengt nie am Aufrufer.
|
|
68
|
+
function meldeAdresse(huelle) {
|
|
69
|
+
const e = huelle['endpoint'];
|
|
70
|
+
if (options.onEndpoint === undefined || e === null || typeof e !== 'object')
|
|
71
|
+
return;
|
|
72
|
+
const { host, port, relocated } = e;
|
|
73
|
+
if (typeof host !== 'string' || host === '' || typeof port !== 'number' || !Number.isInteger(port))
|
|
74
|
+
return;
|
|
75
|
+
try {
|
|
76
|
+
options.onEndpoint({ host, port, relocated: relocated === true });
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
// Der Aufrufer darf die Antwort nicht kippen.
|
|
80
|
+
}
|
|
81
|
+
}
|
|
66
82
|
async function rufen(path, body, timeoutMs) {
|
|
67
83
|
const abbruch = new AbortController();
|
|
68
84
|
const wecker = setTimeout(() => abbruch.abort(), timeoutMs);
|
|
@@ -103,6 +119,7 @@ function createHpsConnectClient(options) {
|
|
|
103
119
|
}
|
|
104
120
|
const h = huelle;
|
|
105
121
|
if (h.ok === true) {
|
|
122
|
+
meldeAdresse(h);
|
|
106
123
|
return h;
|
|
107
124
|
}
|
|
108
125
|
const code = typeof h.error?.code === 'string' ? h.error.code : undefined;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* tatsaechlichen Adresse (z. B. ueber `GET /v1/status` je Port) bleibt Sache
|
|
18
18
|
* des Aufrufers.
|
|
19
19
|
*/
|
|
20
|
-
export { type HpsConnectCancelOptions, type HpsConnectClient, type HpsConnectClientOptions, type HpsConnectFetch, type HpsConnectFetchResponse, type HpsConnectPaymentOptions, type HpsConnectRefundOptions, type HpsConnectTarget, type HpsConnectTransactionOptions, createHpsConnectClient, } from './connect-client.js';
|
|
20
|
+
export { type HpsConnectCancelOptions, type HpsConnectClient, type HpsConnectClientOptions, type HpsConnectEndpoint, type HpsConnectFetch, type HpsConnectFetchResponse, type HpsConnectPaymentOptions, type HpsConnectRefundOptions, type HpsConnectTarget, type HpsConnectTransactionOptions, createHpsConnectClient, } from './connect-client.js';
|
|
21
21
|
export { HpsClarifyTimeoutError, HpsConnectException, HpsConnectTerminalError, HpsConnectTransportError, HpsPreflightError, HpsTransactionIdError, PREFLIGHT_CONNECT_CODES, TERMINAL_UNREACHABLE_CONNECT_CODES, } from './errors.js';
|
|
22
22
|
export { type HpsPaymentEvent, type HpsPaymentEventKind, type HpsPaymentObserver, } from './events.js';
|
|
23
23
|
export { type CardPaymentOutcome, type HpsPaymentResult, isHostUncertainResult, mayRetrySafely, } from './outcome.js';
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
export { StripeLinkMode, type StripeLinkModeKey } from '../enums/index.js';
|
|
44
44
|
export { type CreateStripeLinkOptions, type StripeCaptureResult, createStripeLink, stripeCaptureIntent, } from './stripe.js';
|
|
45
45
|
export { type HobexPayOptions, type HobexRefundOptions, type HobexTransactionIdOptions, hobexPay, hobexRefund, newHobexTransactionId, } from './hobex.js';
|
|
46
|
-
export { type CardPaymentOutcome, type HpsConnectClient, type HpsConnectCancelOptions, type HpsConnectClientOptions, type HpsConnectFetch, type HpsConnectFetchResponse, type HpsConnectPaymentOptions, type HpsConnectRefundOptions, type HpsConnectTarget, type HpsConnectTransactionOptions, type HpsCancelOptions, type HpsClarifyOptions, type HpsCode, type HpsCodeEffect, type HpsCodeReason, type HpsCodeSource, type HpsMeasuredCode, type HpsPaymentEvent, type HpsPaymentEventKind, type HpsPaymentObserver, type HpsPaymentOptions, type HpsPayments, type HpsPaymentResult, type HpsPaymentsOptions, type HpsRefundOptions, type HpsTransactionIdGeneratorOptions, type HpsTransactionResponse, ABORTED_CODE, APPROVED_CODE, CARD_NOT_PRESENT_CODE, createHpsConnectClient, createHpsPayments, createHpsTransactionIdGenerator, HOBEX_SUPPORT, HPS_CODES, HPS_MEASURED_CODES, HPS_REASON_HINTS, hpsCodeInfo, hpsCodeReason, hobexReceiptFromHps, HpsClarifyTimeoutError, HpsConnectException, HpsConnectTerminalError, HpsConnectTransportError, HpsPreflightError, HpsTransactionIdError, INVALID_TRANSACTION_CODE, isApproved, isConclusive, isConclusiveAsStatus, isHostUncertain, isHostUncertainResult, isInProgress, isNoStatement, isNotAbortable, isTechnicalError, isUnknownCode, isValidHpsTransactionId, mayRetrySafely, MAX_TRANSACTION_ID_LENGTH, newHpsTransactionId, NOT_ABORTABLE_CODE, NO_STATEMENT_CODE, parseHpsTransactionResponse, PREFLIGHT_CONNECT_CODES, TERMINAL_UNREACHABLE_CONNECT_CODES, TECHNICAL_ERROR_CODE, NOT_FOUND_HTTP_STATUS, TERMINAL_BUSY_HTTP_STATUS, TRANSACTION_CANCELED_CODE, } from './hobex-hps/index.js';
|
|
46
|
+
export { type CardPaymentOutcome, type HpsConnectClient, type HpsConnectCancelOptions, type HpsConnectClientOptions, type HpsConnectEndpoint, type HpsConnectFetch, type HpsConnectFetchResponse, type HpsConnectPaymentOptions, type HpsConnectRefundOptions, type HpsConnectTarget, type HpsConnectTransactionOptions, type HpsCancelOptions, type HpsClarifyOptions, type HpsCode, type HpsCodeEffect, type HpsCodeReason, type HpsCodeSource, type HpsMeasuredCode, type HpsPaymentEvent, type HpsPaymentEventKind, type HpsPaymentObserver, type HpsPaymentOptions, type HpsPayments, type HpsPaymentResult, type HpsPaymentsOptions, type HpsRefundOptions, type HpsTransactionIdGeneratorOptions, type HpsTransactionResponse, ABORTED_CODE, APPROVED_CODE, CARD_NOT_PRESENT_CODE, createHpsConnectClient, createHpsPayments, createHpsTransactionIdGenerator, HOBEX_SUPPORT, HPS_CODES, HPS_MEASURED_CODES, HPS_REASON_HINTS, hpsCodeInfo, hpsCodeReason, hobexReceiptFromHps, HpsClarifyTimeoutError, HpsConnectException, HpsConnectTerminalError, HpsConnectTransportError, HpsPreflightError, HpsTransactionIdError, INVALID_TRANSACTION_CODE, isApproved, isConclusive, isConclusiveAsStatus, isHostUncertain, isHostUncertainResult, isInProgress, isNoStatement, isNotAbortable, isTechnicalError, isUnknownCode, isValidHpsTransactionId, mayRetrySafely, MAX_TRANSACTION_ID_LENGTH, newHpsTransactionId, NOT_ABORTABLE_CODE, NO_STATEMENT_CODE, parseHpsTransactionResponse, PREFLIGHT_CONNECT_CODES, TERMINAL_UNREACHABLE_CONNECT_CODES, TECHNICAL_ERROR_CODE, NOT_FOUND_HTTP_STATUS, TERMINAL_BUSY_HTTP_STATUS, TRANSACTION_CANCELED_CODE, } from './hobex-hps/index.js';
|
package/dist/cjs/pos/client.js
CHANGED
|
@@ -150,7 +150,8 @@ function pruefeTeil(name, teil, block, standard, werte) {
|
|
|
150
150
|
throw new errors_js_1.KasseneckValidationError(name, `${teil}.${schluessel}: Kennung oder null erwartet`, 'request');
|
|
151
151
|
continue;
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
const schalter = teil === 'business' ? settings_js_1.POS_BUSINESS_OPTIONAL_FIELDS : settings_js_1.POS_DEVICE_OPTIONAL_SWITCHES;
|
|
154
|
+
if (schalter.includes(schluessel)) {
|
|
154
155
|
if (typeof wert !== 'boolean')
|
|
155
156
|
throw new errors_js_1.KasseneckValidationError(name, `${teil}.${schluessel}: true oder false erwartet`, 'request');
|
|
156
157
|
continue;
|
package/dist/cjs/pos/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* die Backend-Functions (die Rewrites-Waechter der Web-App leiten daraus ab)
|
|
7
7
|
* und sprechen den Kassenweg `/api/v3` (Schluessel und Werte englisch).
|
|
8
8
|
*/
|
|
9
|
-
export { type PosTheme, type PosFontSize, type PosWatermark, type PosQuantity, type PosTipMode, type PosCheckoutMode, type PosCardProvider, type PosReceiptOutput, type PosShortcutAction, type PosShortcutMap, POS_SHORTCUT_ACTIONS, POS_SHORTCUT_DEFAULTS, type PosLayout, type PosCategoryPosition, type PosTileHeight, type PosPrinterType, type PosTerminalVia, type PosTerminalType, type PosPaperSize, type PosCodePage, type PosCut, type PosDrawerAutoOpen, type PosQrMode, type PosLogoSize, type PosSettingsFontSize, type PosTileStyle, type PosAutoLogoutMinutes, type PosDiscount, type PosWatermarkSide, type PosWatermarkStrength, type PosLogoScale, type PosWatermarkScale, type PosDoneScreenSeconds, type PosToggleMap, type PosBusinessSettings, type PosDeviceSettings, type PosSettings, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, POS_DEVICE_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_CHOICES, POS_DEVICE_OPTIONAL_CHOICES, posTipKeptByDefault, posCustomDiscountAllowed, posTipKeptMode, posTipCardKeptByDefault, posTipCardKeptMode, posTipSelfPayout, tipKeptFor, type TipKeptDecision, type TipPaymentKind, DISCOUNT_PRESET_KIND, type PosDiscountPreset, type PosDiscountPresetKind, POS_BUSINESS_OPTIONAL_LISTS, posTipKinds, posTipStart, posCartWidth, POS_BUSINESS_VALUES, POS_DEVICE_VALUES, mergePosSettings, sanitizePosSettings, unknownPosSettingValues, posSettingsChanges, type PosOpen, POS_SHORTCUT_SHARED_PAIRS, posShortcutConflict, THEME, FONT_SIZE, WATERMARK, QUANTITY, TIP_MODE, TIP_KINDS, TIP_START, TIP_KEPT_MODE, TIP_CARD_KEPT_MODE, type PosTipKeptMode, CART_WIDTH, type PosTipKind, type PosCartWidth, CHECKOUT_MODE, CARD_PROVIDER, RECEIPT_OUTPUT, LAYOUT, CATEGORY_POSITION, TILE_HEIGHT, PRINTER_TYPE, TERMINAL_VIA, TERMINAL_TYPE, PAPER_SIZE, CODE_PAGE, CUT, DRAWER_AUTO_OPEN, QR_MODE, LOGO_SIZE, SETTINGS_FONT_SIZE, TILE_STYLE, AUTO_LOGOUT_MINUTES, DISCOUNT, WATERMARK_SIDE, WATERMARK_STRENGTH, LOGO_SCALE, WATERMARK_SCALE, DONE_SCREEN_SECONDS, } from './settings.js';
|
|
9
|
+
export { type PosTheme, type PosFontSize, type PosWatermark, type PosQuantity, type PosTipMode, type PosCheckoutMode, type PosCardProvider, type PosReceiptOutput, type PosShortcutAction, type PosShortcutMap, POS_SHORTCUT_ACTIONS, POS_SHORTCUT_DEFAULTS, type PosLayout, type PosCategoryPosition, type PosTileHeight, type PosPrinterType, type PosTerminalVia, type PosTerminalType, type PosPaperSize, type PosCodePage, type PosCut, type PosDrawerAutoOpen, type PosQrMode, type PosLogoSize, type PosSettingsFontSize, type PosTileStyle, type PosAutoLogoutMinutes, type PosDiscount, type PosWatermarkSide, type PosWatermarkStrength, type PosLogoScale, type PosWatermarkScale, type PosDoneScreenSeconds, type PosToggleMap, type PosBusinessSettings, type PosDeviceSettings, type PosSettings, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, POS_DEVICE_OPTIONAL_FIELDS, POS_DEVICE_OPTIONAL_SWITCHES, posPrinterHint, POS_BUSINESS_OPTIONAL_FIELDS, POS_BUSINESS_OPTIONAL_CHOICES, POS_DEVICE_OPTIONAL_CHOICES, posTipKeptByDefault, posCustomDiscountAllowed, posTipKeptMode, posTipCardKeptByDefault, posTipCardKeptMode, posTipSelfPayout, tipKeptFor, type TipKeptDecision, type TipPaymentKind, DISCOUNT_PRESET_KIND, type PosDiscountPreset, type PosDiscountPresetKind, POS_BUSINESS_OPTIONAL_LISTS, posTipKinds, posTipStart, posCartWidth, POS_BUSINESS_VALUES, POS_DEVICE_VALUES, mergePosSettings, sanitizePosSettings, unknownPosSettingValues, posSettingsChanges, type PosOpen, POS_SHORTCUT_SHARED_PAIRS, posShortcutConflict, THEME, FONT_SIZE, WATERMARK, QUANTITY, TIP_MODE, TIP_KINDS, TIP_START, TIP_KEPT_MODE, TIP_CARD_KEPT_MODE, type PosTipKeptMode, CART_WIDTH, type PosTipKind, type PosCartWidth, CHECKOUT_MODE, CARD_PROVIDER, RECEIPT_OUTPUT, LAYOUT, CATEGORY_POSITION, TILE_HEIGHT, PRINTER_TYPE, TERMINAL_VIA, TERMINAL_TYPE, PAPER_SIZE, CODE_PAGE, CUT, DRAWER_AUTO_OPEN, QR_MODE, LOGO_SIZE, SETTINGS_FONT_SIZE, TILE_STYLE, AUTO_LOGOUT_MINUTES, DISCOUNT, WATERMARK_SIDE, WATERMARK_STRENGTH, LOGO_SCALE, WATERMARK_SCALE, DONE_SCREEN_SECONDS, } from './settings.js';
|
|
10
10
|
export { type ArticleGroup, type ArticleGroupPayload, fromArticleGroupPayload, type PosArticle, type PosArticlePayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, QUANTITY_RULES, type QuantityRule, type QuantityDefaults, quantityRuleForUnit, quantityDefaults, allowedQuantity, isBookableArticle, tilePrompts, } from './artikel.js';
|
|
11
11
|
export { REFERENCE_MODES, type ReferenceMode, type PosReference, REFERENCE_INPUT_MAX, REFERENCE_LABEL_MAX, REFERENCE_HINT_MAX, REFERENCE_PATTERN_MAX, REFERENCE_PATTERN_TEMPLATES, cleanReferenceText, isValidReferencePattern, isDigitsOnlyPattern, type ReferenceCheckResult, checkReference, referenceLineName, fromReferencePayload, } from './kachel-referenz.js';
|
|
12
12
|
export { ADD_ONS_MAX, ADD_ON_BLOCK_REASONS, type AddOnBlockReason, isSelectableAddOn, addOnsFor, addOnReferencesValid, addOnsOfItem, addOnRemap, addOnDisplayOrder, orderAddOnLines, } from './zusaetze.js';
|
package/dist/cjs/pos/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.roundUpSuggestions = exports.receiptOutputLabel = exports.RETURN_DISPOSITION_LABELS = exports.labelText = exports.LABELS = exports.TIP_CLAIM_SCOPE_LABELS = exports.TIP_KEPT_MODE_LABELS = exports.EXTERNAL_VOUCHER_KIND_LABELS = exports.EXTERNAL_VOUCHERS_LABELS = exports.externalVoucherArticleErrorMessage = exports.EXTERNAL_VOUCHER_ARTICLE_MESSAGES = exports.EXTERNAL_VOUCHER_TILE_MESSAGES = exports.depositErrorMessage = exports.DEPOSIT_ERROR_MESSAGES = exports.voucherErrorMessage = exports.VOUCHER_ERROR_MESSAGES = exports.cancellationErrorMessage = exports.CANCELLATION_VOUCHER_ERROR_MESSAGES = 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.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_KINDS = exports.cashMovementLayout = exports.shiftReceiptLayout = exports.TIP_CLAIM_SCOPES = exports.DIFFERENCE_PART_TYPES = exports.EXPECTED_PART_KEYS = exports.AFTER_COUNT_TYPES = exports.SHIFT_RECEIPT_KINDS = void 0;
|
|
3
|
+
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.CART_WIDTH = exports.TIP_CARD_KEPT_MODE = exports.TIP_KEPT_MODE = exports.TIP_START = exports.TIP_KINDS = 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.posCartWidth = exports.posTipStart = exports.posTipKinds = exports.POS_BUSINESS_OPTIONAL_LISTS = exports.DISCOUNT_PRESET_KIND = exports.tipKeptFor = exports.posTipSelfPayout = exports.posTipCardKeptMode = exports.posTipCardKeptByDefault = exports.posTipKeptMode = exports.posCustomDiscountAllowed = exports.posTipKeptByDefault = exports.POS_DEVICE_OPTIONAL_CHOICES = exports.POS_BUSINESS_OPTIONAL_CHOICES = exports.POS_BUSINESS_OPTIONAL_FIELDS = exports.posPrinterHint = exports.POS_DEVICE_OPTIONAL_SWITCHES = exports.POS_DEVICE_OPTIONAL_FIELDS = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.POS_SHORTCUT_DEFAULTS = exports.POS_SHORTCUT_ACTIONS = void 0;
|
|
4
|
+
exports.posDepositSettingsFromWire = exports.DEPOSIT_ON_PREMISES_DEFAULTS = exports.DEPOSIT_RETURN_MODES = exports.DEPOSIT_TYPES = exports.DEPOSIT_KINDS = exports.orderAddOnLines = exports.addOnDisplayOrder = exports.addOnRemap = exports.addOnsOfItem = exports.addOnReferencesValid = exports.addOnsFor = exports.isSelectableAddOn = exports.ADD_ON_BLOCK_REASONS = exports.ADD_ONS_MAX = exports.fromReferencePayload = exports.referenceLineName = exports.checkReference = exports.isDigitsOnlyPattern = exports.isValidReferencePattern = exports.cleanReferenceText = exports.REFERENCE_PATTERN_TEMPLATES = exports.REFERENCE_PATTERN_MAX = exports.REFERENCE_HINT_MAX = exports.REFERENCE_LABEL_MAX = exports.REFERENCE_INPUT_MAX = exports.REFERENCE_MODES = exports.tilePrompts = exports.isBookableArticle = 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 = void 0;
|
|
5
|
+
exports.INVALID_DISCOUNT_PRESET = exports.discountBlockLines = exports.checkDiscountPresets = exports.discountChipsFromPresets = exports.discountPresetChipText = exports.posDiscountPresets = exports.tipStatus = exports.getMyTipBalance = exports.listMyTipRecipients = exports.printerCatalogSettings = exports.printerCatalogEntry = exports.getPrintJob = exports.createPrintJob = exports.listMyPrinters = exports.isPrintJobFinished = exports.PRINT_JOB_SOURCES = exports.PRINT_JOB_STATUSES = exports.depositReturnOf = exports.voucherPermsOf = 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 = exports.getPosSettings = exports.OWN_VOUCHER_CODE_SHAPES = exports.ownVoucherCodeShape = exports.externalVoucherTileBlock = exports.checkExternalVoucherArticle = exports.checkExternalVoucherValue = exports.isArticleExternalVoucher = exports.EXTERNAL_VOUCHER_ARTICLE_REASONS = exports.ARTICLE_EXTERNAL_VOUCHER_VAT_RATES = exports.ARTICLE_EXTERNAL_VOUCHER_INVALID = exports.ARTICLE_EXTERNAL_VOUCHER_TYPES = exports.depositReturnLine = exports.withDepositLines = exports.viennaDay = exports.depositAmountOn = exports.depositsFor = exports.cashRegisterDepositFromWire = exports.depositEntriesFromWire = void 0;
|
|
6
|
+
exports.CASH_LOCATIONS = exports.MANUAL_MOVEMENT_TYPES = exports.MOVEMENT_TYPES = exports.EUR_DENOMINATIONS = exports.durationText = exports.shiftTipLines = exports.newIdempotencyKey = exports.parseCentsAllowZero = exports.sumDenominations = exports.recordMyShiftCount = exports.closeMyShift = exports.getMyShiftReport = exports.logMyDrawerOpenings = exports.recordMyCashMovement = exports.openMyShift = exports.getMyDrawerState = exports.EXTERNAL_VOUCHERS = exports.VOUCHER_TYPE_VALIDITY_PATTERNS = exports.VOUCHER_AMOUNT_MODES = exports.VOUCHER_TYPE_KINDS = exports.VOUCHER_PAYOUTS = exports.posVoucherSettingsFromWire = exports.VOUCHER_SETTINGS_DEFAULTS = exports.reprintVoucherLabel = exports.checkVoucher = exports.VOUCHER_STATUSES = exports.VOUCHER_KINDS = exports.parseQuantityMilli = exports.voidMyStocktakeCount = exports.recordMyStocktakeCount = exports.listMyStocktakeCounts = exports.listMyStocktakeItems = exports.listMyStocktakes = exports.setMyCashregisterStockLocation = exports.listMyStock = exports.listMyStockLocations = exports.STOCK_LOCATION_TYPES = exports.matchReturnCode = exports.listReturnCodes = exports.learnReturnCode = exports.reportConnectState = exports.inspectionInfoLines = exports.inspectionInfoRows = exports.getRegisterInspectionInfo = exports.depFolderName = exports.DISCOUNT_PRESET_MESSAGES = exports.DISCOUNT_PRESET_AMOUNT_CENTS = exports.DISCOUNT_PRESET_PERCENT_BP = exports.DISCOUNT_PRESET_NAME_MAX = exports.DISCOUNT_PRESETS_MAX = void 0;
|
|
7
|
+
exports.roundUpSuggestions = exports.receiptOutputLabel = exports.RETURN_DISPOSITION_LABELS = exports.labelText = exports.LABELS = exports.TIP_CLAIM_SCOPE_LABELS = exports.TIP_KEPT_MODE_LABELS = exports.EXTERNAL_VOUCHER_KIND_LABELS = exports.EXTERNAL_VOUCHERS_LABELS = exports.externalVoucherArticleErrorMessage = exports.EXTERNAL_VOUCHER_ARTICLE_MESSAGES = exports.EXTERNAL_VOUCHER_TILE_MESSAGES = exports.depositErrorMessage = exports.DEPOSIT_ERROR_MESSAGES = exports.voucherErrorMessage = exports.VOUCHER_ERROR_MESSAGES = exports.cancellationErrorMessage = exports.CANCELLATION_VOUCHER_ERROR_MESSAGES = 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.RECEIPT_OUTPUT_RESULTS = exports.RECEIPT_OUTPUT_KINDS = exports.cashMovementLayout = exports.shiftReceiptLayout = exports.TIP_CLAIM_SCOPES = exports.DIFFERENCE_PART_TYPES = exports.EXPECTED_PART_KEYS = exports.AFTER_COUNT_TYPES = exports.SHIFT_RECEIPT_KINDS = exports.MANUAL_OPENING_REASONS = exports.OPENING_REASONS = void 0;
|
|
8
8
|
/**
|
|
9
9
|
* Kachel-Kasse: Einstellungen, Artikelgruppen/Artikel fuer Kacheln,
|
|
10
10
|
* Rabattverteilung, Drucker, Trinkgeld-Empfaenger, Lager (Standorte, Bestand,
|
|
@@ -19,6 +19,8 @@ Object.defineProperty(exports, "POS_SHORTCUT_DEFAULTS", { enumerable: true, get:
|
|
|
19
19
|
Object.defineProperty(exports, "POS_BUSINESS_DEFAULTS", { enumerable: true, get: function () { return settings_js_1.POS_BUSINESS_DEFAULTS; } });
|
|
20
20
|
Object.defineProperty(exports, "POS_DEVICE_DEFAULTS", { enumerable: true, get: function () { return settings_js_1.POS_DEVICE_DEFAULTS; } });
|
|
21
21
|
Object.defineProperty(exports, "POS_DEVICE_OPTIONAL_FIELDS", { enumerable: true, get: function () { return settings_js_1.POS_DEVICE_OPTIONAL_FIELDS; } });
|
|
22
|
+
Object.defineProperty(exports, "POS_DEVICE_OPTIONAL_SWITCHES", { enumerable: true, get: function () { return settings_js_1.POS_DEVICE_OPTIONAL_SWITCHES; } });
|
|
23
|
+
Object.defineProperty(exports, "posPrinterHint", { enumerable: true, get: function () { return settings_js_1.posPrinterHint; } });
|
|
22
24
|
Object.defineProperty(exports, "POS_BUSINESS_OPTIONAL_FIELDS", { enumerable: true, get: function () { return settings_js_1.POS_BUSINESS_OPTIONAL_FIELDS; } });
|
|
23
25
|
Object.defineProperty(exports, "POS_BUSINESS_OPTIONAL_CHOICES", { enumerable: true, get: function () { return settings_js_1.POS_BUSINESS_OPTIONAL_CHOICES; } });
|
|
24
26
|
Object.defineProperty(exports, "POS_DEVICE_OPTIONAL_CHOICES", { enumerable: true, get: function () { return settings_js_1.POS_DEVICE_OPTIONAL_CHOICES; } });
|
|
@@ -340,6 +340,11 @@ export interface PosDeviceSettings {
|
|
|
340
340
|
drawerId?: string | null;
|
|
341
341
|
/** Breite der rechten Spalte; optional, fehlt sie, gilt `narrow`. Lesen ueber [posCartWidth]. */
|
|
342
342
|
cartWidth?: PosOpen<PosCartWidth>;
|
|
343
|
+
/**
|
|
344
|
+
* Hinweis an den Druckknoepfen, wenn der Drucker auf die Statusabfrage nicht antwortet. Optional: der Server sendet
|
|
345
|
+
* das Feld nur, wenn es gespeichert ist; fehlt es, gilt an. Lesen ueber [posPrinterHint]. Siehe [POS_DEVICE_OPTIONAL_SWITCHES].
|
|
346
|
+
*/
|
|
347
|
+
printerHint?: boolean;
|
|
343
348
|
terminalIp: string;
|
|
344
349
|
terminalPort: number;
|
|
345
350
|
terminalVia: PosOpen<PosTerminalVia>;
|
|
@@ -370,6 +375,12 @@ export declare const POS_DEVICE_DEFAULTS: Readonly<PosDeviceSettings>;
|
|
|
370
375
|
export declare const POS_DEVICE_OPTIONAL_FIELDS: readonly ["drawerId"];
|
|
371
376
|
/** Gilt dieser Wert fuer ein optionales Feld? Lesen: nur eine Kennung; Schreiben: auch `null`. */
|
|
372
377
|
export declare function _optionalerWert(wert: unknown, schreiben: boolean): boolean;
|
|
378
|
+
/**
|
|
379
|
+
* Optionale Geraete-Schalter: ohne Standardwert, der Server sendet sie nur, wenn sie gespeichert sind (Backend
|
|
380
|
+
* `GERAET_OPTIONAL`, Wahrheitswert). [mergePosSettings] uebernimmt sie nur als Wahrheitswert; der Schreibweg nimmt nur
|
|
381
|
+
* `true`/`false`.
|
|
382
|
+
*/
|
|
383
|
+
export declare const POS_DEVICE_OPTIONAL_SWITCHES: readonly ["printerHint"];
|
|
373
384
|
/**
|
|
374
385
|
* Optionale Betriebs-Einstellungen (Schalter): ohne Standardwert, der Server
|
|
375
386
|
* sendet sie nur, wenn sie gespeichert sind (Backend `BETRIEB_OPTIONAL`).
|
|
@@ -402,6 +413,8 @@ export declare function posTipKinds(business: Readonly<Partial<PosBusinessSettin
|
|
|
402
413
|
export declare function posTipStart(business: Readonly<Partial<PosBusinessSettings>> | null | undefined): PosOpen<PosTipKind>;
|
|
403
414
|
/** Wirksame Breite der rechten Spalte; ohne Angabe `narrow`. */
|
|
404
415
|
export declare function posCartWidth(device: Readonly<Partial<PosDeviceSettings>> | null | undefined): PosOpen<PosCartWidth>;
|
|
416
|
+
/** Hinweis „Drucker antwortet nicht“ an den Druckknoepfen an? Fehlt die Einstellung, gilt ja. */
|
|
417
|
+
export declare function posPrinterHint(device: Readonly<Partial<PosDeviceSettings>> | null | undefined): boolean;
|
|
405
418
|
/** Bar-Trinkgeld „gleich behalten“ vorbelegt? Fehlt die Einstellung, gilt aus. */
|
|
406
419
|
export declare function posTipKeptByDefault(business: Readonly<Partial<PosBusinessSettings>> | null | undefined): boolean;
|
|
407
420
|
/** Darf an der Kasse ein eigener Rabatt (Betrag oder Prozent) eingetippt werden? Fehlt die Einstellung, gilt ja. */
|
|
@@ -451,7 +464,7 @@ export declare const _ALTFORM_0X: Readonly<{
|
|
|
451
464
|
* Schluessel, die der Standard nicht fuehrt, bleiben draussen, ausser einer
|
|
452
465
|
* optionalen Geraete-Einstellung ([POS_DEVICE_OPTIONAL_FIELDS]) mit gueltiger
|
|
453
466
|
* Kennung und einem optionalen Betriebs-Schalter
|
|
454
|
-
* ([POS_BUSINESS_OPTIONAL_FIELDS]) als Wahrheitswert.
|
|
467
|
+
* ([POS_BUSINESS_OPTIONAL_FIELDS]) oder Geraete-Schalter ([POS_DEVICE_OPTIONAL_SWITCHES]) als Wahrheitswert.
|
|
455
468
|
*
|
|
456
469
|
* **Immer** (unabhaengig davon, welches Standard-Objekt uebergeben wird, auch
|
|
457
470
|
* eine Kopie oder das einer zweiten Paketkopie) faellt ein Wert der inneren
|
package/dist/cjs/pos/settings.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._ALTFORM_0X = exports.POS_DEVICE_VALUES = exports.POS_BUSINESS_VALUES = exports.POS_DEVICE_OPTIONAL_CHOICES = exports.POS_BUSINESS_OPTIONAL_LISTS = exports.POS_BUSINESS_OPTIONAL_CHOICES = exports.POS_BUSINESS_OPTIONAL_FIELDS = exports.POS_DEVICE_OPTIONAL_FIELDS = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.POS_SHORTCUT_SHARED_PAIRS = exports.POS_SHORTCUT_DEFAULTS = exports.POS_SHORTCUT_ACTIONS = 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.CART_WIDTH = exports.DISCOUNT_PRESET_KIND = exports.TIP_CARD_KEPT_MODE = exports.TIP_KEPT_MODE = exports.TIP_START = exports.TIP_KINDS = exports.TIP_MODE = exports.QUANTITY = exports.WATERMARK = exports.FONT_SIZE = exports.THEME = void 0;
|
|
3
|
+
exports._ALTFORM_0X = exports.POS_DEVICE_VALUES = exports.POS_BUSINESS_VALUES = exports.POS_DEVICE_OPTIONAL_CHOICES = exports.POS_BUSINESS_OPTIONAL_LISTS = exports.POS_BUSINESS_OPTIONAL_CHOICES = exports.POS_BUSINESS_OPTIONAL_FIELDS = exports.POS_DEVICE_OPTIONAL_SWITCHES = exports.POS_DEVICE_OPTIONAL_FIELDS = exports.POS_DEVICE_DEFAULTS = exports.POS_BUSINESS_DEFAULTS = exports.POS_SHORTCUT_SHARED_PAIRS = exports.POS_SHORTCUT_DEFAULTS = exports.POS_SHORTCUT_ACTIONS = 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.CART_WIDTH = exports.DISCOUNT_PRESET_KIND = exports.TIP_CARD_KEPT_MODE = exports.TIP_KEPT_MODE = exports.TIP_START = exports.TIP_KINDS = exports.TIP_MODE = exports.QUANTITY = exports.WATERMARK = exports.FONT_SIZE = exports.THEME = void 0;
|
|
4
4
|
exports.posShortcutConflict = posShortcutConflict;
|
|
5
5
|
exports._optionalerWert = _optionalerWert;
|
|
6
6
|
exports._vorlagenLesen = _vorlagenLesen;
|
|
@@ -8,6 +8,7 @@ exports._optionalerWahlwert = _optionalerWahlwert;
|
|
|
8
8
|
exports.posTipKinds = posTipKinds;
|
|
9
9
|
exports.posTipStart = posTipStart;
|
|
10
10
|
exports.posCartWidth = posCartWidth;
|
|
11
|
+
exports.posPrinterHint = posPrinterHint;
|
|
11
12
|
exports.posTipKeptByDefault = posTipKeptByDefault;
|
|
12
13
|
exports.posCustomDiscountAllowed = posCustomDiscountAllowed;
|
|
13
14
|
exports.posTipKeptMode = posTipKeptMode;
|
|
@@ -239,6 +240,13 @@ function _optionalerWert(wert, schreiben) {
|
|
|
239
240
|
return (schreiben && wert === null) || (typeof wert === 'string' && OPTIONALE_KENNUNG.test(wert));
|
|
240
241
|
}
|
|
241
242
|
const OPTIONALE = new Set(exports.POS_DEVICE_OPTIONAL_FIELDS);
|
|
243
|
+
/**
|
|
244
|
+
* Optionale Geraete-Schalter: ohne Standardwert, der Server sendet sie nur, wenn sie gespeichert sind (Backend
|
|
245
|
+
* `GERAET_OPTIONAL`, Wahrheitswert). [mergePosSettings] uebernimmt sie nur als Wahrheitswert; der Schreibweg nimmt nur
|
|
246
|
+
* `true`/`false`.
|
|
247
|
+
*/
|
|
248
|
+
exports.POS_DEVICE_OPTIONAL_SWITCHES = Object.freeze(['printerHint']);
|
|
249
|
+
const OPTIONALE_GERAETE_SCHALTER = new Set(exports.POS_DEVICE_OPTIONAL_SWITCHES);
|
|
242
250
|
/**
|
|
243
251
|
* Optionale Betriebs-Einstellungen (Schalter): ohne Standardwert, der Server
|
|
244
252
|
* sendet sie nur, wenn sie gespeichert sind (Backend `BETRIEB_OPTIONAL`).
|
|
@@ -306,6 +314,10 @@ function posCartWidth(device) {
|
|
|
306
314
|
const w = device?.cartWidth;
|
|
307
315
|
return typeof w === 'string' && w !== '' ? w : 'narrow';
|
|
308
316
|
}
|
|
317
|
+
/** Hinweis „Drucker antwortet nicht“ an den Druckknoepfen an? Fehlt die Einstellung, gilt ja. */
|
|
318
|
+
function posPrinterHint(device) {
|
|
319
|
+
return device?.printerHint !== false;
|
|
320
|
+
}
|
|
309
321
|
/** Bar-Trinkgeld „gleich behalten“ vorbelegt? Fehlt die Einstellung, gilt aus. */
|
|
310
322
|
function posTipKeptByDefault(business) {
|
|
311
323
|
return !!business && business.tipKeptByDefault === true;
|
|
@@ -420,7 +432,7 @@ exports._ALTFORM_0X = Object.freeze({ werte: ALTWERTE_0X, aktionen: [...ALTAKTIO
|
|
|
420
432
|
* Schluessel, die der Standard nicht fuehrt, bleiben draussen, ausser einer
|
|
421
433
|
* optionalen Geraete-Einstellung ([POS_DEVICE_OPTIONAL_FIELDS]) mit gueltiger
|
|
422
434
|
* Kennung und einem optionalen Betriebs-Schalter
|
|
423
|
-
* ([POS_BUSINESS_OPTIONAL_FIELDS]) als Wahrheitswert.
|
|
435
|
+
* ([POS_BUSINESS_OPTIONAL_FIELDS]) oder Geraete-Schalter ([POS_DEVICE_OPTIONAL_SWITCHES]) als Wahrheitswert.
|
|
424
436
|
*
|
|
425
437
|
* **Immer** (unabhaengig davon, welches Standard-Objekt uebergeben wird, auch
|
|
426
438
|
* eine Kopie oder das einer zweiten Paketkopie) faellt ein Wert der inneren
|
|
@@ -441,6 +453,8 @@ function mergePosSettings(standard, stored) {
|
|
|
441
453
|
out[key] = wert;
|
|
442
454
|
if (OPTIONALE_SCHALTER.has(key) && typeof wert === 'boolean')
|
|
443
455
|
out[key] = wert;
|
|
456
|
+
if (OPTIONALE_GERAETE_SCHALTER.has(key) && typeof wert === 'boolean')
|
|
457
|
+
out[key] = wert;
|
|
444
458
|
if (OPTIONALE_WAHL.has(key) && _optionalerWahlwert(key, wert))
|
|
445
459
|
out[key] = Array.isArray(wert) ? [...wert] : wert;
|
|
446
460
|
if (key === 'discountPresets') {
|