@kreiseck/kasseneck-api 1.36.0 → 1.38.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 +45 -1
- package/README.md +16 -0
- package/dist/cjs/client/aufrufe.d.ts +2 -2
- package/dist/cjs/client/aufrufe.js +5 -0
- package/dist/cjs/client/receipts.d.ts +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +6 -5
- package/dist/cjs/invoice/texte.d.ts +18 -1
- package/dist/cjs/invoice/texte.js +43 -2
- package/dist/cjs/invoice/vertrag.d.ts +1 -1
- package/dist/cjs/invoice/vertrag.js +1 -0
- package/dist/cjs/models/cancellation.d.ts +1 -1
- package/dist/cjs/models/cancellation.js +2 -0
- package/dist/cjs/models/index.d.ts +2 -1
- package/dist/cjs/models/index.js +6 -3
- package/dist/cjs/models/invoice-payment-ref.d.ts +42 -0
- package/dist/cjs/models/invoice-payment-ref.js +38 -0
- package/dist/cjs/models/receipt-item.d.ts +10 -2
- package/dist/cjs/models/receipt-item.js +14 -1
- package/dist/cjs/models/receipt.d.ts +7 -0
- package/dist/cjs/models/receipt.js +6 -0
- package/dist/cjs/payments/hobex-hps/index.d.ts +2 -1
- package/dist/cjs/payments/hobex-hps/index.js +3 -1
- package/dist/cjs/payments/hobex-hps/outcome.d.ts +10 -0
- package/dist/cjs/payments/hobex-hps/payments.d.ts +54 -0
- package/dist/cjs/payments/hobex-hps/payments.js +157 -1
- package/dist/cjs/payments/hobex-hps/support.d.ts +19 -0
- package/dist/cjs/payments/hobex-hps/support.js +22 -0
- package/dist/cjs/payments/hobex-hps/transaction-response.js +1 -1
- package/dist/cjs/payments/index.d.ts +1 -1
- package/dist/cjs/payments/index.js +2 -1
- package/dist/cjs/pos/errors.d.ts +1 -1
- package/dist/cjs/pos/errors.js +1 -0
- package/dist/cjs/pos/index.d.ts +4 -4
- package/dist/cjs/pos/index.js +13 -5
- package/dist/cjs/pos/schicht-lesen.d.ts +3 -1
- package/dist/cjs/pos/schicht-lesen.js +28 -1
- package/dist/cjs/pos/schicht-typen.d.ts +50 -4
- package/dist/cjs/pos/schicht-typen.js +7 -2
- package/dist/cjs/pos/schicht.d.ts +6 -4
- package/dist/cjs/pos/schicht.js +6 -3
- package/dist/cjs/pos/settings.d.ts +37 -8
- package/dist/cjs/pos/settings.js +34 -10
- package/dist/cjs/pos/texte.d.ts +262 -4
- package/dist/cjs/pos/texte.js +157 -7
- package/dist/cjs/pos/trinkgeld.d.ts +30 -0
- package/dist/cjs/pos/trinkgeld.js +30 -0
- package/dist/cjs/receipt/index.d.ts +1 -0
- package/dist/cjs/receipt/index.js +4 -2
- package/dist/cjs/receipt/layout.d.ts +2 -2
- package/dist/cjs/receipt/layout.js +106 -117
- package/dist/cjs/receipt/shift-sheet.js +12 -2
- package/dist/cjs/receipt/vermerke.d.ts +80 -0
- package/dist/cjs/receipt/vermerke.js +167 -0
- package/dist/cjs/register/pairing.d.ts +4 -0
- package/dist/cjs/register/pairing.js +2 -0
- package/dist/cjs/stored/draht.js +25 -1
- package/dist/cjs/stored/vokabular.d.ts +1 -1
- package/dist/cjs/stored/vokabular.js +32 -2
- 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 +5 -0
- package/dist/esm/client/receipts.d.ts +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/invoice/texte.d.ts +18 -1
- package/dist/esm/invoice/texte.js +43 -2
- package/dist/esm/invoice/vertrag.d.ts +1 -1
- package/dist/esm/invoice/vertrag.js +1 -0
- package/dist/esm/models/cancellation.d.ts +1 -1
- package/dist/esm/models/cancellation.js +2 -0
- package/dist/esm/models/index.d.ts +2 -1
- package/dist/esm/models/index.js +2 -1
- package/dist/esm/models/invoice-payment-ref.d.ts +42 -0
- package/dist/esm/models/invoice-payment-ref.js +35 -0
- package/dist/esm/models/receipt-item.d.ts +10 -2
- package/dist/esm/models/receipt-item.js +13 -1
- package/dist/esm/models/receipt.d.ts +7 -0
- package/dist/esm/models/receipt.js +6 -0
- package/dist/esm/payments/hobex-hps/index.d.ts +2 -1
- package/dist/esm/payments/hobex-hps/index.js +1 -0
- package/dist/esm/payments/hobex-hps/outcome.d.ts +10 -0
- package/dist/esm/payments/hobex-hps/payments.d.ts +54 -0
- package/dist/esm/payments/hobex-hps/payments.js +158 -2
- package/dist/esm/payments/hobex-hps/support.d.ts +19 -0
- package/dist/esm/payments/hobex-hps/support.js +19 -0
- package/dist/esm/payments/hobex-hps/transaction-response.js +1 -1
- package/dist/esm/payments/index.d.ts +1 -1
- package/dist/esm/payments/index.js +1 -1
- package/dist/esm/pos/errors.d.ts +1 -1
- package/dist/esm/pos/errors.js +1 -0
- package/dist/esm/pos/index.d.ts +4 -4
- package/dist/esm/pos/index.js +5 -5
- package/dist/esm/pos/schicht-lesen.d.ts +3 -1
- package/dist/esm/pos/schicht-lesen.js +27 -1
- package/dist/esm/pos/schicht-typen.d.ts +50 -4
- package/dist/esm/pos/schicht-typen.js +6 -1
- package/dist/esm/pos/schicht.d.ts +6 -4
- package/dist/esm/pos/schicht.js +6 -3
- package/dist/esm/pos/settings.d.ts +37 -8
- package/dist/esm/pos/settings.js +30 -9
- package/dist/esm/pos/texte.d.ts +262 -4
- package/dist/esm/pos/texte.js +156 -6
- package/dist/esm/pos/trinkgeld.d.ts +30 -0
- package/dist/esm/pos/trinkgeld.js +28 -0
- package/dist/esm/receipt/index.d.ts +1 -0
- package/dist/esm/receipt/index.js +1 -0
- package/dist/esm/receipt/layout.d.ts +2 -2
- package/dist/esm/receipt/layout.js +103 -113
- package/dist/esm/receipt/shift-sheet.js +12 -2
- package/dist/esm/receipt/vermerke.d.ts +80 -0
- package/dist/esm/receipt/vermerke.js +155 -0
- package/dist/esm/register/pairing.d.ts +4 -0
- package/dist/esm/register/pairing.js +2 -0
- package/dist/esm/stored/draht.js +25 -1
- package/dist/esm/stored/vokabular.d.ts +1 -1
- package/dist/esm/stored/vokabular.js +32 -2
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/duplicate-cases.json +1 -1
- package/fixtures/expected/duplicate.shift-close.hex +1 -1
- package/fixtures/expected/invoice-payment-cancellation.grid32.txt +28 -0
- package/fixtures/expected/invoice-payment-cancellation.grid48.txt +26 -0
- package/fixtures/expected/invoice-payment-cancellation.lines.json +189 -0
- package/fixtures/expected/invoice-payment-cancellation.sheet32.json +194 -0
- package/fixtures/expected/invoice-payment-cancellation.sheet48.json +182 -0
- package/fixtures/expected/invoice-payment-manual-receipt.grid32.txt +30 -0
- package/fixtures/expected/invoice-payment-manual-receipt.grid48.txt +29 -0
- package/fixtures/expected/invoice-payment-manual-receipt.lines.json +199 -0
- package/fixtures/expected/invoice-payment-manual-receipt.sheet32.json +206 -0
- package/fixtures/expected/invoice-payment-manual-receipt.sheet48.json +200 -0
- package/fixtures/expected/invoice-payment-normal.grid32.txt +22 -0
- package/fixtures/expected/invoice-payment-normal.grid48.txt +21 -0
- package/fixtures/expected/invoice-payment-normal.lines.json +192 -0
- package/fixtures/expected/invoice-payment-normal.sheet32.json +158 -0
- package/fixtures/expected/invoice-payment-normal.sheet48.json +152 -0
- package/fixtures/expected/invoice-payment-outage.grid32.txt +23 -0
- package/fixtures/expected/invoice-payment-outage.grid48.txt +21 -0
- package/fixtures/expected/invoice-payment-outage.lines.json +172 -0
- package/fixtures/expected/invoice-payment-outage.sheet32.json +164 -0
- package/fixtures/expected/invoice-payment-outage.sheet48.json +152 -0
- package/fixtures/expected/invoice-payment-partial.grid32.txt +20 -0
- package/fixtures/expected/invoice-payment-partial.grid48.txt +20 -0
- package/fixtures/expected/invoice-payment-partial.lines.json +162 -0
- package/fixtures/expected/invoice-payment-partial.sheet32.json +146 -0
- package/fixtures/expected/invoice-payment-partial.sheet48.json +146 -0
- package/fixtures/expected/invoice-payment-refund.grid32.txt +20 -0
- package/fixtures/expected/invoice-payment-refund.grid48.txt +20 -0
- package/fixtures/expected/invoice-payment-refund.lines.json +162 -0
- package/fixtures/expected/invoice-payment-refund.sheet32.json +146 -0
- package/fixtures/expected/invoice-payment-refund.sheet48.json +146 -0
- package/fixtures/expected/invoice-payment-see-invoice.grid32.txt +22 -0
- package/fixtures/expected/invoice-payment-see-invoice.grid48.txt +21 -0
- package/fixtures/expected/invoice-payment-see-invoice.lines.json +192 -0
- package/fixtures/expected/invoice-payment-see-invoice.sheet32.json +158 -0
- package/fixtures/expected/invoice-payment-see-invoice.sheet48.json +152 -0
- package/fixtures/expected/invoice-payment-training.grid32.txt +30 -0
- package/fixtures/expected/invoice-payment-training.grid48.txt +27 -0
- package/fixtures/expected/invoice-payment-training.lines.json +183 -0
- package/fixtures/expected/invoice-payment-training.sheet32.json +206 -0
- package/fixtures/expected/invoice-payment-training.sheet48.json +188 -0
- package/fixtures/expected/invoice-payment-without-vat.grid32.txt +20 -0
- package/fixtures/expected/invoice-payment-without-vat.grid48.txt +19 -0
- package/fixtures/expected/invoice-payment-without-vat.lines.json +162 -0
- package/fixtures/expected/invoice-payment-without-vat.sheet32.json +146 -0
- package/fixtures/expected/invoice-payment-without-vat.sheet48.json +140 -0
- package/fixtures/expected/invoice-payment-zero-percent.grid32.txt +22 -0
- package/fixtures/expected/invoice-payment-zero-percent.grid48.txt +21 -0
- package/fixtures/expected/invoice-payment-zero-percent.lines.json +192 -0
- package/fixtures/expected/invoice-payment-zero-percent.sheet32.json +158 -0
- package/fixtures/expected/invoice-payment-zero-percent.sheet48.json +152 -0
- package/fixtures/expected/shift-close-card-tips.grid32.txt +44 -0
- package/fixtures/expected/shift-close-card-tips.grid48.txt +40 -0
- package/fixtures/expected/shift-close-card-tips.lines.json +479 -0
- package/fixtures/expected/shift-close-put-in.grid32.txt +1 -1
- package/fixtures/expected/shift-close-put-in.grid48.txt +1 -1
- package/fixtures/expected/shift-close-put-in.lines.json +1 -1
- package/fixtures/expected/shift-close-take-out.grid32.txt +1 -1
- package/fixtures/expected/shift-close-take-out.grid48.txt +1 -1
- package/fixtures/expected/shift-close-take-out.lines.json +1 -1
- package/fixtures/expected/shift-close.grid32.txt +1 -1
- package/fixtures/expected/shift-close.grid48.txt +1 -1
- package/fixtures/expected/shift-close.lines.json +1 -1
- package/fixtures/expected/shift-interim-card-tips.grid32.txt +34 -0
- package/fixtures/expected/shift-interim-card-tips.grid48.txt +31 -0
- package/fixtures/expected/shift-interim-card-tips.lines.json +344 -0
- package/fixtures/hobex-hps-codes.json +2 -2
- package/fixtures/invoice-api.schema.json +3 -2
- package/fixtures/invoice-texts.json +37 -3
- package/fixtures/manifest.json +80 -0
- package/fixtures/pos-message-cases.json +3 -0
- package/fixtures/pos-texts.json +313 -3
- package/fixtures/receipt-due-generated.json +3 -3
- package/fixtures/receipt-due-voucher-generated.json +5 -5
- package/fixtures/receipts/invoice-payment-cancellation.json +70 -0
- package/fixtures/receipts/invoice-payment-manual-receipt.json +69 -0
- package/fixtures/receipts/invoice-payment-normal.json +65 -0
- package/fixtures/receipts/invoice-payment-outage.json +63 -0
- package/fixtures/receipts/invoice-payment-partial.json +63 -0
- package/fixtures/receipts/invoice-payment-refund.json +63 -0
- package/fixtures/receipts/invoice-payment-see-invoice.json +65 -0
- package/fixtures/receipts/invoice-payment-training.json +63 -0
- package/fixtures/receipts/invoice-payment-without-vat.json +63 -0
- package/fixtures/receipts/invoice-payment-zero-percent.json +65 -0
- package/fixtures/renames-1.0.json +10 -0
- package/fixtures/shift-ablauf-cases.json +4 -4
- package/fixtures/shift-cases.json +4 -2
- package/fixtures/shift-receipts-card-tips.json +73 -0
- package/fixtures/shift-receipts.json +9 -9
- package/fixtures/stored/card-tip-cases.json +132 -0
- package/fixtures/surface.json +23 -6
- package/fixtures/v3/antworten/belege.json +2 -2
- package/fixtures/v3/antworten/belegmail.json +2 -2
- package/fixtures/v3/antworten/berichte.json +2 -2
- package/fixtures/v3/antworten/kasse-belege.json +2 -2
- package/fixtures/v3/antworten/kasse.json +247 -127
- package/fixtures/v3/antworten/lager.json +1 -1
- package/fixtures/v3/antworten/rechnungen.json +2 -2
- package/fixtures/v3/antworten/storno.json +2 -2
- package/fixtures/v3/stored/belege.json +2 -2
- package/fixtures/v3/stored/kasse.json +3 -3
- package/fixtures/v3/stored/rechnungen.json +2 -2
- package/fixtures/v3/v3-vokabular.json +264 -21
- package/fixtures/v3/zahlbetrag-faelle.json +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SIGNATUR_AUSGEFALLEN = exports.TESTSIGNATUR_TEXT = exports.TESTKASSE_TEXT = void 0;
|
|
4
|
+
exports.receiptSignatureFailed = receiptSignatureFailed;
|
|
5
|
+
exports.belegtyp = belegtyp;
|
|
6
|
+
exports.testkasseVermerk = testkasseVermerk;
|
|
7
|
+
exports.testsignaturVermerk = testsignaturVermerk;
|
|
8
|
+
exports.trainingVermerk = trainingVermerk;
|
|
9
|
+
exports.stornoVermerk = stornoVermerk;
|
|
10
|
+
exports.nacherfassungTeile = nacherfassungTeile;
|
|
11
|
+
exports.signaturausfallVermerk = signaturausfallVermerk;
|
|
12
|
+
exports.receiptNotes = receiptNotes;
|
|
13
|
+
const index_js_1 = require("../models/index.js");
|
|
14
|
+
const vienna_time_js_1 = require("../vienna-time.js");
|
|
15
|
+
const errors_js_1 = require("../client/errors.js");
|
|
16
|
+
// ------------------------------------------------------------------- Texte
|
|
17
|
+
exports.TESTKASSE_TEXT = 'TESTKASSE — kein gültiger Beleg';
|
|
18
|
+
exports.TESTSIGNATUR_TEXT = 'TESTSIGNATUR — kein gültiger Beleg';
|
|
19
|
+
/** Text, den das Backend statt einer Signatur ablegt, wenn die Karte ausfaellt. */
|
|
20
|
+
exports.SIGNATUR_AUSGEFALLEN = 'Sicherheitseinrichtung ausgefallen';
|
|
21
|
+
/**
|
|
22
|
+
* Derselbe Text base64url-kodiert -- so steht er als dritter JWS-Teil im Feld
|
|
23
|
+
* `sig` (Zwilling von `RKSVService.isSigSuccess`). Fest hinterlegt statt zur
|
|
24
|
+
* Laufzeit kodiert: `btoa`/`Buffer` sind in Browser und Node verschieden zu
|
|
25
|
+
* haben, und der Wert ist unveraenderlich.
|
|
26
|
+
*/
|
|
27
|
+
const SIGNATUR_AUSGEFALLEN_BASE64URL = 'U2ljaGVyaGVpdHNlaW5yaWNodHVuZyBhdXNnZWZhbGxlbg';
|
|
28
|
+
/** Erklaerung am Trainingsbeleg (Wortlaut mit dem Betreiber abgestimmt). */
|
|
29
|
+
const TRAINING_ERKLAERUNG = [
|
|
30
|
+
'Trainingsbuchung — kein Kauf, keine Zahlung, keine steuerliche Buchung.',
|
|
31
|
+
'Sollten Sie diesen Beleg als Kunde erhalten haben, sagen Sie bitte dem Betrieb Bescheid.',
|
|
32
|
+
];
|
|
33
|
+
/** Grund-Zeile nach einem Ausfall der Kasse; `other` druckt den eigenen Text. */
|
|
34
|
+
const NACHERFASSUNG_GRUND = {
|
|
35
|
+
network_outage: 'Internet', power_outage: 'Strom', device_failure: 'Gerät defekt', system_outage: 'Störung',
|
|
36
|
+
};
|
|
37
|
+
// ------------------------------------------------------------ Hilfsregeln
|
|
38
|
+
/** Wurde der Beleg ohne funktionierende Signatureinheit ausgestellt? */
|
|
39
|
+
function receiptSignatureFailed(receipt) {
|
|
40
|
+
return receipt.sig.split('.')[2] === SIGNATUR_AUSGEFALLEN_BASE64URL;
|
|
41
|
+
}
|
|
42
|
+
/** Belegtyp als Zeichenkette (Enum-Objekt oder roher Serverwert). */
|
|
43
|
+
function belegtyp(receipt) {
|
|
44
|
+
return typeof receipt.receiptType === 'object' ? receipt.receiptType.value : String(receipt.receiptType ?? '');
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Datum des stornierten Originals: „11.08.2026, 09:02 Uhr". Ein unlesbarer
|
|
48
|
+
* Zeitstempel am BEZUG ist kein Grund, den Storno-Bon zu verweigern (der
|
|
49
|
+
* Beleg selbst ist gueltig) -- dann bleibt die Zeile weg.
|
|
50
|
+
*/
|
|
51
|
+
function originalDatum(timeStamp) {
|
|
52
|
+
try {
|
|
53
|
+
const t = (0, vienna_time_js_1.toViennaWallClock)((0, vienna_time_js_1.parseServerTimeStamp)(timeStamp));
|
|
54
|
+
const zwei = (n) => String(n).padStart(2, '0');
|
|
55
|
+
return `${zwei(t.day)}.${zwei(t.month)}.${t.year}, ${zwei(t.hour)}:${zwei(t.minute)} Uhr`;
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Grund eines Stornos lesbar -- aus dem EINEN Katalog des Modells
|
|
63
|
+
* (`CANCELLATION_REASONS`, derselbe, den die Kasse anbietet und das Backend
|
|
64
|
+
* annimmt). Unbekannter Code (Fremdclient): sichtbar, aber ohne zu werfen.
|
|
65
|
+
*/
|
|
66
|
+
function stornoGrundText(code) {
|
|
67
|
+
if (!code)
|
|
68
|
+
return null;
|
|
69
|
+
return (0, index_js_1.isCancellationReason)(code) ? index_js_1.CANCELLATION_REASONS[code] : code;
|
|
70
|
+
}
|
|
71
|
+
/** `YYYY-MM-DD` als `TT.MM.JJJJ`; anderes bleibt, wie es kam. */
|
|
72
|
+
function handbelegDatum(tag) {
|
|
73
|
+
const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(tag);
|
|
74
|
+
return m ? `${m[3]}.${m[2]}.${m[1]}` : tag;
|
|
75
|
+
}
|
|
76
|
+
// ---------------------------------------------------------------- Bausteine
|
|
77
|
+
function testkasseVermerk() {
|
|
78
|
+
return { kind: 'test_cashregister', title: exports.TESTKASSE_TEXT, lines: [] };
|
|
79
|
+
}
|
|
80
|
+
function testsignaturVermerk() {
|
|
81
|
+
return { kind: 'test_signature', title: exports.TESTSIGNATUR_TEXT, lines: [] };
|
|
82
|
+
}
|
|
83
|
+
/** Trainingsbeleg: Titel und Erklaerung; sonst `null`. */
|
|
84
|
+
function trainingVermerk(receipt) {
|
|
85
|
+
return belegtyp(receipt) === 'training' ? { kind: 'training', title: 'TRAININGSBELEG', lines: [...TRAINING_ERKLAERUNG] } : null;
|
|
86
|
+
}
|
|
87
|
+
/** Stornobeleg: Bezug, Datum des Originals (wenn der Bezug es traegt, Backend seit 2026-09-04) und Grund; sonst `null`. */
|
|
88
|
+
function stornoVermerk(receipt) {
|
|
89
|
+
if (belegtyp(receipt) !== 'cancellation')
|
|
90
|
+
return null;
|
|
91
|
+
const zeilen = [receipt.cancellationOf ? `Stornobuchung zu Beleg ${receipt.cancellationOf.receiptId}` : 'Stornobuchung'];
|
|
92
|
+
const datum = receipt.cancellationOf?.timeStamp ? originalDatum(receipt.cancellationOf.timeStamp) : null;
|
|
93
|
+
if (datum)
|
|
94
|
+
zeilen.push(`vom ${datum}`);
|
|
95
|
+
const grund = stornoGrundText(typeof receipt.cancellationReason === 'string' ? receipt.cancellationReason : undefined);
|
|
96
|
+
if (grund)
|
|
97
|
+
zeilen.push(`Grund: ${grund}`);
|
|
98
|
+
return { kind: 'cancellation', title: 'STORNOBELEG', lines: zeilen };
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Nacherfassung eines Handbelegs (manualReceipt): Art, Grund, Nummer und Tag
|
|
102
|
+
* des Handbelegs bzw. der Handbelege eines Tagessammelbelegs. Ohne Handbeleg `null`.
|
|
103
|
+
*/
|
|
104
|
+
function nacherfassungTeile(receipt) {
|
|
105
|
+
const m = receipt.manualReceipt;
|
|
106
|
+
if (!m)
|
|
107
|
+
return null;
|
|
108
|
+
const anlass = [m.reason === 'outside_premises' ? 'Leistung außer Haus' : 'nach Ausfall der Kasse'];
|
|
109
|
+
const grund = m.reason === 'other' ? m.note : NACHERFASSUNG_GRUND[m.reason];
|
|
110
|
+
if (grund)
|
|
111
|
+
anlass.push(`Grund: ${grund}`);
|
|
112
|
+
const tag = handbelegDatum(m.date);
|
|
113
|
+
if (m.numberTo) {
|
|
114
|
+
return {
|
|
115
|
+
title: 'NACHERFASSUNG',
|
|
116
|
+
anlass,
|
|
117
|
+
handbeleg: ['Tagessammelbeleg', `Handbelege Nr. ${m.number} bis ${m.numberTo}`, `${m.count ? `${m.count} Belege ` : ''}vom ${tag}`],
|
|
118
|
+
ustHinweis: 'USt: Duplikat der Handbelege',
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
title: 'NACHERFASSUNG',
|
|
123
|
+
anlass,
|
|
124
|
+
handbeleg: [`Handbeleg Nr. ${m.number}`, `vom ${tag}${m.time ? `, ${m.time} Uhr` : ''}`],
|
|
125
|
+
ustHinweis: 'USt: Duplikat des Handbelegs',
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/** Signaturausfall (§ 17 Abs. 4 RKSV): der Vermerk ohne Zeilen; sonst `null`. */
|
|
129
|
+
function signaturausfallVermerk(receipt) {
|
|
130
|
+
return receiptSignatureFailed(receipt) ? { kind: 'signature_outage', title: exports.SIGNATUR_AUSGEFALLEN, lines: [] } : null;
|
|
131
|
+
}
|
|
132
|
+
// ------------------------------------------------------------------ Ausgabe
|
|
133
|
+
const OPTIONEN = new Set(['testCashregister', 'testSignature']);
|
|
134
|
+
const OPTIONEN_ALT = { testKasse: 'testCashregister', testSignatur: 'testSignature' };
|
|
135
|
+
/**
|
|
136
|
+
* Die Vermerke eines Belegs in fester Reihenfolge: Testkasse, Testsignatur,
|
|
137
|
+
* Training, Storno, Nacherfassung, Signaturausfall. Ein gewoehnlicher Beleg
|
|
138
|
+
* hat keine (`[]`).
|
|
139
|
+
*
|
|
140
|
+
* Ob Testkasse oder Testsignatur, weiss nur der Aufrufer (er kennt das Konto),
|
|
141
|
+
* wie bei [buildReceiptLayout]. Eine unbekannte Option wirft
|
|
142
|
+
* (`KasseneckValidationError`, `scope: 'request'`): eine alte deutsche
|
|
143
|
+
* (`testKasse`) darf nie still wegfallen, sonst saehe ein Testbeleg gueltig aus.
|
|
144
|
+
*
|
|
145
|
+
* Firmendaten kennt diese Ausgabe nicht; der USt-Hinweis der Nacherfassung
|
|
146
|
+
* („USt: Duplikat …“) gehoert darum nicht zum Vermerk (siehe [NacherfassungTeile]).
|
|
147
|
+
*/
|
|
148
|
+
function receiptNotes(receipt, options = {}) {
|
|
149
|
+
for (const name of Object.keys(options)) {
|
|
150
|
+
if (OPTIONEN.has(name))
|
|
151
|
+
continue;
|
|
152
|
+
const neu = OPTIONEN_ALT[name];
|
|
153
|
+
throw new errors_js_1.KasseneckValidationError('receiptNotes', neu !== undefined ? `Option "${name}" heisst "${neu}"` : `Unbekannte Option "${name}"`, 'request');
|
|
154
|
+
}
|
|
155
|
+
const vermerke = [
|
|
156
|
+
options.testCashregister ? testkasseVermerk() : null,
|
|
157
|
+
options.testSignature ? testsignaturVermerk() : null,
|
|
158
|
+
trainingVermerk(receipt),
|
|
159
|
+
stornoVermerk(receipt),
|
|
160
|
+
(() => {
|
|
161
|
+
const teile = nacherfassungTeile(receipt);
|
|
162
|
+
return teile ? { kind: 'manual_receipt', title: teile.title, lines: [...teile.anlass, ...teile.handbeleg] } : null;
|
|
163
|
+
})(),
|
|
164
|
+
signaturausfallVermerk(receipt),
|
|
165
|
+
];
|
|
166
|
+
return vermerke.filter((v) => v !== null);
|
|
167
|
+
}
|
|
@@ -144,12 +144,16 @@ export interface RegisterDeviceUsers {
|
|
|
144
144
|
* statt an createReceipt zu scheitern. Fehlt das Feld, gilt bereit.
|
|
145
145
|
* `stockLocationId`: Lager-Standort der Kasse, fehlt = Standard-Standort.
|
|
146
146
|
* `deposit`: Pfand & Leergut der Kasse (Ruecknahme, Vorgaben); fehlt, solange der Betrieb kein Pfand eingeschaltet hat.
|
|
147
|
+
* `cardTips`: Kartentrinkgeld laeuft an diesem Konto ueber die Kasse (Spec 2026-11-11-kartentrinkgeld, § 7): die
|
|
148
|
+
* Kasse zeigt die Karten-Stufe, die Trinkgeld-Zeile nach dem Kassieren und „Mein Trinkgeld“. Nur `true`, sonst fehlt
|
|
149
|
+
* es -- ohne bleibt die Kasse genau wie bisher.
|
|
147
150
|
*/
|
|
148
151
|
cashregister?: {
|
|
149
152
|
ready: boolean;
|
|
150
153
|
reason?: string | null;
|
|
151
154
|
stockLocationId?: string;
|
|
152
155
|
deposit?: CashRegisterDeposit;
|
|
156
|
+
cardTips?: true;
|
|
153
157
|
};
|
|
154
158
|
/** Das Geraet haengt an der Test-Umgebung des Betriebs. */
|
|
155
159
|
testEnvironment: boolean;
|
|
@@ -257,6 +257,8 @@ function kasseBereit(wert) {
|
|
|
257
257
|
reason: typeof roh['reason'] === 'string' ? roh['reason'] : null,
|
|
258
258
|
...(typeof standort === 'string' && standort !== '' ? { stockLocationId: standort } : {}),
|
|
259
259
|
...((0, pfand_js_1.cashRegisterDepositFromWire)(roh['deposit']) ? { deposit: (0, pfand_js_1.cashRegisterDepositFromWire)(roh['deposit']) } : {}),
|
|
260
|
+
// Nur ein echtes `true` schaltet die Oberflaeche um; alles andere (fehlt, false, Muell) laesst sie wie bisher.
|
|
261
|
+
...(roh['cardTips'] === true ? { cardTips: true } : {}),
|
|
260
262
|
};
|
|
261
263
|
}
|
|
262
264
|
/** Die Regel aus der Antwort — oder `null`, wenn keine brauchbare kommt. */
|
package/dist/cjs/stored/draht.js
CHANGED
|
@@ -246,6 +246,30 @@ function _storedReceiptInner(doc, functionName) {
|
|
|
246
246
|
function pruefangabenDerHuelle(p) {
|
|
247
247
|
return { karteRegistriertAm: alsIso(p.karteRegistriertAm), kasseRegistriertAm: alsIso(p.kasseRegistriertAm) };
|
|
248
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* Steuerhinweis der Zahlung auf Rechnung: innen `steuerhinweis` (`inkl_ust` | `null_prozent` | `siehe_rechnung`),
|
|
251
|
+
* aussen `taxNote` (`incl_vat` | `zero_percent` | `see_invoice`). Der Vertrags-Export kennt die Umbenennung und den
|
|
252
|
+
* Wertekatalog inzwischen; diese Zeile bleibt trotzdem, weil sie bewusst deutsche UND englische Werte annimmt
|
|
253
|
+
* (Huellen kommen innen wie aussen vor). Ein anderer oder fehlender Wert ergibt keinen Hinweis; das alte Feld
|
|
254
|
+
* `includesVat` faellt weg.
|
|
255
|
+
*/
|
|
256
|
+
const STEUERHINWEIS_AUSSEN = {
|
|
257
|
+
inkl_ust: 'incl_vat', null_prozent: 'zero_percent', siehe_rechnung: 'see_invoice',
|
|
258
|
+
incl_vat: 'incl_vat', zero_percent: 'zero_percent', see_invoice: 'see_invoice',
|
|
259
|
+
};
|
|
260
|
+
function rechnungszahlungNachAussen(beleg) {
|
|
261
|
+
if (!Array.isArray(beleg.invoicePayments))
|
|
262
|
+
return beleg;
|
|
263
|
+
const invoicePayments = beleg.invoicePayments.map((e) => {
|
|
264
|
+
if (!(0, exports.istObjekt)(e))
|
|
265
|
+
return e;
|
|
266
|
+
const { steuerhinweis, taxNote, includesVat: _alt, ...rest } = e;
|
|
267
|
+
const roh = steuerhinweis ?? taxNote;
|
|
268
|
+
const aussen = typeof roh === 'string' && (0, exports.hat)(STEUERHINWEIS_AUSSEN, roh) ? STEUERHINWEIS_AUSSEN[roh] : undefined;
|
|
269
|
+
return aussen === undefined ? rest : { ...rest, taxNote: aussen };
|
|
270
|
+
});
|
|
271
|
+
return { ...beleg, invoicePayments };
|
|
272
|
+
}
|
|
249
273
|
/**
|
|
250
274
|
* Eine Beleg-Huelle der inneren Form (`receipt`, Betriebsfelder, `kopfId`,
|
|
251
275
|
* `pruefangaben`, `testKasse` ...) in die Drahtform von `getReceipt` unter
|
|
@@ -254,7 +278,7 @@ function pruefangabenDerHuelle(p) {
|
|
|
254
278
|
function _receiptEnvelopeToWire(huelle) {
|
|
255
279
|
const schema = vokabular_js_1.SCHEMAS.getReceipt;
|
|
256
280
|
const draht = werteNachAussen(schluesselNachAussen(huelle, schema.data), schema.werte);
|
|
257
|
-
return (0, exports.istObjekt)(draht.receipt) ? { ...draht, receipt: belegGutscheineNachAussen(belegRueckgabeNachAussen(draht.receipt)) } : draht;
|
|
281
|
+
return (0, exports.istObjekt)(draht.receipt) ? { ...draht, receipt: rechnungszahlungNachAussen(belegGutscheineNachAussen(belegRueckgabeNachAussen(draht.receipt))) } : draht;
|
|
258
282
|
}
|
|
259
283
|
/**
|
|
260
284
|
* Ein Belegdokument (`users/{uid}/cashregisters/{id}/receipts/{id}`) in der
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
|
|
2
|
-
export declare const VOKABULAR_QUELLE = "
|
|
2
|
+
export declare const VOKABULAR_QUELLE = "7e41f406752cf109d3809bd187db0dfccceafbc3c9d88305edf32c98d57bced3";
|
|
3
3
|
/** Schema-Notation des Vertrags: Blatt 'aussen': 'innen', Objekt { __: 'innen', ... }, Liste [ { __: 'innen', ... } ]. */
|
|
4
4
|
export type SchemaEintrag = string | SchemaObjekt | readonly [SchemaObjekt];
|
|
5
5
|
export interface SchemaObjekt {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.ZUSATZ_KATALOGE = exports.KATALOGE = exports.ARTIKEL_FELDER = exports.SCHEMAS = exports.VOKABULAR_QUELLE = void 0;
|
|
6
6
|
/** Fingerabdruck des Vertrags-Exports, aus dem diese Datei stammt (`_quelle.sha256`). */
|
|
7
|
-
exports.VOKABULAR_QUELLE = "
|
|
7
|
+
exports.VOKABULAR_QUELLE = "7e41f406752cf109d3809bd187db0dfccceafbc3c9d88305edf32c98d57bced3";
|
|
8
8
|
/** Schema je Endpunkt (aussen -> innen) und Wertverweise auf die Kataloge. */
|
|
9
9
|
exports.SCHEMAS = {
|
|
10
10
|
"getReceipt": {
|
|
@@ -45,7 +45,18 @@ exports.SCHEMAS = {
|
|
|
45
45
|
"sharedReturnPoint": {
|
|
46
46
|
"__": "pfandStelle",
|
|
47
47
|
"address": "adresse"
|
|
48
|
-
}
|
|
48
|
+
},
|
|
49
|
+
"invoicePayments": [
|
|
50
|
+
{
|
|
51
|
+
"__": "rechnungszahlung",
|
|
52
|
+
"invoiceNumber": "nummer",
|
|
53
|
+
"customerId": "kundeId",
|
|
54
|
+
"amountCents": "betragCents",
|
|
55
|
+
"partial": "teil",
|
|
56
|
+
"paidOn": "zahlungVom",
|
|
57
|
+
"taxNote": "steuerhinweis"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
49
60
|
},
|
|
50
61
|
"taxNumber": "taxnr",
|
|
51
62
|
"vatId": "uid",
|
|
@@ -115,6 +126,9 @@ exports.SCHEMAS = {
|
|
|
115
126
|
"receipt.items[].depositKind": {
|
|
116
127
|
"$catalog": "PFAND_ART"
|
|
117
128
|
},
|
|
129
|
+
"receipt.invoicePayments[].taxNote": {
|
|
130
|
+
"$catalog": "RECHNUNGSZAHLUNG_STEUERHINWEIS"
|
|
131
|
+
},
|
|
118
132
|
"issuedVouchers[].type": {
|
|
119
133
|
"$catalog": "GUTSCHEIN_ART"
|
|
120
134
|
},
|
|
@@ -173,6 +187,9 @@ exports.SCHEMAS = {
|
|
|
173
187
|
"tipKeptMode": "tgDirektModus",
|
|
174
188
|
"tipKinds": "tgArten",
|
|
175
189
|
"tipStart": "tgStart",
|
|
190
|
+
"tipCardKeptByDefault": "tgKarteDirekt",
|
|
191
|
+
"tipCardKeptMode": "tgKarteModus",
|
|
192
|
+
"tipSelfPayout": "tgSelbstAuszahlen",
|
|
176
193
|
"checkoutMode": "kassierenModus",
|
|
177
194
|
"receiptOutput": "belegAusgabe",
|
|
178
195
|
"doneScreenSeconds": "fertigSekunden",
|
|
@@ -389,6 +406,9 @@ exports.SCHEMAS = {
|
|
|
389
406
|
"business.tipKeptMode": {
|
|
390
407
|
"$catalog": "KASSE_BETRIEB_WERTE.tipKeptMode"
|
|
391
408
|
},
|
|
409
|
+
"business.tipCardKeptMode": {
|
|
410
|
+
"$catalog": "KASSE_BETRIEB_WERTE.tipCardKeptMode"
|
|
411
|
+
},
|
|
392
412
|
"business.discountPresets[].kind": {
|
|
393
413
|
"$catalog": "KASSE_BETRIEB_WERTE.discountPresets[].kind"
|
|
394
414
|
},
|
|
@@ -757,6 +777,11 @@ exports.KATALOGE = {
|
|
|
757
777
|
"streifen": "stripe",
|
|
758
778
|
"voll": "full"
|
|
759
779
|
},
|
|
780
|
+
"KASSE_BETRIEB_WERTE.tipCardKeptMode": {
|
|
781
|
+
"fragen": "ask",
|
|
782
|
+
"immer": "always",
|
|
783
|
+
"nie": "never"
|
|
784
|
+
},
|
|
760
785
|
"KASSE_BETRIEB_WERTE.tipKeptMode": {
|
|
761
786
|
"fragen": "ask",
|
|
762
787
|
"immer": "always",
|
|
@@ -845,6 +870,11 @@ exports.KATALOGE = {
|
|
|
845
870
|
"glas": "glass",
|
|
846
871
|
"sonstiges": "other"
|
|
847
872
|
},
|
|
873
|
+
"RECHNUNGSZAHLUNG_STEUERHINWEIS": {
|
|
874
|
+
"inkl_ust": "incl_vat",
|
|
875
|
+
"null_prozent": "zero_percent",
|
|
876
|
+
"siehe_rechnung": "see_invoice"
|
|
877
|
+
},
|
|
848
878
|
"REFERENZ_STUFE": {
|
|
849
879
|
"fragen": "optional",
|
|
850
880
|
"pflicht": "required"
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
|
@@ -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", "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", "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"];
|
|
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"];
|
|
33
33
|
export type PublicCall = typeof PUBLIC_CALLS[number];
|
|
34
34
|
export type PosCall = typeof POS_CALLS[number];
|
|
35
35
|
/**
|
|
@@ -154,6 +154,8 @@ export const ALL_CALLS = [
|
|
|
154
154
|
// Leergut-Codes (Pfand, ./pos): Codes lernen und lesen; nur ueber den Kassenweg.
|
|
155
155
|
'learnMyLeergutCode',
|
|
156
156
|
'listMyLeergutCodes',
|
|
157
|
+
// „Mein Trinkgeld“ (./pos): Stand der angemeldeten Person; nur ueber den Kassenweg.
|
|
158
|
+
'getMyTipBalance',
|
|
157
159
|
// Kartenterminal am Handy: Geraet, Zugang, TID und Code (nur /v3).
|
|
158
160
|
'registerTerminalDevice',
|
|
159
161
|
'getTerminalAccess',
|
|
@@ -384,6 +386,8 @@ export const POS_CALLS = [
|
|
|
384
386
|
// Leergut-Codes lernen und lesen: Kassen-Benutzer mit dem Recht depositReturn.
|
|
385
387
|
'learnMyLeergutCode',
|
|
386
388
|
'listMyLeergutCodes',
|
|
389
|
+
// „Mein Trinkgeld“: nur ueber den Kassenweg, nur persoenliche Anmeldung.
|
|
390
|
+
'getMyTipBalance',
|
|
387
391
|
];
|
|
388
392
|
/**
|
|
389
393
|
* Die Aufrufe **mit Wirkung**, alphabetisch: sie legen etwas an, aendern oder
|
|
@@ -543,6 +547,7 @@ export const CALLS_WITHOUT_EFFECT = Object.freeze({
|
|
|
543
547
|
getInvoiceXml: 'read',
|
|
544
548
|
getKasseSettings: 'read',
|
|
545
549
|
getMyDrawerState: 'read',
|
|
550
|
+
getMyTipBalance: 'read',
|
|
546
551
|
getMyShiftReport: 'read',
|
|
547
552
|
getPartnerBilling: 'read',
|
|
548
553
|
getPartnerBillingMonth: 'read',
|
|
@@ -126,7 +126,7 @@ export interface TipOptions {
|
|
|
126
126
|
* Bar-Trinkgeld „gleich behalten“: die Mitarbeiterin steckt das Trinkgeld
|
|
127
127
|
* beim Verkauf gleich ein. Der Beleg bleibt, wie er ist (signiert, im DEP);
|
|
128
128
|
* nur im Kassenstand zaehlt der Betrag nicht ins Bar-Soll und gilt sofort als
|
|
129
|
-
* „
|
|
129
|
+
* „genommen“. Nur `true` geht hinaus. Der Server nimmt es nur bei
|
|
130
130
|
* Mitarbeiter-Trinkgeld, bar und sofort erhalten; sonst faellt es still weg.
|
|
131
131
|
* Vorbelegung des Schalters: [posTipKeptByDefault] der Kassen-Einstellungen.
|
|
132
132
|
*/
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ReceiptType, type ReceiptTypeKey, VatRate, type VatRateKey, KeckPaymentMethod, type KeckPaymentMethodKey, CreditCardProvider, type CreditCardProviderKey, VoucherType, type VoucherTypeKey, VoucherAction, type VoucherActionKey, StripeLinkMode, type StripeLinkModeKey, } from './enums/index.js';
|
|
2
|
-
export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, isDepositItem, isDepositReturnItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, type OwnVoucherCodeShape, type ExternalVoucherNumberCheck, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, type Receipt, type RegistrationInfo, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
|
|
2
|
+
export { type ReceiptItem, type ReceiptItemPayload, type ReceiptItemPayloadRead, toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, type TipRecipient, isTipItem, isVoucherItem, isVoucherFloatItem, isDepositItem, isDepositReturnItem, isInvoicePaymentItem, type Voucher, type VoucherArticle, type IssuedVoucher, type ReturnIssuedVoucher, type VoucherPayload, toVoucherPayload, fromVoucherPayload, voucherIsValid, type VoucherSource, type LegacyValueVoucherWish, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, type OwnVoucherCodeShape, type ExternalVoucherNumberCheck, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, type Receipt, type RegistrationInfo, type InvoicePaymentRef, type InvoicePaymentTaxNote, type ReceiptPayload, type ReceiptPayloadRead, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, type CancellationOf, type CancellationItem, type Cancellation, type CancellationReason, type CancellationErrorCode, type CancellationStatus, type ReturnDisposition, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, type CancellationFieldError, type ReceiptPayment, type ReceiptPaymentPayload, type ReceiptPaymentInput, fromReceiptPaymentPayload, toReceiptPaymentPayload, type PaymentErrorCode, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, type PaymentFieldError, type ReceiptEmailErrorCode, type ReceiptEmailVia, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, type ReceiptEmailSendErrorCode, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, type ReceiptEmailFieldError, RECEIPT_OUTPUT_KINDS, type ReceiptOutputKind, RECEIPT_OUTPUT_LOG_KINDS, type ReceiptOutputLogKind, RECEIPT_OUTPUT_RESULTS, type ReceiptOutputResult, RECEIPT_OUTPUT_ENTRIES_MAX, type ReceiptOutput, type ReceiptOutputActor, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, type ReceiptOutputEntryErrorCode, RECEIPT_OUTPUT_ERROR_CODES, type ReceiptOutputErrorCode, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, type ReceiptOutputFieldError, type ReceiptErrorCode, type ReceiptFieldError, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, type TipRefundSource, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, type ReceiptCompany, type ReceiptCompanyPayload, fromReceiptCompanyPayload, receiptCompanyTaxInfo, type Cashregister, type CashregisterOnboarding, type CashregisterPayload, type CashregisterOnboardingPayload, type CashregisterAutoLogout, type CashregisterAutoLogoutPayload, fromCashregisterPayload, type ReceiptSummary, type ReceiptSummaryPayload, fromReceiptSummaryPayload, type ZeroKind, ZERO_KINDS, isZeroKind, type ReportMonth, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, type StripeUrlSession, type StripeUrlSessionPayload, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, type HobexReceipt, type HobexReceiptPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
|
|
3
3
|
export { type AuthCredentials, type KasseneckAuth, type ApiKeyAuthOptions, type RegisterUserAuthOptions, apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, type HttpResponseLike, type HttpRequestInit, type FetchLike, type TransportOptions, type TransportBodyFields, type TransportCallOptions, type KasseneckTransport, type KasseneckBinaryTransport, type KasseneckPdfOrDataTransport, type PdfOrData, ALL_CALLS, type ApiCall, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, type PublicCall, type PosCall, createTransport, createBinaryTransport, createPdfOrDataTransport, createFileOrDataTransport, type FileOrData, type FileOrDataCallOptions, type KasseneckFileOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, type ValidationScope, type KasseneckError, type HttpFailureReason, type CauseDigest, type ErrorOutcome, CLIENT_ERROR_CODES, type ClientErrorCode, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, type ReceiptCommonOptions, type SellReceiptOptions, type TipOptions, type TipRecipientShare, type CancelReceiptOptions, type CancelReceiptResult, type ReceiptWithCompany, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, type ListMyReceiptsOptions, type ReceiptList, type ReceiptListStats, listMyCashregisters, checkVoucherCombinationError, type SendReceiptEmailOptions, type SendReceiptEmailResult, sendReceiptEmail, type ReceiptOutputEntry, type LogReceiptOutputsOptions, type LogReceiptOutputsResult, type RejectedReceiptOutput, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, type CashregisterReportPeriod, getReportV2, type ReportV2, type ReportV2Metadata, type ReportV2Options, listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, listedReceiptWithCompany, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, type ListReceiptsErrorCode, type ListReceiptsView, type ListReceiptsOrder, type ListReceiptsOptions, type ListReceiptsWindow, type ListReceiptsGrossByRate, type ListReceiptsSummary, type ListReceiptsDaySummary, type ListReceiptsPage, type ListedReceipt, createDepExport, getDepExport, waitForDepExport, getDepExportFile, createDepHandoverLink, revokeDepHandoverLink, DepExportTimeoutError, DepExportChecksumError, DEP_EXPORT_STATUSES, DEP_EXPORT_FILES, DEP_EXPORT_ERROR_CODES, DEP_EXPORT_FAILURES, DEP_EXPORT_POLL_START_MS, DEP_EXPORT_POLL_FACTOR, DEP_EXPORT_POLL_MAX_MS, DEP_EXPORT_WAIT_TIMEOUT_MS, DEP_EXPORT_DOWNLOAD_TIMEOUT_MS, type DepExportStatus, type DepExportFileKind, type DepExportErrorCode, type DepExportFailure, type CreateDepExportOptions, type CreateDepExportResult, type DepExportGap, type DepExportChainBreak, type DepExportFindings, type DepExportItems, type DepHandoverLinkInfo, type DepExport, type WaitForDepExportOptions, type GetDepExportFileOptions, type DepExportFile, type DepHandoverLink, type RevokedDepHandoverLink, registerTerminalDevice, getTerminalAccess, claimTerminal, requestTerminalCode, getTerminalCode, reportTerminalLogin, reportTerminalReady, TERMINAL_PLATFORMS, TERMINAL_SETUP_STATES, TERMINAL_CODE_STATUSES, TERMINAL_CODE_SOURCES, TERMINAL_ERROR_CODES, TERMINAL_LABEL_MAX, TERMINAL_APP_MAX, TERMINAL_REQUESTED_BY_MAX, type TerminalPlatform, type TerminalSetupState, type TerminalCodeStatus, type TerminalCodeSource, type TerminalErrorCode, type TerminalDeviceCredentials, type RegisterTerminalDeviceOptions, type RegisteredTerminalDevice, type GetTerminalAccessOptions, type ClaimTerminalOptions, type RequestTerminalCodeOptions, type ReportTerminalLoginOptions, type TerminalSetup, type TerminalCodeFormat, type TerminalAccess, type TerminalListEntry, type TerminalAccessUnavailable, type TerminalAccessResult, type TerminalCodeRequest, type TerminalCode, EWP_REASONS, EWP_WARNING_CODES, type EwpReason, type EwpWarningCode, type EwpMasterData, type EwpLineSources, type EwpLine, type EwpWarning, type EwpExtraQuantity, type EwpExtraQuantityInput, type EwpReport, type EwpReportFile, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
|
|
4
4
|
export { type ReceiptDueTip, type ReceiptDueTipRecipient, type ReceiptDueOptions, type ReceiptDueBuckets, type ReceiptDueBreakdown, type ReceiptDueErrorReason, receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, type VoucherDueInfo, type VoucherDueArticle, type VoucherDueType, type VoucherRedeemContext, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
|
|
5
5
|
export { parseServerTimeStamp, toViennaWallClock, type ViennaWallClock } from './vienna-time.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ReceiptType, VatRate, KeckPaymentMethod, CreditCardProvider, VoucherType, VoucherAction, StripeLinkMode, } from './enums/index.js';
|
|
2
|
-
export { toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, isTipItem, isVoucherItem, isVoucherFloatItem, isDepositItem, isDepositReturnItem, toVoucherPayload, fromVoucherPayload, voucherIsValid, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, fromReceiptPaymentPayload, toReceiptPaymentPayload, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, RECEIPT_OUTPUT_KINDS, RECEIPT_OUTPUT_LOG_KINDS, RECEIPT_OUTPUT_RESULTS, RECEIPT_OUTPUT_ENTRIES_MAX, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, RECEIPT_OUTPUT_ERROR_CODES, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, fromReceiptCompanyPayload, receiptCompanyTaxInfo, fromCashregisterPayload, fromReceiptSummaryPayload, ZERO_KINDS, isZeroKind, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
|
|
2
|
+
export { toReceiptItemPayload, fromReceiptItemPayload, receiptItemTotalCents, receiptItemIsValid, negateReceiptItem, isTipItem, isVoucherItem, isVoucherFloatItem, isDepositItem, isDepositReturnItem, isInvoicePaymentItem, toVoucherPayload, fromVoucherPayload, voucherIsValid, VOUCHER_SOURCES, isExternalVoucher, externalVoucherIsValid, normalizeExternalVoucherNumber, checkExternalVoucherNumber, ownVoucherCodeShape, OWN_VOUCHER_CODE_SHAPES, EXTERNAL_VOUCHER_NUMBER_MAX, EXTERNAL_VOUCHER_TAXED_WITH_MAX, EXTERNAL_VOUCHER_VAT_RATES_BP, toReceiptPayload, fromReceiptPayload, receiptSubSumCents, receiptSumCents, receiptValueVoucherSign, RETURN_DISPOSITIONS, CANCELLATION_REASONS, CANCELLATION_STATUSES, CANCELLATION_ERROR_CODES, CANCELLATION_RESERVATION_MS, isCancellationReason, isReturnDisposition, isCancellationErrorCode, cancellationErrorCode, isCancellationError, cancellationFieldErrors, fromReceiptPaymentPayload, toReceiptPaymentPayload, PAYMENT_ERROR_CODES, isPaymentErrorCode, paymentErrorCode, isPaymentError, paymentFieldErrors, RECEIPT_EMAIL_ERROR_CODES, RECEIPT_EMAIL_SEND_ERROR_CODES, RECEIPT_EMAIL_VIAS, isReceiptEmailErrorCode, receiptEmailErrorCode, isReceiptEmailError, receiptEmailFieldErrors, RECEIPT_OUTPUT_KINDS, RECEIPT_OUTPUT_LOG_KINDS, RECEIPT_OUTPUT_RESULTS, RECEIPT_OUTPUT_ENTRIES_MAX, RECEIPT_OUTPUT_ENTRY_ERROR_CODES, RECEIPT_OUTPUT_ERROR_CODES, isReceiptOutputErrorCode, receiptOutputErrorCode, isReceiptOutputError, receiptOutputFieldErrors, RECEIPT_ERROR_CODES, isReceiptErrorCode, receiptErrorCode, isReceiptError, receiptFieldErrors, remainingQuantities, TIP_REFUND_SOURCES, isTipRefundSource, openStaffTipCents, cancellationItemsForTip, cancellationCashRefundCents, asksTipRefundSource, asksRefundTip, fromReceiptCompanyPayload, receiptCompanyTaxInfo, fromCashregisterPayload, fromReceiptSummaryPayload, ZERO_KINDS, isZeroKind, reportMonthFromDate, previousReportMonth, nextReportMonth, reportMonthKey, reportMonthReadable, toStripeUrlSessionPayload, fromStripeUrlSessionPayload, toHobexReceiptPayload, fromHobexReceiptPayload, hobexReceiptToCardPaymentData, hobexReceiptNeedsSignature, } from './models/index.js';
|
|
3
3
|
export { apiKeyAuth, registerUserAuth, DEFAULT_BASE_URL, POS_BASE_URL, DEFAULT_TIMEOUT_MS, ALL_CALLS, PUBLIC_CALLS, POS_CALLS, UNKNOWN_OUTCOME_CALLS, createTransport, createBinaryTransport, createPdfOrDataTransport, createFileOrDataTransport, KasseneckApiError, KasseneckAuthError, KasseneckHttpError, KasseneckNetworkError, KasseneckValidationError, CLIENT_ERROR_CODES, isKasseneckApiError, isKasseneckAuthError, isKasseneckHttpError, isKasseneckNetworkError, isKasseneckValidationError, isOutcomeUnknown, sellReceipt, sellReceiptWithCompany, paymentsExpectedCents, cardRefundReference, receiptLayoutFromResult, cancelReceipt, zeroReceipt, getReceipt, getReceiptWithCompany, generateFullReceiptId, getFirstReceiptDate, listMyReceipts, listMyCashregisters, checkVoucherCombinationError, sendReceiptEmail, logReceiptOutputs, downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2, listReceipts, listAllReceipts, fromListReceiptsSummaryPayload, listedReceiptWithCompany, LIST_RECEIPTS_VIEWS, LIST_RECEIPTS_ORDERS, LIST_RECEIPTS_LIMIT_MAX, LIST_RECEIPTS_DAYS_MAX, LIST_ALL_RECEIPTS_MAX_PAGES, LIST_RECEIPTS_ERROR_CODES, createDepExport, getDepExport, waitForDepExport, getDepExportFile, createDepHandoverLink, revokeDepHandoverLink, DepExportTimeoutError, DepExportChecksumError, DEP_EXPORT_STATUSES, DEP_EXPORT_FILES, DEP_EXPORT_ERROR_CODES, DEP_EXPORT_FAILURES, DEP_EXPORT_POLL_START_MS, DEP_EXPORT_POLL_FACTOR, DEP_EXPORT_POLL_MAX_MS, DEP_EXPORT_WAIT_TIMEOUT_MS, DEP_EXPORT_DOWNLOAD_TIMEOUT_MS, registerTerminalDevice, getTerminalAccess, claimTerminal, requestTerminalCode, getTerminalCode, reportTerminalLogin, reportTerminalReady, TERMINAL_PLATFORMS, TERMINAL_SETUP_STATES, TERMINAL_CODE_STATUSES, TERMINAL_CODE_SOURCES, TERMINAL_ERROR_CODES, TERMINAL_LABEL_MAX, TERMINAL_APP_MAX, TERMINAL_REQUESTED_BY_MAX, EWP_REASONS, EWP_WARNING_CODES, getCashboxStatus, getSignatureStatus, createKasseneckApi, } from './client/index.js';
|
|
4
4
|
export { receiptDueCents, receiptDueBreakdown, ReceiptDueError, RECEIPT_DUE_ERROR_REASONS, isReceiptDueError, voucherRedeemMaxCents, VOUCHER_ZERO_RATE_BUCKET_FROM, } from './receipt/due.js';
|
|
5
5
|
export { parseServerTimeStamp, toViennaWallClock } from './vienna-time.js';
|
|
@@ -18,6 +18,8 @@ import type { InvoiceLanguage } from './vertrag.js';
|
|
|
18
18
|
declare const DE: {
|
|
19
19
|
readonly 'pdf.title.invoice': "RECHNUNG";
|
|
20
20
|
readonly 'pdf.title.credit_note': "GUTSCHRIFT";
|
|
21
|
+
readonly 'pdf.title.payment_confirmation': "ZAHLUNGSBESTÄTIGUNG";
|
|
22
|
+
readonly 'pdf.title.refund_confirmation': "RÜCKZAHLUNGSBESTÄTIGUNG";
|
|
21
23
|
readonly 'pdf.badge.paid': "BEZAHLT";
|
|
22
24
|
readonly 'pdf.badge.direct_debit': "SEPA-LASTSCHRIFT";
|
|
23
25
|
readonly 'pdf.meta.number.invoice': "Rechnungsnr.";
|
|
@@ -78,9 +80,24 @@ declare const DE: {
|
|
|
78
80
|
readonly 'pdf.payment.note_until': "Zahlbar ohne Abzug bis {date}. Vielen Dank für Ihren Auftrag.";
|
|
79
81
|
readonly 'pdf.payment.note': "Zahlbar ohne Abzug. Vielen Dank für Ihren Auftrag.";
|
|
80
82
|
readonly 'pdf.payment.qr': "Mit Banking-App scannen & zahlen";
|
|
81
|
-
readonly 'pdf.paid.text': "Diese Rechnung ist beglichen.
|
|
83
|
+
readonly 'pdf.paid.text': "Diese Rechnung ist beglichen.";
|
|
82
84
|
readonly 'pdf.paid.date': "Bezahlt am";
|
|
85
|
+
readonly 'pdf.paid.cash': "Bar bezahlt am {date}.";
|
|
86
|
+
readonly 'pdf.paid.card': "Mit Karte bezahlt am {date}.";
|
|
83
87
|
readonly 'pdf.paid.payment_method': "Zahlungsart";
|
|
88
|
+
readonly 'pdf.cash_register.header': "REGISTRIERKASSE";
|
|
89
|
+
readonly 'pdf.cash_register.receipt_number': "Beleg-Nr.";
|
|
90
|
+
readonly 'pdf.cash_register.date': "Datum";
|
|
91
|
+
readonly 'pdf.cash_register.tax.incl_vat': "inkl. USt";
|
|
92
|
+
readonly 'pdf.cash_register.tax.zero_percent': "0 % USt";
|
|
93
|
+
readonly 'pdf.cash_register.tax.see_invoice': "Steuerangaben siehe Rechnung";
|
|
94
|
+
readonly 'pdf.confirmation.intro': "Wir bestätigen den Erhalt Ihrer Zahlung.";
|
|
95
|
+
readonly 'pdf.confirmation.not_invoice': "Diese Bestätigung ist keine Rechnung.";
|
|
96
|
+
readonly 'pdf.confirmation.table.invoice': "Rechnung";
|
|
97
|
+
readonly 'pdf.confirmation.table.amount': "Betrag";
|
|
98
|
+
readonly 'pdf.confirmation.table.paid_so_far': "Bisher bezahlt";
|
|
99
|
+
readonly 'pdf.confirmation.table.received_today': "Heute erhalten";
|
|
100
|
+
readonly 'pdf.confirmation.table.still_open': "Noch offen";
|
|
84
101
|
readonly 'payment_method.cash': "Bar";
|
|
85
102
|
readonly 'payment_method.transfer': "Überweisung";
|
|
86
103
|
readonly 'payment_method.card': "Karte";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
const DE = {
|
|
2
2
|
'pdf.title.invoice': 'RECHNUNG',
|
|
3
3
|
'pdf.title.credit_note': 'GUTSCHRIFT',
|
|
4
|
+
// Zahlung auf Rechnung (1.38.0): eigene Bestaetigung, wenn spaeter bar oder mit Karte bezahlt wird.
|
|
5
|
+
'pdf.title.payment_confirmation': 'ZAHLUNGSBESTÄTIGUNG',
|
|
6
|
+
'pdf.title.refund_confirmation': 'RÜCKZAHLUNGSBESTÄTIGUNG',
|
|
4
7
|
'pdf.badge.paid': 'BEZAHLT',
|
|
5
8
|
'pdf.badge.direct_debit': 'SEPA-LASTSCHRIFT',
|
|
6
9
|
'pdf.meta.number.invoice': 'Rechnungsnr.',
|
|
@@ -69,9 +72,30 @@ const DE = {
|
|
|
69
72
|
'pdf.payment.note_until': 'Zahlbar ohne Abzug bis {date}. Vielen Dank für Ihren Auftrag.',
|
|
70
73
|
'pdf.payment.note': 'Zahlbar ohne Abzug. Vielen Dank für Ihren Auftrag.',
|
|
71
74
|
'pdf.payment.qr': 'Mit Banking-App scannen & zahlen',
|
|
72
|
-
|
|
75
|
+
// Kurz, fuer jede bezahlte Rechnung (auch Ueberweisung); der Satz „Es ist nichts weiter zu tun.“ entfiel mit 1.38.0.
|
|
76
|
+
'pdf.paid.text': 'Diese Rechnung ist beglichen.',
|
|
73
77
|
'pdf.paid.date': 'Bezahlt am',
|
|
78
|
+
// Kurztexte (1.38.0) fuer die Zahlung vor Ort; {date} = Zahltag.
|
|
79
|
+
'pdf.paid.cash': 'Bar bezahlt am {date}.',
|
|
80
|
+
'pdf.paid.card': 'Mit Karte bezahlt am {date}.',
|
|
74
81
|
'pdf.paid.payment_method': 'Zahlungsart',
|
|
82
|
+
// Kassenteil (1.38.0): der Zahlungsbeleg der Kasse unten auf Rechnung und Zahlungsbestaetigung. Kopfzeile
|
|
83
|
+
// mit der Kassen-ID dahinter; Vermerke und Positionstexte bleiben deutsch (Pflichtwoerter, receiptNotes).
|
|
84
|
+
'pdf.cash_register.header': 'REGISTRIERKASSE',
|
|
85
|
+
'pdf.cash_register.receipt_number': 'Beleg-Nr.',
|
|
86
|
+
'pdf.cash_register.date': 'Datum',
|
|
87
|
+
// Steuerhinweis unter der Zahlung (Spec 2026-11-11, Abschnitt 16): Umsatzsteuer ausgewiesen, steuerfrei/nicht steuerbar, Reverse Charge.
|
|
88
|
+
'pdf.cash_register.tax.incl_vat': 'inkl. USt',
|
|
89
|
+
'pdf.cash_register.tax.zero_percent': '0 % USt',
|
|
90
|
+
'pdf.cash_register.tax.see_invoice': 'Steuerangaben siehe Rechnung',
|
|
91
|
+
// Zahlungsbestaetigung (1.38.0): Einleitung, Hinweis und die Spalten der Tabelle je Rechnung.
|
|
92
|
+
'pdf.confirmation.intro': 'Wir bestätigen den Erhalt Ihrer Zahlung.',
|
|
93
|
+
'pdf.confirmation.not_invoice': 'Diese Bestätigung ist keine Rechnung.',
|
|
94
|
+
'pdf.confirmation.table.invoice': 'Rechnung',
|
|
95
|
+
'pdf.confirmation.table.amount': 'Betrag',
|
|
96
|
+
'pdf.confirmation.table.paid_so_far': 'Bisher bezahlt',
|
|
97
|
+
'pdf.confirmation.table.received_today': 'Heute erhalten',
|
|
98
|
+
'pdf.confirmation.table.still_open': 'Noch offen',
|
|
75
99
|
'payment_method.cash': 'Bar',
|
|
76
100
|
'payment_method.transfer': 'Überweisung',
|
|
77
101
|
'payment_method.card': 'Karte',
|
|
@@ -216,6 +240,8 @@ const DE = {
|
|
|
216
240
|
const EN = {
|
|
217
241
|
'pdf.title.invoice': 'INVOICE',
|
|
218
242
|
'pdf.title.credit_note': 'CREDIT NOTE',
|
|
243
|
+
'pdf.title.payment_confirmation': 'PAYMENT CONFIRMATION',
|
|
244
|
+
'pdf.title.refund_confirmation': 'REFUND CONFIRMATION',
|
|
219
245
|
'pdf.badge.paid': 'PAID',
|
|
220
246
|
'pdf.badge.direct_debit': 'SEPA DIRECT DEBIT',
|
|
221
247
|
'pdf.meta.number.invoice': 'Invoice no.',
|
|
@@ -276,9 +302,24 @@ const EN = {
|
|
|
276
302
|
'pdf.payment.note_until': 'Payable without deduction by {date}. Thank you for your business.',
|
|
277
303
|
'pdf.payment.note': 'Payable without deduction. Thank you for your business.',
|
|
278
304
|
'pdf.payment.qr': 'Scan with your banking app to pay',
|
|
279
|
-
'pdf.paid.text': 'This invoice has been paid.
|
|
305
|
+
'pdf.paid.text': 'This invoice has been paid.',
|
|
280
306
|
'pdf.paid.date': 'Paid on',
|
|
307
|
+
'pdf.paid.cash': 'Paid in cash on {date}.',
|
|
308
|
+
'pdf.paid.card': 'Paid by card on {date}.',
|
|
281
309
|
'pdf.paid.payment_method': 'Payment method',
|
|
310
|
+
'pdf.cash_register.header': 'CASH REGISTER',
|
|
311
|
+
'pdf.cash_register.receipt_number': 'Receipt no.',
|
|
312
|
+
'pdf.cash_register.date': 'Date',
|
|
313
|
+
'pdf.cash_register.tax.incl_vat': 'incl. VAT',
|
|
314
|
+
'pdf.cash_register.tax.zero_percent': '0 % VAT',
|
|
315
|
+
'pdf.cash_register.tax.see_invoice': 'Tax details see invoice',
|
|
316
|
+
'pdf.confirmation.intro': 'We confirm receipt of your payment.',
|
|
317
|
+
'pdf.confirmation.not_invoice': 'This confirmation is not an invoice.',
|
|
318
|
+
'pdf.confirmation.table.invoice': 'Invoice',
|
|
319
|
+
'pdf.confirmation.table.amount': 'Amount',
|
|
320
|
+
'pdf.confirmation.table.paid_so_far': 'Paid so far',
|
|
321
|
+
'pdf.confirmation.table.received_today': 'Received today',
|
|
322
|
+
'pdf.confirmation.table.still_open': 'Still open',
|
|
282
323
|
'payment_method.cash': 'Cash',
|
|
283
324
|
'payment_method.transfer': 'Bank transfer',
|
|
284
325
|
'payment_method.card': 'Card',
|
|
@@ -27,7 +27,7 @@ export type InvoiceEndpoint = (typeof INVOICE_ENDPOINTS)[number];
|
|
|
27
27
|
* Stabile Fehlercodes. Das Fremdsystem verzweigt am Code, der Text darf sich
|
|
28
28
|
* aendern. `validation` traegt zusaetzlich `errors: [{ field, message }]`.
|
|
29
29
|
*/
|
|
30
|
-
export declare const INVOICE_ERROR_CODES: readonly ["validation", "idempotency_conflict", "module_inactive", "customer_not_found", "customer_exists", "short_code_taken", "short_code_immutable", "recipient_required", "invoice_requirements_missing", "invoice_not_found", "invoice_ambiguous", "not_cancellable", "partial_credit_exists", "credit_exceeds_invoice", "einvoice_incomplete", "invoice_api_not_enabled", "invoice_setup_incomplete", "language_not_allowed", "brand_not_found", "not_payable", "payment_exceeds_invoice", "tax_scheme_mismatch", "vat_rate_not_in_country", "reverse_charge_reason_required", "reverse_charge_threshold", "mixed_supply_not_allowed", "oss_not_enabled", "einvoice_unavailable", "amount_too_large", "vat_id_invalid", "vat_id_check_pending", "reservation_not_found", "reservation_mismatch", "reservation_not_active", "invoice_number_taken", "deposit_not_enabled", "deposit_type_not_found", "deposit_set_by_server", "invalid_deposit_quantity", "invalid_deposit"];
|
|
30
|
+
export declare const INVOICE_ERROR_CODES: readonly ["validation", "idempotency_conflict", "module_inactive", "customer_not_found", "customer_exists", "short_code_taken", "short_code_immutable", "recipient_required", "invoice_requirements_missing", "invoice_not_found", "invoice_ambiguous", "not_cancellable", "partial_credit_exists", "credit_exceeds_invoice", "einvoice_incomplete", "invoice_api_not_enabled", "invoice_setup_incomplete", "language_not_allowed", "brand_not_found", "not_payable", "payment_exceeds_invoice", "tax_scheme_mismatch", "vat_rate_not_in_country", "reverse_charge_reason_required", "reverse_charge_threshold", "mixed_supply_not_allowed", "oss_not_enabled", "einvoice_unavailable", "amount_too_large", "vat_id_invalid", "vat_id_check_pending", "reservation_not_found", "reservation_mismatch", "reservation_not_active", "invoice_number_taken", "deposit_not_enabled", "deposit_type_not_found", "deposit_set_by_server", "invalid_deposit_quantity", "invalid_deposit", "cash_receipt_pending"];
|
|
31
31
|
export type InvoiceErrorCode = (typeof INVOICE_ERROR_CODES)[number];
|
|
32
32
|
/**
|
|
33
33
|
* Codes, die Anmeldung und Rand auf jedem Rechnungsaufruf erzeugen koennen,
|
|
@@ -85,6 +85,7 @@ export const INVOICE_ERROR_CODES = [
|
|
|
85
85
|
'deposit_set_by_server', // das Pfand zu einer Artikelposition leitet der Server selbst ab
|
|
86
86
|
'invalid_deposit_quantity', // die Pfandmenge passt nicht zur Menge der Position
|
|
87
87
|
'invalid_deposit', // sonstige Pfandangabe unzulaessig, `index` nennt die Position
|
|
88
|
+
'cash_receipt_pending', // Rechnung bar bezahlt, der Kassenbeleg der Zahlung ist noch nicht fertig: PDF spaeter abrufen
|
|
88
89
|
];
|
|
89
90
|
/**
|
|
90
91
|
* Codes, die Anmeldung und Rand auf jedem Rechnungsaufruf erzeugen koennen,
|