@kreiseck/kasseneck-api 1.35.0 → 1.36.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 +31 -9
- package/dist/cjs/client/api.d.ts +15 -1
- package/dist/cjs/client/api.js +4 -0
- package/dist/cjs/client/aufrufe.d.ts +2 -2
- package/dist/cjs/client/aufrufe.js +10 -0
- package/dist/cjs/client/auth.d.ts +9 -3
- package/dist/cjs/client/auth.js +5 -4
- package/dist/cjs/client/ewp.d.ts +125 -0
- package/dist/cjs/client/ewp.js +95 -0
- package/dist/cjs/client/index.d.ts +1 -0
- package/dist/cjs/client/index.js +4 -1
- package/dist/cjs/client/list-deposit-types.d.ts +3 -0
- package/dist/cjs/client/list-deposit-types.js +3 -0
- package/dist/cjs/client/receipts.d.ts +3 -3
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +4 -2
- package/dist/cjs/invoice/index.d.ts +2 -2
- package/dist/cjs/invoice/index.js +2 -1
- package/dist/cjs/invoice/texte.d.ts +5 -0
- package/dist/cjs/invoice/texte.js +10 -0
- package/dist/cjs/invoice/typen.d.ts +34 -1
- package/dist/cjs/invoice/vertrag.d.ts +13 -4
- package/dist/cjs/invoice/vertrag.js +29 -6
- package/dist/cjs/payments/hobex-hps/connect-client.d.ts +43 -1
- package/dist/cjs/payments/hobex-hps/connect-client.js +51 -1
- package/dist/cjs/payments/hobex-hps/outcome.d.ts +4 -3
- package/dist/cjs/payments/hobex-hps/payments.d.ts +85 -35
- package/dist/cjs/payments/hobex-hps/payments.js +137 -53
- package/dist/cjs/receipt/layout.js +1 -1
- package/dist/cjs/stored/vokabular.d.ts +1 -1
- package/dist/cjs/stored/vokabular.js +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client/api.d.ts +15 -1
- package/dist/esm/client/api.js +4 -0
- package/dist/esm/client/aufrufe.d.ts +2 -2
- package/dist/esm/client/aufrufe.js +10 -0
- package/dist/esm/client/auth.d.ts +9 -3
- package/dist/esm/client/auth.js +5 -4
- package/dist/esm/client/ewp.d.ts +125 -0
- package/dist/esm/client/ewp.js +89 -0
- package/dist/esm/client/index.d.ts +1 -0
- package/dist/esm/client/index.js +1 -0
- package/dist/esm/client/list-deposit-types.d.ts +3 -0
- package/dist/esm/client/list-deposit-types.js +3 -0
- package/dist/esm/client/receipts.d.ts +3 -3
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/invoice/index.d.ts +2 -2
- package/dist/esm/invoice/index.js +1 -1
- package/dist/esm/invoice/texte.d.ts +5 -0
- package/dist/esm/invoice/texte.js +10 -0
- package/dist/esm/invoice/typen.d.ts +34 -1
- package/dist/esm/invoice/vertrag.d.ts +13 -4
- package/dist/esm/invoice/vertrag.js +28 -5
- package/dist/esm/payments/hobex-hps/connect-client.d.ts +43 -1
- package/dist/esm/payments/hobex-hps/connect-client.js +50 -1
- package/dist/esm/payments/hobex-hps/outcome.d.ts +4 -3
- package/dist/esm/payments/hobex-hps/payments.d.ts +85 -35
- package/dist/esm/payments/hobex-hps/payments.js +138 -54
- package/dist/esm/receipt/layout.js +1 -1
- package/dist/esm/stored/vokabular.d.ts +1 -1
- package/dist/esm/stored/vokabular.js +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/fixtures/hobex-hps-cases.json +654 -0
- package/fixtures/hobex-hps-codes.json +1 -1
- package/fixtures/invoice-api-examples/issue-error-deposit.json +39 -0
- package/fixtures/invoice-api-examples/issue-invoice-deposit.json +55 -0
- package/fixtures/invoice-api.schema.json +65 -2
- package/fixtures/invoice-texts.json +11 -1
- package/fixtures/manifest.json +1 -1
- package/fixtures/pos-texts.json +1 -1
- package/fixtures/receipts/card-hobex-hps.json +1 -1
- package/fixtures/surface.json +13 -4
- 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 +2 -2
- 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 +2 -2
- package/fixtures/v3/stored/rechnungen.json +1 -1
- package/fixtures/v3/v3-vokabular.json +358 -5
- package/fixtures/v3/zahlbetrag-faelle.json +1 -1
- package/package.json +1 -1
|
@@ -166,6 +166,9 @@ export const ALL_CALLS = [
|
|
|
166
166
|
'unfixTerminal',
|
|
167
167
|
// Pfandarten des Betriebs lesen, nur unter /v3.
|
|
168
168
|
'listDepositTypes',
|
|
169
|
+
// EWP-Meldung (Einwegpfand) lesen und Zusatzmengen setzen, nur unter /v3.
|
|
170
|
+
'getEwpReport',
|
|
171
|
+
'setEwpExtraQuantities',
|
|
169
172
|
];
|
|
170
173
|
/**
|
|
171
174
|
* Die oeffentlichen Endpunkte unter `/v3` (`https://api.kasseneck.at/v3/<name>`),
|
|
@@ -308,6 +311,9 @@ export const PUBLIC_CALLS = [
|
|
|
308
311
|
'unfixTerminal',
|
|
309
312
|
// Pfandarten des Betriebs lesen, nur unter /v3.
|
|
310
313
|
'listDepositTypes',
|
|
314
|
+
// EWP-Meldung (Einwegpfand) lesen und Zusatzmengen setzen, nur unter /v3.
|
|
315
|
+
'getEwpReport',
|
|
316
|
+
'setEwpExtraQuantities',
|
|
311
317
|
];
|
|
312
318
|
/**
|
|
313
319
|
* Die Endpunkte des Kassenwegs (`https://kasse.kasseneck.at/api/v3/<name>`,
|
|
@@ -511,6 +517,10 @@ export const CALLS_WITHOUT_EFFECT = Object.freeze({
|
|
|
511
517
|
endRegisterSession: 'repeatable',
|
|
512
518
|
generateFullReceiptId: 'read',
|
|
513
519
|
getCashregisterReport: 'read',
|
|
520
|
+
// EWP-Meldung: Lesen vermerkt bei der CSV eines abgeschlossenen Monats nur den Abruf (`downloadedAt`); Setzen ersetzt die
|
|
521
|
+
// ganze Liste der Zusatzmengen, eine Wiederholung aendert nichts mehr.
|
|
522
|
+
getEwpReport: 'repeatable',
|
|
523
|
+
setEwpExtraQuantities: 'repeatable',
|
|
514
524
|
getArticle: 'read',
|
|
515
525
|
listMyLeergutCodes: 'read',
|
|
516
526
|
getCustomer: 'read',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* keiner ist der bevorzugte:
|
|
4
4
|
*
|
|
5
5
|
* - `apiKeyAuth` — der Weg der Geraete, POS-Apps und Dritten: der `api_key` als
|
|
6
|
-
* Bearer plus die Kopfzeile `cashregister-token` (wie im Flutter-Zwilling
|
|
6
|
+
* Bearer plus (fuer Aufrufe an einer Kasse) die Kopfzeile `cashregister-token` (wie im Flutter-Zwilling
|
|
7
7
|
* `kasseneck_api`).
|
|
8
8
|
* - `registerUserAuth` — der Weg der Browser-Kasse: ein Kassen-Benutzer, per
|
|
9
9
|
* PIN an einem gekoppelten Geraet angemeldet. ID-Token als Bearer,
|
|
@@ -35,8 +35,14 @@ export type KasseneckAuth = () => AuthCredentials | Promise<AuthCredentials>;
|
|
|
35
35
|
export interface ApiKeyAuthOptions {
|
|
36
36
|
/** API-Schluessel im Format `kr_<env>_<...>` (opak). */
|
|
37
37
|
apiKey: string;
|
|
38
|
-
/**
|
|
39
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Kassen-Token der Kasse, an der gearbeitet wird (`cb_<env>_<...>`). Optional: Aufrufe, die dem
|
|
40
|
+
* Betrieb statt einer Kasse gelten, brauchen ihn nicht (`listDepositTypes`, `getEwpReport`,
|
|
41
|
+
* `setEwpExtraQuantities`); ohne Token geht die Kopfzeile `cashregister-token` nicht mit.
|
|
42
|
+
* Ein Aufruf, der eine Kasse braucht, antwortet ohne Token mit `cashregister_token_missing`.
|
|
43
|
+
* Ein leerer Text oder nur Leerraum wirft sofort.
|
|
44
|
+
*/
|
|
45
|
+
cashregisterToken?: string;
|
|
40
46
|
}
|
|
41
47
|
export interface RegisterUserAuthOptions {
|
|
42
48
|
/** Liefert ein gueltiges ID-Token des Anmeldediensts; wird pro Anfrage befragt. */
|
package/dist/esm/client/auth.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* keiner ist der bevorzugte:
|
|
4
4
|
*
|
|
5
5
|
* - `apiKeyAuth` — der Weg der Geraete, POS-Apps und Dritten: der `api_key` als
|
|
6
|
-
* Bearer plus die Kopfzeile `cashregister-token` (wie im Flutter-Zwilling
|
|
6
|
+
* Bearer plus (fuer Aufrufe an einer Kasse) die Kopfzeile `cashregister-token` (wie im Flutter-Zwilling
|
|
7
7
|
* `kasseneck_api`).
|
|
8
8
|
* - `registerUserAuth` — der Weg der Browser-Kasse: ein Kassen-Benutzer, per
|
|
9
9
|
* PIN an einem gekoppelten Geraet angemeldet. ID-Token als Bearer,
|
|
@@ -28,8 +28,9 @@ export function apiKeyAuth(options) {
|
|
|
28
28
|
if (!options.apiKey) {
|
|
29
29
|
throw new KasseneckAuthError('apiKeyAuth: apiKey fehlt');
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
const gegeben = options.cashregisterToken !== undefined && options.cashregisterToken !== null;
|
|
32
|
+
if (gegeben && (typeof options.cashregisterToken !== 'string' || options.cashregisterToken.trim() === '')) {
|
|
33
|
+
throw new KasseneckAuthError('apiKeyAuth: cashregisterToken ist leer');
|
|
33
34
|
}
|
|
34
35
|
const { apiKey, cashregisterToken } = options;
|
|
35
36
|
// Pro Aufruf ein frisches Objekt: der Transport (oder ein Aufrufer) darf
|
|
@@ -37,7 +38,7 @@ export function apiKeyAuth(options) {
|
|
|
37
38
|
return () => ({
|
|
38
39
|
headers: {
|
|
39
40
|
Authorization: `Bearer ${apiKey}`,
|
|
40
|
-
'cashregister-token': cashregisterToken,
|
|
41
|
+
...(cashregisterToken ? { 'cashregister-token': cashregisterToken } : {}),
|
|
41
42
|
},
|
|
42
43
|
params: {},
|
|
43
44
|
});
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { InternerTransport } from './aufrufe.js';
|
|
2
|
+
/**
|
|
3
|
+
* EWP-Meldung (Einwegpfand-Meldung, Pfand Teil 5): die Monatsmeldung der
|
|
4
|
+
* Einweg-Verpackungen je GTIN, die ein Abfuellbetrieb dem Pfandsystem meldet
|
|
5
|
+
* (Faelligkeit der 5. des Folgemonats). Nur unter `/v3`, API-Schluessel, nur
|
|
6
|
+
* Betriebe mit der Rolle Abfueller (sonst `filler_role_required`).
|
|
7
|
+
*
|
|
8
|
+
* Die Meldung entsteht aus drei Quellen (`sources`): den Belegen der Kassen,
|
|
9
|
+
* den Rechnungen und den Lieferscheinen, dazu die Zusatzmengen, die das
|
|
10
|
+
* Fremdsystem selbst nachtraegt (Haustrunk, Muster, Spende ...). Der laufende
|
|
11
|
+
* Monat ist vorlaeufig (`provisional`).
|
|
12
|
+
*
|
|
13
|
+
* Mengen sind ganze Stueck. `downloadEwpReport` liefert die CSV fuer den Upload
|
|
14
|
+
* beim Pfandsystem; erst der Abruf eines abgeschlossenen Monats wird als
|
|
15
|
+
* heruntergeladen vermerkt (`downloadedAt`).
|
|
16
|
+
*/
|
|
17
|
+
/** Gruende einer Zusatzmenge, in der Reihenfolge des Backends. */
|
|
18
|
+
export declare const EWP_REASONS: readonly ["own_consumption", "sampling", "donation", "theft", "free_goods", "stocktake", "return", "external_system", "other"];
|
|
19
|
+
export type EwpReason = (typeof EWP_REASONS)[number];
|
|
20
|
+
/** Warnungen der Meldung; welche Angaben eine Warnung traegt, steht an [EwpWarning]. */
|
|
21
|
+
export declare const EWP_WARNING_CODES: readonly ["gtin_not_registered", "foreign_not_reportable", "master_data_missing", "negative_quantity", "invalid_posting"];
|
|
22
|
+
export type EwpWarningCode = (typeof EWP_WARNING_CODES)[number];
|
|
23
|
+
/** Stammdaten einer GTIN fuer die Meldung; fehlende Angaben kommen als leerer Text. */
|
|
24
|
+
export interface EwpMasterData {
|
|
25
|
+
barcodeType: string;
|
|
26
|
+
productOrigin: string;
|
|
27
|
+
depositFee: string;
|
|
28
|
+
producerFee: string;
|
|
29
|
+
ecoImpact: string;
|
|
30
|
+
intBarcodeUsage: string;
|
|
31
|
+
}
|
|
32
|
+
/** Woher die Menge einer Zeile kommt (Stueck): Kasse, Rechnungen, Lieferscheine, Zusatzmengen. */
|
|
33
|
+
export interface EwpLineSources {
|
|
34
|
+
register: number;
|
|
35
|
+
invoices: number;
|
|
36
|
+
deliveryNotes: number;
|
|
37
|
+
extra: number;
|
|
38
|
+
}
|
|
39
|
+
/** Eine Zeile der Meldung: eine registrierte GTIN mit ihren Mengen im Inland und Ausland. */
|
|
40
|
+
export interface EwpLine {
|
|
41
|
+
gtin: string;
|
|
42
|
+
name: string;
|
|
43
|
+
masterData?: EwpMasterData;
|
|
44
|
+
domestic: number;
|
|
45
|
+
foreign: number;
|
|
46
|
+
sources: EwpLineSources;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Eine Warnung zur Meldung; sie sperrt nichts. Welche Angaben dabei stehen:
|
|
50
|
+
* - `gtin_not_registered`: `gtin`, `quantity` (die GTIN ist nicht registriert, ihre Menge steht nicht in `lines`)
|
|
51
|
+
* - `foreign_not_reportable`: `gtin`, `country`, `quantity` (Auslandsmenge, die nicht gemeldet wird: an eine oesterreichische GTIN
|
|
52
|
+
* oder in ein Land ausserhalb des relevanten Auslands; `country` ist `null` bei einer Zusatzmenge ohne Land)
|
|
53
|
+
* - `master_data_missing`: `gtin`, `fields` (die fehlenden Stammdaten)
|
|
54
|
+
* - `negative_quantity`: `gtin`, `column` (`domestic` oder `foreign`), `amount`
|
|
55
|
+
* - `invalid_posting`: `count` (nicht lesbare Posten)
|
|
56
|
+
*/
|
|
57
|
+
export interface EwpWarning {
|
|
58
|
+
code: EwpWarningCode;
|
|
59
|
+
gtin?: string;
|
|
60
|
+
country?: string | null;
|
|
61
|
+
quantity?: number;
|
|
62
|
+
fields?: string[];
|
|
63
|
+
count?: number;
|
|
64
|
+
column?: 'domestic' | 'foreign';
|
|
65
|
+
amount?: number;
|
|
66
|
+
}
|
|
67
|
+
/** Eine Zusatzmenge, wie die Meldung sie fuehrt. */
|
|
68
|
+
export interface EwpExtraQuantity {
|
|
69
|
+
gtin: string;
|
|
70
|
+
domestic: number;
|
|
71
|
+
foreign: number;
|
|
72
|
+
reason: EwpReason;
|
|
73
|
+
text: string | null;
|
|
74
|
+
/** Zeitpunkt des Eintrags (Millisekunden). */
|
|
75
|
+
at: number;
|
|
76
|
+
/** Kennung des Absenders: die uid der Anmeldung im Panel, `'api'` fuer einen API-Schluessel; bei Altbestand `null`. */
|
|
77
|
+
by: string | null;
|
|
78
|
+
}
|
|
79
|
+
/** Eine Zusatzmenge beim Setzen. `text` hoechstens 200 Zeichen. */
|
|
80
|
+
export interface EwpExtraQuantityInput {
|
|
81
|
+
gtin: string;
|
|
82
|
+
domestic: number;
|
|
83
|
+
foreign: number;
|
|
84
|
+
reason: EwpReason;
|
|
85
|
+
text?: string | null;
|
|
86
|
+
}
|
|
87
|
+
/** Die Meldung eines Monats (`getEwpReport`). */
|
|
88
|
+
export interface EwpReport {
|
|
89
|
+
/** Meldemonat `YYYY-MM`. */
|
|
90
|
+
month: string;
|
|
91
|
+
/** Faelligkeit `YYYY-MM-DD` (der 5. des Folgemonats). */
|
|
92
|
+
dueDate: string;
|
|
93
|
+
/** Der Monat laeuft noch. */
|
|
94
|
+
provisional: boolean;
|
|
95
|
+
/** Die Meldung stammt aus der Test-Umgebung (`kr_test_`-Schluessel). */
|
|
96
|
+
test: boolean;
|
|
97
|
+
lines: EwpLine[];
|
|
98
|
+
warnings: EwpWarning[];
|
|
99
|
+
extraQuantities: EwpExtraQuantity[];
|
|
100
|
+
/** Zeitpunkt (Millisekunden) des letzten CSV-Abrufs eines abgeschlossenen Monats, sonst `null`. */
|
|
101
|
+
downloadedAt: number | null;
|
|
102
|
+
}
|
|
103
|
+
/** Die CSV der Meldung (`downloadEwpReport`). */
|
|
104
|
+
export interface EwpReportFile {
|
|
105
|
+
csv: string;
|
|
106
|
+
filename: string;
|
|
107
|
+
contentType: string;
|
|
108
|
+
}
|
|
109
|
+
/** Meldung eines Monats lesen (`getEwpReport`). */
|
|
110
|
+
export declare function getEwpReport(transport: InternerTransport, options: {
|
|
111
|
+
month: string;
|
|
112
|
+
}): Promise<EwpReport>;
|
|
113
|
+
/** CSV der Meldung laden (`getEwpReport` mit `format: 'csv'`). */
|
|
114
|
+
export declare function downloadEwpReport(transport: InternerTransport, options: {
|
|
115
|
+
month: string;
|
|
116
|
+
}): Promise<EwpReportFile>;
|
|
117
|
+
/**
|
|
118
|
+
* Zusatzmengen eines Monats ersetzen (`setEwpExtraQuantities`): die gesendete Liste
|
|
119
|
+
* ist die ganze Liste, eine leere leert sie. Unveraenderte Eintraege behalten
|
|
120
|
+
* `at` und `by`. Antwort ist die neu gerechnete Meldung.
|
|
121
|
+
*/
|
|
122
|
+
export declare function setEwpExtraQuantities(transport: InternerTransport, options: {
|
|
123
|
+
month: string;
|
|
124
|
+
extraQuantities: EwpExtraQuantityInput[];
|
|
125
|
+
}): Promise<EwpReport>;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { KasseneckValidationError } from './errors.js';
|
|
2
|
+
/**
|
|
3
|
+
* EWP-Meldung (Einwegpfand-Meldung, Pfand Teil 5): die Monatsmeldung der
|
|
4
|
+
* Einweg-Verpackungen je GTIN, die ein Abfuellbetrieb dem Pfandsystem meldet
|
|
5
|
+
* (Faelligkeit der 5. des Folgemonats). Nur unter `/v3`, API-Schluessel, nur
|
|
6
|
+
* Betriebe mit der Rolle Abfueller (sonst `filler_role_required`).
|
|
7
|
+
*
|
|
8
|
+
* Die Meldung entsteht aus drei Quellen (`sources`): den Belegen der Kassen,
|
|
9
|
+
* den Rechnungen und den Lieferscheinen, dazu die Zusatzmengen, die das
|
|
10
|
+
* Fremdsystem selbst nachtraegt (Haustrunk, Muster, Spende ...). Der laufende
|
|
11
|
+
* Monat ist vorlaeufig (`provisional`).
|
|
12
|
+
*
|
|
13
|
+
* Mengen sind ganze Stueck. `downloadEwpReport` liefert die CSV fuer den Upload
|
|
14
|
+
* beim Pfandsystem; erst der Abruf eines abgeschlossenen Monats wird als
|
|
15
|
+
* heruntergeladen vermerkt (`downloadedAt`).
|
|
16
|
+
*/
|
|
17
|
+
/** Gruende einer Zusatzmenge, in der Reihenfolge des Backends. */
|
|
18
|
+
export const EWP_REASONS = Object.freeze([
|
|
19
|
+
'own_consumption',
|
|
20
|
+
'sampling',
|
|
21
|
+
'donation',
|
|
22
|
+
'theft',
|
|
23
|
+
'free_goods',
|
|
24
|
+
'stocktake',
|
|
25
|
+
'return',
|
|
26
|
+
'external_system',
|
|
27
|
+
'other',
|
|
28
|
+
]);
|
|
29
|
+
/** Warnungen der Meldung; welche Angaben eine Warnung traegt, steht an [EwpWarning]. */
|
|
30
|
+
export const EWP_WARNING_CODES = Object.freeze([
|
|
31
|
+
'gtin_not_registered',
|
|
32
|
+
'foreign_not_reportable',
|
|
33
|
+
'master_data_missing',
|
|
34
|
+
'negative_quantity',
|
|
35
|
+
'invalid_posting',
|
|
36
|
+
]);
|
|
37
|
+
/** Meldung eines Monats lesen (`getEwpReport`). */
|
|
38
|
+
export async function getEwpReport(transport, options) {
|
|
39
|
+
const month = monat('getEwpReport', options);
|
|
40
|
+
return meldung('getEwpReport', await transport('getEwpReport', { month }));
|
|
41
|
+
}
|
|
42
|
+
/** CSV der Meldung laden (`getEwpReport` mit `format: 'csv'`). */
|
|
43
|
+
export async function downloadEwpReport(transport, options) {
|
|
44
|
+
const month = monat('downloadEwpReport', options);
|
|
45
|
+
const daten = await transport('getEwpReport', { month, format: 'csv' });
|
|
46
|
+
if (!istObjekt(daten))
|
|
47
|
+
throw antwortfehler('downloadEwpReport', 'Antwort ist kein Objekt');
|
|
48
|
+
const { csv, filename, contentType } = daten;
|
|
49
|
+
if (typeof csv !== 'string' || typeof filename !== 'string' || typeof contentType !== 'string') {
|
|
50
|
+
throw antwortfehler('downloadEwpReport', 'Antwort ohne csv, filename und contentType');
|
|
51
|
+
}
|
|
52
|
+
return { csv, filename, contentType };
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Zusatzmengen eines Monats ersetzen (`setEwpExtraQuantities`): die gesendete Liste
|
|
56
|
+
* ist die ganze Liste, eine leere leert sie. Unveraenderte Eintraege behalten
|
|
57
|
+
* `at` und `by`. Antwort ist die neu gerechnete Meldung.
|
|
58
|
+
*/
|
|
59
|
+
export async function setEwpExtraQuantities(transport, options) {
|
|
60
|
+
const month = monat('setEwpExtraQuantities', options);
|
|
61
|
+
if (!Array.isArray(options.extraQuantities)) {
|
|
62
|
+
throw new KasseneckValidationError('setEwpExtraQuantities', 'extraQuantities muss eine Liste sein', 'request');
|
|
63
|
+
}
|
|
64
|
+
return meldung('setEwpExtraQuantities', await transport('setEwpExtraQuantities', { month, extraQuantities: options.extraQuantities }));
|
|
65
|
+
}
|
|
66
|
+
function monat(aufruf, options) {
|
|
67
|
+
const month = options?.month;
|
|
68
|
+
if (typeof month !== 'string' || month === '')
|
|
69
|
+
throw new KasseneckValidationError(aufruf, 'month fehlt (Monat als JJJJ-MM)', 'request');
|
|
70
|
+
return month;
|
|
71
|
+
}
|
|
72
|
+
function istObjekt(wert) {
|
|
73
|
+
return wert !== null && typeof wert === 'object' && !Array.isArray(wert);
|
|
74
|
+
}
|
|
75
|
+
function antwortfehler(aufruf, grund) {
|
|
76
|
+
return new KasseneckValidationError(aufruf, grund, 'response');
|
|
77
|
+
}
|
|
78
|
+
/** Prueft die Form, die der Aufrufer braucht, und reicht die Antwort sonst unveraendert durch. */
|
|
79
|
+
function meldung(aufruf, daten) {
|
|
80
|
+
if (!istObjekt(daten))
|
|
81
|
+
throw antwortfehler(aufruf, 'Antwort ist kein Objekt');
|
|
82
|
+
if (typeof daten['month'] !== 'string')
|
|
83
|
+
throw antwortfehler(aufruf, 'Antwort ohne month');
|
|
84
|
+
for (const feld of ['lines', 'warnings', 'extraQuantities']) {
|
|
85
|
+
if (!Array.isArray(daten[feld]))
|
|
86
|
+
throw antwortfehler(aufruf, `Antwort ohne Liste ${feld}`);
|
|
87
|
+
}
|
|
88
|
+
return daten;
|
|
89
|
+
}
|
|
@@ -7,6 +7,7 @@ export { listMyCashregisters } from './cashregisters.js';
|
|
|
7
7
|
export { 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, type ListedFullReceipt, type ListReceiptsHeader, } from './list-receipts.js';
|
|
8
8
|
export { 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, } from './dep-export.js';
|
|
9
9
|
export { 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, } from './terminal.js';
|
|
10
|
+
export { 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, } from './ewp.js';
|
|
10
11
|
export { downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2, type CashregisterReportPeriod, type ReportV2, type ReportV2Metadata, type ReportV2Options } from './reports.js';
|
|
11
12
|
export { type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, } from './status.js';
|
|
12
13
|
export { type KasseneckApi, createKasseneckApi } from './api.js';
|
package/dist/esm/client/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export { listMyCashregisters } from './cashregisters.js';
|
|
|
7
7
|
export { 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, } from './list-receipts.js';
|
|
8
8
|
export { 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, } from './dep-export.js';
|
|
9
9
|
export { 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, } from './terminal.js';
|
|
10
|
+
export { EWP_REASONS, EWP_WARNING_CODES, } from './ewp.js';
|
|
10
11
|
export { downloadDailyReport, downloadMonthlyReport, getCashregisterReport, getReportV2 } from './reports.js';
|
|
11
12
|
export { getCashboxStatus, getSignatureStatus, } from './status.js';
|
|
12
13
|
export { createKasseneckApi } from './api.js';
|
|
@@ -2,6 +2,9 @@ import { type DepositSettings } from '../pos/pfand.js';
|
|
|
2
2
|
import type { InternerTransport } from './aufrufe.js';
|
|
3
3
|
/**
|
|
4
4
|
* Pfandarten des Betriebs lesen (`listDepositTypes`, nur unter `/v3`, API-Schluessel).
|
|
5
|
+
* Der Aufruf braucht **kein Kassen-Token**: er gilt dem Betrieb, nicht einer Kasse.
|
|
6
|
+
* `apiKeyAuth` darf deshalb ohne `cashregisterToken` gebaut werden; der Server
|
|
7
|
+
* liest das Token bei diesem Aufruf nicht.
|
|
5
8
|
* Die Antwort ist der Block `deposit` aus `getKasseSettings`. Pfand aus ist kein
|
|
6
9
|
* Fehler: `null`, dann darf ein Fremdsystem keine Pfandzeilen schicken. Eine
|
|
7
10
|
* Antwort, in der `deposit` weder `null` noch ein Objekt ist, wirft
|
|
@@ -2,6 +2,9 @@ import { posDepositSettingsFromWire } from '../pos/pfand.js';
|
|
|
2
2
|
import { KasseneckValidationError } from './errors.js';
|
|
3
3
|
/**
|
|
4
4
|
* Pfandarten des Betriebs lesen (`listDepositTypes`, nur unter `/v3`, API-Schluessel).
|
|
5
|
+
* Der Aufruf braucht **kein Kassen-Token**: er gilt dem Betrieb, nicht einer Kasse.
|
|
6
|
+
* `apiKeyAuth` darf deshalb ohne `cashregisterToken` gebaut werden; der Server
|
|
7
|
+
* liest das Token bei diesem Aufruf nicht.
|
|
5
8
|
* Die Antwort ist der Block `deposit` aus `getKasseSettings`. Pfand aus ist kein
|
|
6
9
|
* Fehler: `null`, dann darf ein Fremdsystem keine Pfandzeilen schicken. Eine
|
|
7
10
|
* Antwort, in der `deposit` weder `null` noch ein Objekt ist, wirft
|
|
@@ -67,9 +67,9 @@ export interface ReceiptCommonOptions {
|
|
|
67
67
|
*/
|
|
68
68
|
drawerId?: string;
|
|
69
69
|
/**
|
|
70
|
-
* Pfand & Leergut: der Server
|
|
71
|
-
* Ohne Angabe
|
|
72
|
-
*
|
|
70
|
+
* Pfand & Leergut: nur mit `true` leitet der Server die Pfandzeilen aus den Artikeln (`deposits`) selbst ab und
|
|
71
|
+
* rechnet den Betrag. Ohne Angabe (Vorgabe) und mit `false` leitet er keine ab; ausdrueckliche Zeilen `deposit` ohne
|
|
72
|
+
* `articleId` und `deposit_return` bleiben in jedem Fall erlaubt.
|
|
73
73
|
*/
|
|
74
74
|
autoDeposits?: boolean;
|
|
75
75
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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
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';
|
|
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, type ListedFullReceipt, type ListReceiptsHeader, type CashboxStatus, type SignatureStatus, getCashboxStatus, getSignatureStatus, type KasseneckApi, createKasseneckApi, } from './client/index.js';
|
|
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';
|
|
6
6
|
export { type PosBusinessSettings, type PosDeviceSettings, type PosSettings, type ArticleGroup, type PosArticle, POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, depositReturnOf, } from './pos/index.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ReceiptType, VatRate, KeckPaymentMethod, CreditCardProvider, VoucherType, VoucherAction, StripeLinkMode, } from './enums/index.js';
|
|
2
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';
|
|
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, getCashboxStatus, getSignatureStatus, createKasseneckApi, } from './client/index.js';
|
|
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';
|
|
6
6
|
export { POS_BUSINESS_DEFAULTS, POS_DEVICE_DEFAULTS, mergePosSettings, fromArticleGroupPayload, fromPosArticlePayload, listMyArticleGroups, listMyArticles, getPosSettings, setMyPosSettings, setMyRegisterDeviceSettings, distributeDiscount, cancelScopeOf, receiptsScopeOf, stockViewOf, voucherPermsOf, depositReturnOf, } from './pos/index.js';
|
|
@@ -14,8 +14,8 @@ export { createInvoiceApi, type InvoiceApi, type InvoiceApiOptions } from './api
|
|
|
14
14
|
export { invoiceKeyAuth, type InvoiceKeyAuthOptions } from './auth.js';
|
|
15
15
|
export { isInvoiceError, isInvoiceErrorCode, invoiceErrorCode, invoiceFieldErrors, type InvoiceApiErrorCode, type InvoiceFieldError, } from './fehler.js';
|
|
16
16
|
export { cancelInvoice, createCreditNote, createCustomer, getCustomer, getInvoice, getInvoicePdf, getInvoiceSetupStatus, getInvoiceXml, issueInvoice, listBrands, listInvoices, previewInvoice, recordInvoicePayment, searchCustomers, updateCustomer, } from './endpunkte.js';
|
|
17
|
-
export type { Brand, CancelInvoiceRequest, CancelResult, CreditNoteItemInput, CreditNoteRequest, CreditNoteResult, Customer, CustomerInput, CustomerPage, CustomerSearch, EInvoiceStatus, Invoice, InvoiceDetail, InvoiceDetailPayment, InvoiceItem, InvoiceItemInput, IssueInvoiceItemInput, InvoiceListQuery, InvoicePage, InvoiceRecipient, InvoiceSetupGap, InvoiceSetupStatus, InvoiceTotals, InvoiceXml, InvoiceNotice, InvoicePayment, InvoicePreview, InvoiceRateTotals, InvoiceVatIdProof, InvoiceSupplyDateProof, InvoiceVatIdRisk, IssueInvoiceRequest, IssueResult, PaymentInput, PreviewResult, RecordPaymentRequest, RecordPaymentResult, } from './typen.js';
|
|
17
|
+
export type { Brand, CancelInvoiceRequest, CancelResult, CreditNoteItemInput, CreditNoteRequest, CreditNoteResult, Customer, CustomerInput, CustomerPage, CustomerSearch, EInvoiceStatus, Invoice, InvoiceDetail, InvoiceDetailPayment, InvoiceItem, InvoiceItemInput, InvoiceItemDepositInput, InvoiceItemDeposit, IssueInvoiceItemInput, InvoiceListQuery, InvoicePage, InvoiceRecipient, InvoiceSetupGap, InvoiceSetupStatus, InvoiceTotals, InvoiceXml, InvoiceNotice, InvoicePayment, InvoicePreview, InvoiceRateTotals, InvoiceVatIdProof, InvoiceSupplyDateProof, InvoiceVatIdRisk, IssueInvoiceRequest, IssueResult, PaymentInput, PreviewResult, RecordPaymentRequest, RecordPaymentResult, } from './typen.js';
|
|
18
18
|
export { INVOICE_TEXTS, invoiceText, type InvoiceTextKey } from './texte.js';
|
|
19
19
|
export { computeInvoiceTotals, ZERO_RATED_TAX_SCHEMES, type TotalsItem } from './summen.js';
|
|
20
20
|
export { proratedPriceMicros, MAX_AMOUNT_CENTS, itemFromEuro, formatUnitPrice, CalcError, calculateInvoice, roundDiv, vatRateMapKey, formatVatRate, type CalcResult, type CalcErrorCode, type CalcOptions, type CalcItem, type RateTotal, type ItemConversion, type ConversionReason, type LineAmount, } from './calc.js';
|
|
21
|
-
export { INVOICE_CONTRACT_VERSION, INVOICE_ENDPOINTS, INVOICE_ERROR_CODES, INVOICE_REQUEST_ERROR_CODES, CREDIT_NOTE_REASONS, TAX_SCHEMES, PRICE_MODES, VAT_RATES, CUSTOMER_TYPES, INVOICE_LIST_STATUS, DOC_TYPES, EINVOICE_FORMATS, EINVOICE_MISSING_CODES, WRITE_OFF_REASON_CODES, INVOICE_LANGUAGES, INVOICE_PAYMENT_METHODS, ITEM_KINDS, REVERSE_CHARGE_REASONS, INVOICE_NOTICE_CODES, INVOICE_UNITS, INVOICE_UNIT_CODES, INVOICE_SETUP_REQUIREMENTS, CUSTOMER_FIELDS, ITEM_FIELDS, INVOICE_ITEM_FIELDS, CREDIT_NOTE_ITEM_FIELDS, RETURN_DISPOSITIONS, ITEM_PRICE_EXACTLY_ONE, INVOICE_REQUESTS, INVOICE_EXACTLY_ONE, INVOICE_AT_LEAST_ONE, type InvoiceEndpoint, type InvoiceErrorCode, type InvoiceRequestErrorCode, type CreditNoteReason, type ReturnDisposition, type TaxScheme, type PriceMode, type VatRatePercent, type CustomerType, type InvoiceListStatus, type DocType, type EInvoiceFormat, type EInvoiceMissingCode, type WriteOffReasonCode, type InvoiceLanguage, type InvoicePaymentMethod, type ItemKind, type ReverseChargeReason, type InvoiceNoticeCode, type InvoiceUnit, type InvoiceSetupRequirement, type FieldFormat, type Field, } from './vertrag.js';
|
|
21
|
+
export { INVOICE_CONTRACT_VERSION, INVOICE_ENDPOINTS, INVOICE_ERROR_CODES, INVOICE_REQUEST_ERROR_CODES, CREDIT_NOTE_REASONS, TAX_SCHEMES, PRICE_MODES, VAT_RATES, CUSTOMER_TYPES, INVOICE_LIST_STATUS, DOC_TYPES, EINVOICE_FORMATS, EINVOICE_MISSING_CODES, WRITE_OFF_REASON_CODES, INVOICE_LANGUAGES, INVOICE_PAYMENT_METHODS, ITEM_KINDS, REVERSE_CHARGE_REASONS, INVOICE_NOTICE_CODES, INVOICE_UNITS, INVOICE_UNIT_CODES, INVOICE_SETUP_REQUIREMENTS, CUSTOMER_FIELDS, ITEM_FIELDS, INVOICE_ITEM_FIELDS, CREDIT_NOTE_ITEM_FIELDS, DEPOSIT_ITEM_FIELD, RETURN_DISPOSITIONS, ITEM_PRICE_EXACTLY_ONE, INVOICE_REQUESTS, INVOICE_EXACTLY_ONE, INVOICE_AT_LEAST_ONE, type InvoiceEndpoint, type InvoiceErrorCode, type InvoiceRequestErrorCode, type CreditNoteReason, type ReturnDisposition, type TaxScheme, type PriceMode, type VatRatePercent, type CustomerType, type InvoiceListStatus, type DocType, type EInvoiceFormat, type EInvoiceMissingCode, type WriteOffReasonCode, type InvoiceLanguage, type InvoicePaymentMethod, type ItemKind, type ReverseChargeReason, type InvoiceNoticeCode, type InvoiceUnit, type InvoiceSetupRequirement, type FieldFormat, type Field, } from './vertrag.js';
|
|
@@ -17,4 +17,4 @@ export { cancelInvoice, createCreditNote, createCustomer, getCustomer, getInvoic
|
|
|
17
17
|
export { INVOICE_TEXTS, invoiceText } from './texte.js';
|
|
18
18
|
export { computeInvoiceTotals, ZERO_RATED_TAX_SCHEMES } from './summen.js';
|
|
19
19
|
export { proratedPriceMicros, MAX_AMOUNT_CENTS, itemFromEuro, formatUnitPrice, CalcError, calculateInvoice, roundDiv, vatRateMapKey, formatVatRate, } from './calc.js';
|
|
20
|
-
export { INVOICE_CONTRACT_VERSION, INVOICE_ENDPOINTS, INVOICE_ERROR_CODES, INVOICE_REQUEST_ERROR_CODES, CREDIT_NOTE_REASONS, TAX_SCHEMES, PRICE_MODES, VAT_RATES, CUSTOMER_TYPES, INVOICE_LIST_STATUS, DOC_TYPES, EINVOICE_FORMATS, EINVOICE_MISSING_CODES, WRITE_OFF_REASON_CODES, INVOICE_LANGUAGES, INVOICE_PAYMENT_METHODS, ITEM_KINDS, REVERSE_CHARGE_REASONS, INVOICE_NOTICE_CODES, INVOICE_UNITS, INVOICE_UNIT_CODES, INVOICE_SETUP_REQUIREMENTS, CUSTOMER_FIELDS, ITEM_FIELDS, INVOICE_ITEM_FIELDS, CREDIT_NOTE_ITEM_FIELDS, RETURN_DISPOSITIONS, ITEM_PRICE_EXACTLY_ONE, INVOICE_REQUESTS, INVOICE_EXACTLY_ONE, INVOICE_AT_LEAST_ONE, } from './vertrag.js';
|
|
20
|
+
export { INVOICE_CONTRACT_VERSION, INVOICE_ENDPOINTS, INVOICE_ERROR_CODES, INVOICE_REQUEST_ERROR_CODES, CREDIT_NOTE_REASONS, TAX_SCHEMES, PRICE_MODES, VAT_RATES, CUSTOMER_TYPES, INVOICE_LIST_STATUS, DOC_TYPES, EINVOICE_FORMATS, EINVOICE_MISSING_CODES, WRITE_OFF_REASON_CODES, INVOICE_LANGUAGES, INVOICE_PAYMENT_METHODS, ITEM_KINDS, REVERSE_CHARGE_REASONS, INVOICE_NOTICE_CODES, INVOICE_UNITS, INVOICE_UNIT_CODES, INVOICE_SETUP_REQUIREMENTS, CUSTOMER_FIELDS, ITEM_FIELDS, INVOICE_ITEM_FIELDS, CREDIT_NOTE_ITEM_FIELDS, DEPOSIT_ITEM_FIELD, RETURN_DISPOSITIONS, ITEM_PRICE_EXACTLY_ONE, INVOICE_REQUESTS, INVOICE_EXACTLY_ONE, INVOICE_AT_LEAST_ONE, } from './vertrag.js';
|
|
@@ -45,6 +45,10 @@ declare const DE: {
|
|
|
45
45
|
readonly 'pdf.totals.included_vat': "darin {rate}% USt von {net} netto";
|
|
46
46
|
readonly 'pdf.totals.grand_total.invoice': "Gesamtbetrag";
|
|
47
47
|
readonly 'pdf.totals.grand_total.credit_note': "Gutschriftsbetrag";
|
|
48
|
+
readonly 'pdf.totals.single_use_deposit': "0 % Einwegpfand, nicht steuerbar";
|
|
49
|
+
readonly 'pdf.totals.head_rate': "Satz";
|
|
50
|
+
readonly 'pdf.totals.head_net': "Netto";
|
|
51
|
+
readonly 'pdf.totals.head_vat': "USt";
|
|
48
52
|
readonly 'tax.small_business': "Gemäß § 6 Abs. 1 Z 27 UStG wird keine Umsatzsteuer verrechnet (Kleinunternehmer).";
|
|
49
53
|
readonly 'tax.intra_community_supply.title': "Steuerfreie innergemeinschaftliche Lieferung. ";
|
|
50
54
|
readonly 'tax.intra_community_supply.text': "Gemäß Art. 6 Abs. 1 UStG (Art. 138 MwSt-RL 2006/112/EG). Die Erwerbsbesteuerung erfolgt durch den Abnehmer im Bestimmungsland.";
|
|
@@ -117,6 +121,7 @@ declare const DE: {
|
|
|
117
121
|
readonly 'einvoice.exemption.intra_community_supply': "Steuerfreie innergemeinschaftliche Lieferung gemäß Art. 6 Abs. 1 UStG";
|
|
118
122
|
readonly 'einvoice.exemption.outside_scope': "Nicht steuerbarer Umsatz – Leistungsort im Ausland (§ 3a Abs. 6 UStG)";
|
|
119
123
|
readonly 'einvoice.exemption.export_third_country': "Steuerfreie Ausfuhrlieferung gemäß §6 Abs. 1 Z 1 UStG";
|
|
124
|
+
readonly 'einvoice.exemption.single_use_deposit': "Pfand Einweg, nicht steuerbar (UStR Rz 8)";
|
|
120
125
|
readonly 'einvoice.payable_until': "Zahlbar bis {date}";
|
|
121
126
|
readonly 'unit_symbol.piece': "Stk";
|
|
122
127
|
readonly 'unit_symbol.pair': "Paar";
|
|
@@ -28,6 +28,10 @@ const DE = {
|
|
|
28
28
|
'pdf.totals.included_vat': 'darin {rate}% USt von {net} netto',
|
|
29
29
|
'pdf.totals.grand_total.invoice': 'Gesamtbetrag',
|
|
30
30
|
'pdf.totals.grand_total.credit_note': 'Gutschriftsbetrag',
|
|
31
|
+
'pdf.totals.single_use_deposit': '0 % Einwegpfand, nicht steuerbar',
|
|
32
|
+
'pdf.totals.head_rate': 'Satz',
|
|
33
|
+
'pdf.totals.head_net': 'Netto',
|
|
34
|
+
'pdf.totals.head_vat': 'USt',
|
|
31
35
|
'tax.small_business': 'Gemäß § 6 Abs. 1 Z 27 UStG wird keine Umsatzsteuer verrechnet (Kleinunternehmer).',
|
|
32
36
|
'tax.intra_community_supply.title': 'Steuerfreie innergemeinschaftliche Lieferung. ',
|
|
33
37
|
'tax.intra_community_supply.text': 'Gemäß Art. 6 Abs. 1 UStG (Art. 138 MwSt-RL 2006/112/EG). Die Erwerbsbesteuerung erfolgt durch den Abnehmer im Bestimmungsland.',
|
|
@@ -108,6 +112,7 @@ const DE = {
|
|
|
108
112
|
'einvoice.exemption.intra_community_supply': 'Steuerfreie innergemeinschaftliche Lieferung gemäß Art. 6 Abs. 1 UStG',
|
|
109
113
|
'einvoice.exemption.outside_scope': 'Nicht steuerbarer Umsatz – Leistungsort im Ausland (§ 3a Abs. 6 UStG)',
|
|
110
114
|
'einvoice.exemption.export_third_country': 'Steuerfreie Ausfuhrlieferung gemäß §6 Abs. 1 Z 1 UStG',
|
|
115
|
+
'einvoice.exemption.single_use_deposit': 'Pfand Einweg, nicht steuerbar (UStR Rz 8)',
|
|
111
116
|
'einvoice.payable_until': 'Zahlbar bis {date}',
|
|
112
117
|
'unit_symbol.piece': 'Stk',
|
|
113
118
|
'unit_symbol.pair': 'Paar',
|
|
@@ -238,6 +243,10 @@ const EN = {
|
|
|
238
243
|
'pdf.totals.included_vat': 'incl. {rate}% VAT on {net} net',
|
|
239
244
|
'pdf.totals.grand_total.invoice': 'Total',
|
|
240
245
|
'pdf.totals.grand_total.credit_note': 'Credit total',
|
|
246
|
+
'pdf.totals.single_use_deposit': '0 % single-use deposit, not subject to VAT',
|
|
247
|
+
'pdf.totals.head_rate': 'Rate',
|
|
248
|
+
'pdf.totals.head_net': 'Net',
|
|
249
|
+
'pdf.totals.head_vat': 'VAT',
|
|
241
250
|
'tax.small_business': 'No VAT charged pursuant to § 6 (1) no. 27 UStG (small business exemption).',
|
|
242
251
|
'tax.intra_community_supply.title': 'VAT-exempt intra-Community supply. ',
|
|
243
252
|
'tax.intra_community_supply.text': 'Pursuant to Art. 6 (1) UStG (Art. 138 of VAT Directive 2006/112/EC). The acquisition is taxed by the customer in the country of destination.',
|
|
@@ -310,6 +319,7 @@ const EN = {
|
|
|
310
319
|
'einvoice.exemption.intra_community_supply': 'VAT-exempt intra-Community supply pursuant to Art. 6 (1) UStG',
|
|
311
320
|
'einvoice.exemption.outside_scope': 'Outside the scope of VAT – place of supply abroad (§ 3a (6) UStG)',
|
|
312
321
|
'einvoice.exemption.export_third_country': 'VAT-exempt export delivery pursuant to § 6 (1) no. 1 UStG',
|
|
322
|
+
'einvoice.exemption.single_use_deposit': 'Single-use deposit, not subject to VAT (UStR para. 8)',
|
|
313
323
|
'einvoice.payable_until': 'Payable by {date}',
|
|
314
324
|
'unit_symbol.piece': 'pcs',
|
|
315
325
|
'unit_symbol.pair': 'pair',
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Wiener Kalender.
|
|
7
7
|
*/
|
|
8
8
|
import type { CreditNoteReason, CustomerType, DocType, EInvoiceFormat, EInvoiceMissingCode, InvoiceLanguage, InvoiceNoticeCode, ItemKind, ReverseChargeReason, InvoicePaymentMethod, InvoiceUnit, InvoiceSetupRequirement, InvoiceListStatus, PriceMode, ReturnDisposition, TaxScheme, VatRatePercent, WriteOffReasonCode } from './vertrag.js';
|
|
9
|
+
import type { DepositKind } from '../pos/pfand.js';
|
|
9
10
|
export interface CustomerInput {
|
|
10
11
|
type: CustomerType;
|
|
11
12
|
name: string;
|
|
@@ -89,11 +90,30 @@ export interface InvoiceItemInput {
|
|
|
89
90
|
/** Artikel aus dem Artikelstamm; bestandsgefuehrt bucht das Ausstellen ihn vom Lager ab. */
|
|
90
91
|
articleId?: string;
|
|
91
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Pfandangabe an einer Position (`deposit`, seit 1.36.0): die Position ist eine
|
|
95
|
+
* Pfandzeile zu der Position `depositFor` derselben Anfrage. Die Pfandarten des
|
|
96
|
+
* Betriebs liefert `listDepositTypes`. Ohne eingeschaltetes Pfand antwortet der
|
|
97
|
+
* Server mit `deposit_not_enabled`.
|
|
98
|
+
*/
|
|
99
|
+
export interface InvoiceItemDepositInput {
|
|
100
|
+
/** Kennung der Pfandart (`DepositType.id`). */
|
|
101
|
+
depositTypeId: string;
|
|
102
|
+
/** Index der Position in `items`, zu der dieses Pfand gehoert (0 bis 499). */
|
|
103
|
+
depositFor: number;
|
|
104
|
+
/** GTIN der Verpackung, 8 bis 14 Ziffern (fuer die EWP-Meldung). */
|
|
105
|
+
gtin?: string;
|
|
106
|
+
/** Eigene Abfuellung (Mehrweg des Betriebs selbst). */
|
|
107
|
+
ownFilling?: boolean;
|
|
108
|
+
}
|
|
92
109
|
/**
|
|
93
110
|
* Eine Position beim Ausstellen (`issueInvoice`): dazu optional die
|
|
94
|
-
* Reservierung aus der Lager-API, die diese Position einloest
|
|
111
|
+
* Reservierung aus der Lager-API, die diese Position einloest, und die
|
|
112
|
+
* Pfandangabe.
|
|
95
113
|
*/
|
|
96
114
|
export interface IssueInvoiceItemInput extends InvoiceItemInput {
|
|
115
|
+
/** Diese Position ist eine Pfandzeile (siehe [InvoiceItemDepositInput]). */
|
|
116
|
+
deposit?: InvoiceItemDepositInput;
|
|
97
117
|
/**
|
|
98
118
|
* Kennung aus `createReservation` (`./inventory`); braucht `articleId`.
|
|
99
119
|
* Geprueft beim Ausstellen (`reservation_not_found`, `reservation_mismatch`,
|
|
@@ -104,6 +124,8 @@ export interface IssueInvoiceItemInput extends InvoiceItemInput {
|
|
|
104
124
|
}
|
|
105
125
|
/** Eine Gutschriftsposition: wie eine Rechnungsposition (ohne Reservierung), dazu die Rueckgabe-Wahl. */
|
|
106
126
|
export interface CreditNoteItemInput extends InvoiceItemInput {
|
|
127
|
+
/** Diese Position ist eine Pfandzeile (siehe [InvoiceItemDepositInput]). */
|
|
128
|
+
deposit?: InvoiceItemDepositInput;
|
|
107
129
|
/** Wohin die Ware dieser Position geht; fehlt = Vorgabe des Aufrufs bzw. `restock`. */
|
|
108
130
|
returnDisposition?: ReturnDisposition;
|
|
109
131
|
}
|
|
@@ -333,6 +355,17 @@ export interface InvoiceItem {
|
|
|
333
355
|
unitPriceMicros?: number;
|
|
334
356
|
vatRate: number;
|
|
335
357
|
discountPct: number;
|
|
358
|
+
/** Nur an Pfandzeilen: die Pfandangabe, wie der Server sie fuehrt (siehe [InvoiceItemDeposit]). */
|
|
359
|
+
deposit?: InvoiceItemDeposit;
|
|
360
|
+
}
|
|
361
|
+
/** Die Pfandangabe einer gespeicherten Position (`getInvoice`): wie gesendet, dazu die Art der Pfandart. */
|
|
362
|
+
export interface InvoiceItemDeposit {
|
|
363
|
+
depositTypeId: string;
|
|
364
|
+
/** Einweg oder Mehrweg, vom Server aus der Pfandart gesetzt. */
|
|
365
|
+
depositKind: DepositKind;
|
|
366
|
+
depositFor: number;
|
|
367
|
+
gtin?: string;
|
|
368
|
+
ownFilling?: boolean;
|
|
336
369
|
}
|
|
337
370
|
/**
|
|
338
371
|
* Eine gebuchte Zahlung in `getInvoice`. Bei Altbestand kann jede Angabe ausser
|
|
@@ -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"];
|
|
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"];
|
|
31
31
|
export type InvoiceErrorCode = (typeof INVOICE_ERROR_CODES)[number];
|
|
32
32
|
/**
|
|
33
33
|
* Codes, die Anmeldung und Rand auf jedem Rechnungsaufruf erzeugen koennen,
|
|
@@ -210,6 +210,7 @@ export type Field = {
|
|
|
210
210
|
min?: number;
|
|
211
211
|
max: number;
|
|
212
212
|
format?: FieldFormat;
|
|
213
|
+
pattern?: string;
|
|
213
214
|
} | {
|
|
214
215
|
type: 'integer';
|
|
215
216
|
required: boolean;
|
|
@@ -270,9 +271,17 @@ export declare const CUSTOMER_FIELDS: Readonly<Record<string, Field>>;
|
|
|
270
271
|
* die bisher gerundet eingereicht werden mussten.
|
|
271
272
|
*/
|
|
272
273
|
export declare const ITEM_FIELDS: Readonly<Record<string, Field>>;
|
|
274
|
+
/**
|
|
275
|
+
* Pfandangabe an einer Position (seit 1.36.0, `deposit`): die Position ist eine
|
|
276
|
+
* Pfandzeile zu der Position `depositFor` (Index in `items`, 0 bis 499). Gleich
|
|
277
|
+
* dem Feld `DEPOSIT_FELD` des Backends. Zeile fuer Zeile Pfand sendet das
|
|
278
|
+
* Fremdsystem selbst; zu einer Position mit `articleId` leitet der Server das
|
|
279
|
+
* Pfand ab (`deposit_set_by_server`).
|
|
280
|
+
*/
|
|
281
|
+
export declare const DEPOSIT_ITEM_FIELD: Field;
|
|
273
282
|
/**
|
|
274
283
|
* Eine Rechnungsposition beim Ausstellen: die gemeinsamen Positionsfelder plus
|
|
275
|
-
* `reservationId` (seit 1.5.0). Die Reservierung aus der Lager-API
|
|
284
|
+
* `reservationId` (seit 1.5.0) und `deposit` (seit 1.36.0). Die Reservierung aus der Lager-API
|
|
276
285
|
* (`createReservation`) wird beim Ausstellen geprueft und beim Buchen der
|
|
277
286
|
* Rechnung eingeloest; die Position braucht dazu `articleId`. Unbekannt =
|
|
278
287
|
* `reservation_not_found`, schon eingeloest oder freigegeben =
|
|
@@ -287,8 +296,8 @@ export declare const INVOICE_ITEM_FIELDS: Readonly<Record<string, Field>>;
|
|
|
287
296
|
export declare const ITEM_PRICE_EXACTLY_ONE: readonly (readonly string[])[];
|
|
288
297
|
/**
|
|
289
298
|
* Eine Gutschriftsposition: die gemeinsamen Positionsfelder plus
|
|
290
|
-
* `returnDisposition` (wohin die zurueckgenommene Ware geht)
|
|
291
|
-
* `reservationId`. An einer Rechnungsposition weist der Server
|
|
299
|
+
* `returnDisposition` (wohin die zurueckgenommene Ware geht) und `deposit`
|
|
300
|
+
* (seit 1.36.0), ohne `reservationId`. An einer Rechnungsposition weist der Server
|
|
292
301
|
* `returnDisposition` als unbekannt ab.
|
|
293
302
|
*/
|
|
294
303
|
export declare const CREDIT_NOTE_ITEM_FIELDS: Readonly<Record<string, Field>>;
|