@kreiseck/kasseneck-api 0.31.0 → 0.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/cjs/models/cancellation.d.ts +1 -1
  3. package/dist/cjs/models/cancellation.js +1 -0
  4. package/dist/cjs/rechnung/index.d.ts +2 -2
  5. package/dist/cjs/rechnung/index.js +3 -1
  6. package/dist/cjs/rechnung/texte.d.ts +5 -5
  7. package/dist/cjs/rechnung/texte.js +10 -10
  8. package/dist/cjs/rechnung/typen.d.ts +13 -2
  9. package/dist/cjs/rechnung/vertrag.d.ts +5 -0
  10. package/dist/cjs/rechnung/vertrag.js +27 -2
  11. package/dist/esm/models/cancellation.d.ts +1 -1
  12. package/dist/esm/models/cancellation.js +1 -0
  13. package/dist/esm/rechnung/index.d.ts +2 -2
  14. package/dist/esm/rechnung/index.js +1 -1
  15. package/dist/esm/rechnung/texte.d.ts +5 -5
  16. package/dist/esm/rechnung/texte.js +10 -10
  17. package/dist/esm/rechnung/typen.d.ts +13 -2
  18. package/dist/esm/rechnung/vertrag.d.ts +5 -0
  19. package/dist/esm/rechnung/vertrag.js +26 -1
  20. package/fixtures/hobex-hps-codes.json +1 -1
  21. package/fixtures/kasse-texte.json +1 -1
  22. package/fixtures/oberflaeche.json +6 -1
  23. package/fixtures/rechnung-api-beispiele/credit-fehler-rueckgabe.json +26 -0
  24. package/fixtures/rechnung-api-beispiele/credit-rueckgabe.json +23 -0
  25. package/fixtures/rechnung-api-beispiele/issue-fehler-lagerkennung.json +27 -0
  26. package/fixtures/rechnung-api-beispiele/issue-fehler-rueckgabe.json +25 -0
  27. package/fixtures/rechnung-api-beispiele/issue-lager.json +22 -0
  28. package/fixtures/rechnung-api-beispiele/storno-fehler-rueckgabe.json +17 -0
  29. package/fixtures/rechnung-api.schema.json +37 -1
  30. package/fixtures/rechnung-texte.json +11 -11
  31. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,31 @@ Was vor 0.7.0 geschah, steht in der Commit-Historie (`git log`); ab hier wird
4
4
  es hier geführt. Ein Eintrag nennt die Änderung **und ihren Grund** —
5
5
  nur der Grund überlebt den nächsten Umbau.
6
6
 
7
+ ## 0.32.1
8
+
9
+ Halbgeviertstrich statt Geviertstrich in den sichtbaren Texten des Rechnungskatalogs
10
+ (`src/rechnung/texte.ts`, beide Sprachen): `pdf.lastschrift.warnung` („Bitte für Deckung sorgen – die
11
+ Kosten einer Rücklastschrift werden weiterverrechnet."), `pdf.fuss.hinweis`, der Reverse-Charge-Hinweis
12
+ und die Befreiungsgründe `einvoice.befreiung.kleinunternehmer`/`outsideScope`. Grund: deutsche Typografie
13
+ setzt als Gedankenstrich den Halbgeviertstrich mit Leerzeichen; der Geviertstrich stand nur hier.
14
+ Schlüssel, Platzhalter und alle übrigen Zeichen bleiben gleich; wer die Texte byteweise vergleicht
15
+ (PDF-/E-Rechnung-Goldens), zieht die fünf Sätze nach.
16
+
17
+ ## 0.32.0
18
+
19
+ Vertragsgleichstand mit dem Backend für Lager-Kern Stufe 2. Das Backend vendort nur die 0.x-Linie und
20
+ prüft daran seine Zwillingstests; darum kommen hier genau die Teile hinzu, die es dafür braucht – kein
21
+ neuer Aufruf, kein neues Verhalten der Kasse. Die Kassen-Aufrufe des Lagers gibt es nur in 1.x (ab 1.2.0).
22
+
23
+ - **Storno-Code `rueckgabe_ungueltig`** am Ende von `CANCELLATION_ERROR_CODES` (Zwilling von
24
+ `STORNO_FEHLERCODES`; unter `/v3` `invalid_return_disposition`). Grund: das Backend weist eine
25
+ Rückgabe-Wahl außerhalb von `lager|defekt|entsorgt` mit diesem Code ab, und die Kasse entscheidet am Code.
26
+ - **Rechnungs-API:** `items[].articleId`, `stockLocationId` an `issueInvoice`, `returnDisposition`
27
+ (`restock|defective|disposed`) an `cancelInvoice` und `createCreditNote`, dort auch je Position
28
+ (`CreditNoteItemInput`, `GUTSCHRIFT_POSITION_FELDER`); Schema `fixtures/rechnung-api.schema.json` und
29
+ sechs Beispiele. Grund: das Backend nimmt die Felder seit Stufe 2 an und vergleicht sein Schema in beide
30
+ Richtungen mit dem vendorierten.
31
+
7
32
  ## 0.31.0
8
33
 
9
34
  Texte und Einstellung für „Getrennt zahlen" an der Kasse (ein Tisch zahlt in Teilen, ein Beleg mit
@@ -41,7 +41,7 @@ export declare function isCancellationReason(value: unknown): value is Cancellat
41
41
  * diese Namen kommen mit der Umstellung des Pakets auf `/v3`.
42
42
  * [isCancellationErrorCode] prueft darum exakt.
43
43
  */
44
- export declare const CANCELLATION_ERROR_CODES: readonly ["beleg_nicht_gefunden", "belegart_nicht_stornierbar", "trainingsbeleg", "bereits_storniert", "position_ungueltig", "menge_ueber_rest", "grund_unbekannt", "anmerkung_zu_lang", "items_ungueltig", "kasse_nicht_zugewiesen", "keine_berechtigung", "nur_eigene_belege", "kasse_unvollstaendig", "storno_fehlgeschlagen", "STORNO_PAYMENTS_REQUIRED", "STORNO_REFUND_EXCEEDS_PAYMENT", "STORNO_REFUND_REFERENCE_REQUIRED", "STORNO_REFUND_REFERENCE_UNKNOWN", "STORNO_OUTCOME_UNKNOWN"];
44
+ export declare const CANCELLATION_ERROR_CODES: readonly ["beleg_nicht_gefunden", "belegart_nicht_stornierbar", "trainingsbeleg", "bereits_storniert", "position_ungueltig", "menge_ueber_rest", "grund_unbekannt", "anmerkung_zu_lang", "items_ungueltig", "kasse_nicht_zugewiesen", "keine_berechtigung", "nur_eigene_belege", "kasse_unvollstaendig", "storno_fehlgeschlagen", "STORNO_PAYMENTS_REQUIRED", "STORNO_REFUND_EXCEEDS_PAYMENT", "STORNO_REFUND_REFERENCE_REQUIRED", "STORNO_REFUND_REFERENCE_UNKNOWN", "STORNO_OUTCOME_UNKNOWN", "rueckgabe_ungueltig"];
45
45
  export type CancellationErrorCode = (typeof CANCELLATION_ERROR_CODES)[number];
46
46
  export declare function isCancellationErrorCode(value: unknown): value is CancellationErrorCode;
47
47
  /** Bezug eines Storno-Belegs auf sein Original. */
@@ -68,6 +68,7 @@ exports.CANCELLATION_ERROR_CODES = [
68
68
  'STORNO_REFUND_REFERENCE_REQUIRED', // Karten-Rueckzahlung ohne refundOf einer Kartenzahlung
69
69
  'STORNO_REFUND_REFERENCE_UNKNOWN', // refundOf nennt keine Zahlung des Originals
70
70
  'STORNO_OUTCOME_UNKNOWN', // Ausgang offen: Storno-Beleg evtl. schon signiert, nicht wiederholen
71
+ 'rueckgabe_ungueltig', // Lager-Kern Stufe 2: Rueckgabe-Wahl nicht lager, defekt oder entsorgt
71
72
  ];
72
73
  function isCancellationErrorCode(value) {
73
74
  return typeof value === 'string' && exports.CANCELLATION_ERROR_CODES.includes(value);
@@ -14,8 +14,8 @@ export { createRechnungApi, type RechnungApi, type RechnungApiOptions } from './
14
14
  export { rechnungKeyAuth, type RechnungKeyAuthOptions } from './auth.js';
15
15
  export { istRechnungFehler, rechnungFehlerCode, rechnungFeldFehler, type RechnungFeldFehler, } 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, CreditNoteRequest, CreditNoteResult, Customer, CustomerInput, CustomerPage, CustomerSearch, EInvoiceStatus, Invoice, InvoiceDetail, InvoiceItem, InvoiceItemInput, InvoiceListQuery, InvoicePage, InvoiceRecipient, InvoiceSetupGap, InvoiceSetupStatus, InvoiceTotals, InvoiceNotice, InvoicePayment, InvoicePreview, InvoiceRateTotals, 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, InvoiceItem, InvoiceItemInput, InvoiceListQuery, InvoicePage, InvoiceRecipient, InvoiceSetupGap, InvoiceSetupStatus, InvoiceTotals, InvoiceNotice, InvoicePayment, InvoicePreview, InvoiceRateTotals, IssueInvoiceRequest, IssueResult, PaymentInput, PreviewResult, RecordPaymentRequest, RecordPaymentResult, } from './typen.js';
18
18
  export { RECHNUNG_TEXTE, rechnungText, type RechnungTextSchluessel } from './texte.js';
19
19
  export { rechnungSummen, STEUERFREIE_FAELLE, type SummenPosition } from './summen.js';
20
20
  export { anteiligerPreis, BETRAG_GRENZE_CENTS, positionAusEuro, preisText, RechenFehler, rechnungRechnen, rund, satzSchluessel, satzText, type RechenErgebnis, type RechenFehlerCode, type RechenOptionen, type RechenPosition, type SatzSumme, type Umwandlung, type UmwandlungsGrund, type ZeilenBetrag, } from './rechnen.js';
21
- export { RECHNUNG_VERTRAG_VERSION, RECHNUNG_AUFRUFE, INVOICE_ERROR_CODES, CREDIT_NOTE_REASONS, TAX_SCHEMES, PRICE_MODES, VAT_RATES, CUSTOMER_TYPES, INVOICE_LIST_STATUS, DOC_TYPES, EINVOICE_FORMATS, INVOICE_LANGUAGES, INVOICE_PAYMENT_METHODS, ITEM_KINDS, REVERSE_CHARGE_REASONS, INVOICE_NOTICE_CODES, INVOICE_UNITS, RECHNUNG_EINHEITEN_CODES, INVOICE_SETUP_REQUIREMENTS, KUNDE_FELDER, POSITION_FELDER, POSITION_PREIS_GENAU_EINS, RECHNUNG_ANFRAGEN, RECHNUNG_GENAU_EINS, RECHNUNG_MINDESTENS_EINS, type RechnungAufruf, type InvoiceErrorCode, type CreditNoteReason, type TaxScheme, type PriceMode, type VatRatePercent, type CustomerType, type InvoiceListStatus, type DocType, type EInvoiceFormat, type InvoiceLanguage, type InvoicePaymentMethod, type ItemKind, type ReverseChargeReason, type InvoiceNoticeCode, type InvoiceUnit, type InvoiceSetupRequirement, type Format, type Feld, } from './vertrag.js';
21
+ export { RECHNUNG_VERTRAG_VERSION, RECHNUNG_AUFRUFE, INVOICE_ERROR_CODES, CREDIT_NOTE_REASONS, TAX_SCHEMES, PRICE_MODES, VAT_RATES, CUSTOMER_TYPES, INVOICE_LIST_STATUS, DOC_TYPES, EINVOICE_FORMATS, INVOICE_LANGUAGES, INVOICE_PAYMENT_METHODS, ITEM_KINDS, REVERSE_CHARGE_REASONS, INVOICE_NOTICE_CODES, INVOICE_UNITS, RECHNUNG_EINHEITEN_CODES, INVOICE_SETUP_REQUIREMENTS, KUNDE_FELDER, POSITION_FELDER, GUTSCHRIFT_POSITION_FELDER, RETURN_DISPOSITIONS, POSITION_PREIS_GENAU_EINS, RECHNUNG_ANFRAGEN, RECHNUNG_GENAU_EINS, RECHNUNG_MINDESTENS_EINS, type RechnungAufruf, type InvoiceErrorCode, type CreditNoteReason, type TaxScheme, type PriceMode, type VatRatePercent, type CustomerType, type InvoiceListStatus, type DocType, type EInvoiceFormat, type InvoiceLanguage, type InvoicePaymentMethod, type ItemKind, type ReverseChargeReason, type InvoiceNoticeCode, type InvoiceUnit, type ReturnDisposition, type InvoiceSetupRequirement, type Format, type Feld, } from './vertrag.js';
@@ -13,7 +13,7 @@
13
13
  */
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.INVOICE_UNITS = exports.INVOICE_NOTICE_CODES = exports.REVERSE_CHARGE_REASONS = exports.ITEM_KINDS = exports.INVOICE_PAYMENT_METHODS = exports.INVOICE_LANGUAGES = exports.EINVOICE_FORMATS = exports.DOC_TYPES = exports.INVOICE_LIST_STATUS = exports.CUSTOMER_TYPES = exports.VAT_RATES = exports.PRICE_MODES = exports.TAX_SCHEMES = exports.CREDIT_NOTE_REASONS = exports.INVOICE_ERROR_CODES = exports.RECHNUNG_AUFRUFE = exports.RECHNUNG_VERTRAG_VERSION = exports.satzText = exports.satzSchluessel = exports.rund = exports.rechnungRechnen = exports.RechenFehler = exports.preisText = exports.positionAusEuro = exports.BETRAG_GRENZE_CENTS = exports.anteiligerPreis = exports.STEUERFREIE_FAELLE = exports.rechnungSummen = exports.rechnungText = exports.RECHNUNG_TEXTE = exports.updateCustomer = exports.searchCustomers = exports.recordInvoicePayment = exports.previewInvoice = exports.listInvoices = exports.listBrands = exports.issueInvoice = exports.getInvoiceXml = exports.getInvoiceSetupStatus = exports.getInvoicePdf = exports.getInvoice = exports.getCustomer = exports.createCustomer = exports.createCreditNote = exports.cancelInvoice = exports.rechnungFeldFehler = exports.rechnungFehlerCode = exports.istRechnungFehler = exports.rechnungKeyAuth = exports.createRechnungApi = void 0;
16
- exports.RECHNUNG_MINDESTENS_EINS = exports.RECHNUNG_GENAU_EINS = exports.RECHNUNG_ANFRAGEN = exports.POSITION_PREIS_GENAU_EINS = exports.POSITION_FELDER = exports.KUNDE_FELDER = exports.INVOICE_SETUP_REQUIREMENTS = exports.RECHNUNG_EINHEITEN_CODES = void 0;
16
+ exports.RECHNUNG_MINDESTENS_EINS = exports.RECHNUNG_GENAU_EINS = exports.RECHNUNG_ANFRAGEN = exports.POSITION_PREIS_GENAU_EINS = exports.RETURN_DISPOSITIONS = exports.GUTSCHRIFT_POSITION_FELDER = exports.POSITION_FELDER = exports.KUNDE_FELDER = exports.INVOICE_SETUP_REQUIREMENTS = exports.RECHNUNG_EINHEITEN_CODES = void 0;
17
17
  var api_js_1 = require("./api.js");
18
18
  Object.defineProperty(exports, "createRechnungApi", { enumerable: true, get: function () { return api_js_1.createRechnungApi; } });
19
19
  var auth_js_1 = require("./auth.js");
@@ -76,6 +76,8 @@ Object.defineProperty(exports, "RECHNUNG_EINHEITEN_CODES", { enumerable: true, g
76
76
  Object.defineProperty(exports, "INVOICE_SETUP_REQUIREMENTS", { enumerable: true, get: function () { return vertrag_js_1.INVOICE_SETUP_REQUIREMENTS; } });
77
77
  Object.defineProperty(exports, "KUNDE_FELDER", { enumerable: true, get: function () { return vertrag_js_1.KUNDE_FELDER; } });
78
78
  Object.defineProperty(exports, "POSITION_FELDER", { enumerable: true, get: function () { return vertrag_js_1.POSITION_FELDER; } });
79
+ Object.defineProperty(exports, "GUTSCHRIFT_POSITION_FELDER", { enumerable: true, get: function () { return vertrag_js_1.GUTSCHRIFT_POSITION_FELDER; } });
80
+ Object.defineProperty(exports, "RETURN_DISPOSITIONS", { enumerable: true, get: function () { return vertrag_js_1.RETURN_DISPOSITIONS; } });
79
81
  Object.defineProperty(exports, "POSITION_PREIS_GENAU_EINS", { enumerable: true, get: function () { return vertrag_js_1.POSITION_PREIS_GENAU_EINS; } });
80
82
  Object.defineProperty(exports, "RECHNUNG_ANFRAGEN", { enumerable: true, get: function () { return vertrag_js_1.RECHNUNG_ANFRAGEN; } });
81
83
  Object.defineProperty(exports, "RECHNUNG_GENAU_EINS", { enumerable: true, get: function () { return vertrag_js_1.RECHNUNG_GENAU_EINS; } });
@@ -48,7 +48,7 @@ declare const DE: {
48
48
  readonly 'steuer.igLieferung.text': "Gemäß Art. 6 Abs. 1 UStG (Art. 138 MwSt-RL 2006/112/EG). Die Erwerbsbesteuerung erfolgt durch den Abnehmer im Bestimmungsland.";
49
49
  readonly 'steuer.ausfuhr': "Steuerfreie Ausfuhrlieferung (§ 6 Abs. 1 Z 1 UStG).";
50
50
  readonly 'steuer.reverseCharge.titel': "Steuerschuldnerschaft des Leistungsempfängers. ";
51
- readonly 'steuer.reverseCharge.text': "Übergang der Steuerschuld gem. Art. 196 MwSt-RL 2006/112/EG (innergemeinschaftliche Leistung). Die Leistung ist nicht steuerfrei — die Umsatzsteuer schuldet und entrichtet der Leistungsempfänger in seinem Land.";
51
+ readonly 'steuer.reverseCharge.text': "Übergang der Steuerschuld gem. Art. 196 MwSt-RL 2006/112/EG (innergemeinschaftliche Leistung). Die Leistung ist nicht steuerfrei – die Umsatzsteuer schuldet und entrichtet der Leistungsempfänger in seinem Land.";
52
52
  readonly 'steuer.uidZeile': "UID Leistungserbringer: {verkaeufer} · UID Leistungsempfänger: {kaeufer}";
53
53
  readonly 'steuer.rcGrund.construction': "Bauleistung gemäß § 19 Abs. 1a UStG.";
54
54
  readonly 'steuer.rcGrund.scrap': "Schrott und Abfallstoffe gemäß Schrott-Umsatzsteuerverordnung (BGBl. II Nr. 129/2007).";
@@ -84,7 +84,7 @@ declare const DE: {
84
84
  readonly 'pdf.lastschrift.konto': "Konto";
85
85
  readonly 'pdf.lastschrift.mandatsreferenz': "Mandatsreferenz";
86
86
  readonly 'pdf.lastschrift.mandatVom': "Mandat vom";
87
- readonly 'pdf.lastschrift.warnung': "Bitte für Deckung sorgen — die Kosten einer Rücklastschrift werden weiterverrechnet.";
87
+ readonly 'pdf.lastschrift.warnung': "Bitte für Deckung sorgen – die Kosten einer Rücklastschrift werden weiterverrechnet.";
88
88
  readonly 'pdf.erstattung.text': "Der Betrag wird auf dem ursprünglichen Zahlungsweg erstattet. Sie müssen nichts veranlassen.";
89
89
  readonly 'pdf.erstattung.bezug': "Bezug";
90
90
  readonly 'pdf.erstattung.betrag': "Erstattungsbetrag";
@@ -95,7 +95,7 @@ declare const DE: {
95
95
  readonly 'pdf.fuss.kontakt': "Kontakt";
96
96
  readonly 'pdf.fuss.register': "Register & Steuer";
97
97
  readonly 'pdf.fuss.sitz': "Sitz: {ort}";
98
- readonly 'pdf.fuss.hinweis': "Erstellt mit Kasseneck — ein Produkt der Kreiseck";
98
+ readonly 'pdf.fuss.hinweis': "Erstellt mit Kasseneck – ein Produkt der Kreiseck";
99
99
  readonly 'pdf.seite': "Seite {nummer} / {gesamt}";
100
100
  readonly 'land.AT': "Österreich";
101
101
  readonly 'land.DE': "Deutschland";
@@ -111,9 +111,9 @@ declare const DE: {
111
111
  readonly 'gutschrift.grund.incorrect_invoice': "Fehlerhafte Rechnung";
112
112
  readonly 'gutschrift.grund.other': "Sonstiges";
113
113
  readonly 'einvoice.befreiung.reverseCharge': "Steuerschuldnerschaft des Leistungsempfängers (Reverse Charge)";
114
- readonly 'einvoice.befreiung.kleinunternehmer': "Steuerbefreit — Kleinunternehmer gemäß §6 Abs. 1 Z 27 UStG";
114
+ readonly 'einvoice.befreiung.kleinunternehmer': "Steuerbefreit – Kleinunternehmer gemäß §6 Abs. 1 Z 27 UStG";
115
115
  readonly 'einvoice.befreiung.igLieferung': "Steuerfreie innergemeinschaftliche Lieferung gemäß Art. 6 Abs. 1 UStG";
116
- readonly 'einvoice.befreiung.outsideScope': "Nicht steuerbarer Umsatz — Leistungsort im Ausland (§ 3a Abs. 6 UStG)";
116
+ readonly 'einvoice.befreiung.outsideScope': "Nicht steuerbarer Umsatz – Leistungsort im Ausland (§ 3a Abs. 6 UStG)";
117
117
  readonly 'einvoice.befreiung.ausfuhr': "Steuerfreie Ausfuhrlieferung gemäß §6 Abs. 1 Z 1 UStG";
118
118
  readonly 'einvoice.zahlbarBis': "Zahlbar bis {datum}";
119
119
  readonly 'einheit.piece': "Stk";
@@ -41,7 +41,7 @@ const DE = {
41
41
  // wortgleich in Art. 226 Nr. 11a MwSt-RL). „Steuerfrei" waere sachlich falsch
42
42
  // und erbraechte den vorgeschriebenen Hinweis nicht.
43
43
  'steuer.reverseCharge.titel': 'Steuerschuldnerschaft des Leistungsempfängers. ',
44
- 'steuer.reverseCharge.text': 'Übergang der Steuerschuld gem. Art. 196 MwSt-RL 2006/112/EG (innergemeinschaftliche Leistung). Die Leistung ist nicht steuerfrei — die Umsatzsteuer schuldet und entrichtet der Leistungsempfänger in seinem Land.',
44
+ 'steuer.reverseCharge.text': 'Übergang der Steuerschuld gem. Art. 196 MwSt-RL 2006/112/EG (innergemeinschaftliche Leistung). Die Leistung ist nicht steuerfrei – die Umsatzsteuer schuldet und entrichtet der Leistungsempfänger in seinem Land.',
45
45
  // Beide UID-Nummern: bei Reverse Charge § 11 Abs. 1a, bei der ig. Lieferung
46
46
  // Art. 11 Abs. 2 UStG.
47
47
  'steuer.uidZeile': 'UID Leistungserbringer: {verkaeufer} · UID Leistungsempfänger: {kaeufer}',
@@ -81,7 +81,7 @@ const DE = {
81
81
  'pdf.lastschrift.konto': 'Konto',
82
82
  'pdf.lastschrift.mandatsreferenz': 'Mandatsreferenz',
83
83
  'pdf.lastschrift.mandatVom': 'Mandat vom',
84
- 'pdf.lastschrift.warnung': 'Bitte für Deckung sorgen — die Kosten einer Rücklastschrift werden weiterverrechnet.',
84
+ 'pdf.lastschrift.warnung': 'Bitte für Deckung sorgen – die Kosten einer Rücklastschrift werden weiterverrechnet.',
85
85
  'pdf.erstattung.text': 'Der Betrag wird auf dem ursprünglichen Zahlungsweg erstattet. Sie müssen nichts veranlassen.',
86
86
  'pdf.erstattung.bezug': 'Bezug',
87
87
  'pdf.erstattung.betrag': 'Erstattungsbetrag',
@@ -92,7 +92,7 @@ const DE = {
92
92
  'pdf.fuss.kontakt': 'Kontakt',
93
93
  'pdf.fuss.register': 'Register & Steuer',
94
94
  'pdf.fuss.sitz': 'Sitz: {ort}',
95
- 'pdf.fuss.hinweis': 'Erstellt mit Kasseneck — ein Produkt der Kreiseck',
95
+ 'pdf.fuss.hinweis': 'Erstellt mit Kasseneck – ein Produkt der Kreiseck',
96
96
  'pdf.seite': 'Seite {nummer} / {gesamt}',
97
97
  'land.AT': 'Österreich',
98
98
  'land.DE': 'Deutschland',
@@ -108,9 +108,9 @@ const DE = {
108
108
  'gutschrift.grund.incorrect_invoice': 'Fehlerhafte Rechnung',
109
109
  'gutschrift.grund.other': 'Sonstiges',
110
110
  'einvoice.befreiung.reverseCharge': 'Steuerschuldnerschaft des Leistungsempfängers (Reverse Charge)',
111
- 'einvoice.befreiung.kleinunternehmer': 'Steuerbefreit — Kleinunternehmer gemäß §6 Abs. 1 Z 27 UStG',
111
+ 'einvoice.befreiung.kleinunternehmer': 'Steuerbefreit – Kleinunternehmer gemäß §6 Abs. 1 Z 27 UStG',
112
112
  'einvoice.befreiung.igLieferung': 'Steuerfreie innergemeinschaftliche Lieferung gemäß Art. 6 Abs. 1 UStG',
113
- 'einvoice.befreiung.outsideScope': 'Nicht steuerbarer Umsatz — Leistungsort im Ausland (§ 3a Abs. 6 UStG)',
113
+ 'einvoice.befreiung.outsideScope': 'Nicht steuerbarer Umsatz – Leistungsort im Ausland (§ 3a Abs. 6 UStG)',
114
114
  'einvoice.befreiung.ausfuhr': 'Steuerfreie Ausfuhrlieferung gemäß §6 Abs. 1 Z 1 UStG',
115
115
  'einvoice.zahlbarBis': 'Zahlbar bis {datum}',
116
116
  'einheit.piece': 'Stk',
@@ -247,7 +247,7 @@ const EN = {
247
247
  'steuer.igLieferung.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.',
248
248
  'steuer.ausfuhr': 'VAT-exempt export delivery (§ 6 (1) no. 1 UStG).',
249
249
  'steuer.reverseCharge.titel': 'Reverse charge – VAT liability of the recipient. ',
250
- 'steuer.reverseCharge.text': 'VAT liability transferred pursuant to Art. 196 of VAT Directive 2006/112/EC (intra-Community service). The service is not VAT-exempt — the recipient owes and accounts for the VAT in their country.',
250
+ 'steuer.reverseCharge.text': 'VAT liability transferred pursuant to Art. 196 of VAT Directive 2006/112/EC (intra-Community service). The service is not VAT-exempt – the recipient owes and accounts for the VAT in their country.',
251
251
  'steuer.uidZeile': 'VAT ID supplier: {verkaeufer} · VAT ID recipient: {kaeufer}',
252
252
  'steuer.rcGrund.construction': 'Construction work pursuant to § 19 (1a) UStG.',
253
253
  'steuer.rcGrund.scrap': 'Scrap and waste materials pursuant to the Austrian scrap VAT regulation (BGBl. II No. 129/2007).',
@@ -283,7 +283,7 @@ const EN = {
283
283
  'pdf.lastschrift.konto': 'Account',
284
284
  'pdf.lastschrift.mandatsreferenz': 'Mandate reference',
285
285
  'pdf.lastschrift.mandatVom': 'Mandate date',
286
- 'pdf.lastschrift.warnung': 'Please ensure sufficient funds — the costs of a returned direct debit will be charged to you.',
286
+ 'pdf.lastschrift.warnung': 'Please ensure sufficient funds – the costs of a returned direct debit will be charged to you.',
287
287
  'pdf.erstattung.text': 'The amount will be refunded via the original payment method. No action is required on your part.',
288
288
  'pdf.erstattung.bezug': 'Reference',
289
289
  'pdf.erstattung.betrag': 'Refund amount',
@@ -294,7 +294,7 @@ const EN = {
294
294
  'pdf.fuss.kontakt': 'Contact',
295
295
  'pdf.fuss.register': 'Registration & tax',
296
296
  'pdf.fuss.sitz': 'Registered office: {ort}',
297
- 'pdf.fuss.hinweis': 'Created with Kasseneck — a Kreiseck product',
297
+ 'pdf.fuss.hinweis': 'Created with Kasseneck – a Kreiseck product',
298
298
  'pdf.seite': 'Page {nummer} / {gesamt}',
299
299
  'land.AT': 'Austria',
300
300
  'land.DE': 'Germany',
@@ -310,9 +310,9 @@ const EN = {
310
310
  'gutschrift.grund.incorrect_invoice': 'Incorrect invoice',
311
311
  'gutschrift.grund.other': 'Other',
312
312
  'einvoice.befreiung.reverseCharge': 'Reverse charge – VAT liability of the recipient',
313
- 'einvoice.befreiung.kleinunternehmer': 'VAT exempt — small business pursuant to § 6 (1) no. 27 UStG',
313
+ 'einvoice.befreiung.kleinunternehmer': 'VAT exempt – small business pursuant to § 6 (1) no. 27 UStG',
314
314
  'einvoice.befreiung.igLieferung': 'VAT-exempt intra-Community supply pursuant to Art. 6 (1) UStG',
315
- 'einvoice.befreiung.outsideScope': 'Outside the scope of VAT — place of supply abroad (§ 3a (6) UStG)',
315
+ 'einvoice.befreiung.outsideScope': 'Outside the scope of VAT – place of supply abroad (§ 3a (6) UStG)',
316
316
  'einvoice.befreiung.ausfuhr': 'VAT-exempt export delivery pursuant to § 6 (1) no. 1 UStG',
317
317
  'einvoice.zahlbarBis': 'Payable by {datum}',
318
318
  'einheit.piece': 'pcs',
@@ -5,7 +5,7 @@
5
5
  * Betraege sind ueberall ganze Cent. Datumsangaben sind `YYYY-MM-DD` nach
6
6
  * Wiener Kalender.
7
7
  */
8
- import type { CreditNoteReason, CustomerType, DocType, InvoiceLanguage, InvoiceNoticeCode, ItemKind, ReverseChargeReason, InvoicePaymentMethod, InvoiceUnit, InvoiceSetupRequirement, InvoiceListStatus, PriceMode, TaxScheme, VatRatePercent } from './vertrag.js';
8
+ import type { CreditNoteReason, CustomerType, DocType, InvoiceLanguage, InvoiceNoticeCode, ItemKind, ReverseChargeReason, InvoicePaymentMethod, InvoiceUnit, ReturnDisposition, InvoiceSetupRequirement, InvoiceListStatus, PriceMode, TaxScheme, VatRatePercent } from './vertrag.js';
9
9
  export interface CustomerInput {
10
10
  type: CustomerType;
11
11
  name: string;
@@ -86,6 +86,13 @@ export interface InvoiceItemInput {
86
86
  vatRate: VatRatePercent;
87
87
  /** Zeilenrabatt in Prozent, hoechstens zwei Nachkommastellen. */
88
88
  discountPct?: number;
89
+ /** Artikel aus dem Artikelstamm; bestandsgefuehrt bucht das Ausstellen ihn vom Lager ab. */
90
+ articleId?: string;
91
+ }
92
+ /** Eine Gutschriftsposition: wie eine Rechnungsposition, dazu die Rueckgabe-Wahl. */
93
+ export interface CreditNoteItemInput extends InvoiceItemInput {
94
+ /** Wohin die Ware dieser Position geht; fehlt = Vorgabe des Aufrufs bzw. `restock`. */
95
+ returnDisposition?: ReturnDisposition;
89
96
  }
90
97
  export interface IssueInvoiceRequest {
91
98
  /** Pflicht: dieselbe Anfrage mit demselben Schluessel erzeugt nie eine zweite Rechnung. */
@@ -115,6 +122,8 @@ export interface IssueInvoiceRequest {
115
122
  language?: InvoiceLanguage;
116
123
  /** Marke (Kennung aus `listBrands`); sonst die Standardmarke. Unbekannt = `brand_not_found`. */
117
124
  brandId?: string;
125
+ /** Lager-Standort fuer bestandsgefuehrte Positionen; sonst der Standard-Standort. */
126
+ stockLocationId?: string;
118
127
  /**
119
128
  * Schon bezahlt (Shop kassiert online, Rechnung folgt). Die Zahlung entsteht
120
129
  * in derselben Transaktion wie das Festschreiben: das PDF traegt dann keine
@@ -175,9 +184,11 @@ export interface CancelInvoiceRequest {
175
184
  invoiceId: string;
176
185
  reason: CreditNoteReason;
177
186
  note?: string;
187
+ /** Wohin die Ware bestandsgefuehrter Positionen geht; fehlt = `restock`. */
188
+ returnDisposition?: ReturnDisposition;
178
189
  }
179
190
  export interface CreditNoteRequest extends CancelInvoiceRequest {
180
- items: InvoiceItemInput[];
191
+ items: CreditNoteItemInput[];
181
192
  }
182
193
  /**
183
194
  * Summen einer Rechnung in Cent, **immer positiv** — auch bei einer Gutschrift
@@ -228,6 +228,9 @@ export type Feld = {
228
228
  schluesselMuster: string;
229
229
  wertMax: number;
230
230
  };
231
+ /** Rueckgabe-Wahl einer Gutschrift (Lager-Kern Stufe 2), wie im Backend RUECKGABE_API. */
232
+ export declare const RETURN_DISPOSITIONS: readonly ["restock", "defective", "disposed"];
233
+ export type ReturnDisposition = (typeof RETURN_DISPOSITIONS)[number];
231
234
  /** Kunde, wie das Fremdsystem ihn schickt. `vatId` ist die UID-Nummer. */
232
235
  export declare const KUNDE_FELDER: Readonly<Record<string, Feld>>;
233
236
  /**
@@ -243,6 +246,8 @@ export declare const KUNDE_FELDER: Readonly<Record<string, Feld>>;
243
246
  export declare const POSITION_FELDER: Readonly<Record<string, Feld>>;
244
247
  /** Genau einer der beiden Preise je Position (§ 9.1). */
245
248
  export declare const POSITION_PREIS_GENAU_EINS: readonly (readonly string[])[];
249
+ /** Gutschriftsposition: Rechnungsposition plus Rueckgabe-Wahl (an der Rechnung weist der Server sie ab). */
250
+ export declare const GUTSCHRIFT_POSITION_FELDER: Readonly<Record<string, Feld>>;
246
251
  /**
247
252
  * Eine Zahlung zu einer Rechnung. Ohne `amountCents` gilt der volle
248
253
  * Bruttobetrag, ohne `paidAt` der heutige Wiener Tag. `reference` ist die
@@ -19,7 +19,7 @@
19
19
  * Nummer, Summen — ist bewusst **nicht** setzbar.
20
20
  */
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.RECHNUNG_MINDESTENS_EINS = exports.RECHNUNG_GENAU_EINS = exports.RECHNUNG_ANFRAGEN = exports.PAYMENT_FELDER = exports.POSITION_PREIS_GENAU_EINS = exports.POSITION_FELDER = exports.KUNDE_FELDER = exports.INVOICE_SETUP_REQUIREMENTS = exports.RECHNUNG_EINHEITEN_CODES = exports.INVOICE_UNITS = exports.INVOICE_NOTICE_CODES = exports.INVOICE_PAYMENT_METHODS = exports.INVOICE_LANGUAGES = exports.EINVOICE_FORMATS = exports.DOC_TYPES = exports.INVOICE_LIST_STATUS = exports.CUSTOMER_TYPES = exports.VAT_RATES = exports.PRICE_MODES = exports.ITEM_KINDS = exports.REVERSE_CHARGE_REASONS = exports.TAX_SCHEMES = exports.CREDIT_NOTE_REASONS = exports.INVOICE_ERROR_CODES = exports.RECHNUNG_AUFRUFE = exports.RECHNUNG_VERTRAG_VERSION = void 0;
22
+ exports.RECHNUNG_MINDESTENS_EINS = exports.RECHNUNG_GENAU_EINS = exports.RECHNUNG_ANFRAGEN = exports.PAYMENT_FELDER = exports.GUTSCHRIFT_POSITION_FELDER = exports.POSITION_PREIS_GENAU_EINS = exports.POSITION_FELDER = exports.KUNDE_FELDER = exports.RETURN_DISPOSITIONS = exports.INVOICE_SETUP_REQUIREMENTS = exports.RECHNUNG_EINHEITEN_CODES = exports.INVOICE_UNITS = exports.INVOICE_NOTICE_CODES = exports.INVOICE_PAYMENT_METHODS = exports.INVOICE_LANGUAGES = exports.EINVOICE_FORMATS = exports.DOC_TYPES = exports.INVOICE_LIST_STATUS = exports.CUSTOMER_TYPES = exports.VAT_RATES = exports.PRICE_MODES = exports.ITEM_KINDS = exports.REVERSE_CHARGE_REASONS = exports.TAX_SCHEMES = exports.CREDIT_NOTE_REASONS = exports.INVOICE_ERROR_CODES = exports.RECHNUNG_AUFRUFE = exports.RECHNUNG_VERTRAG_VERSION = void 0;
23
23
  exports.RECHNUNG_VERTRAG_VERSION = 1;
24
24
  exports.RECHNUNG_AUFRUFE = [
25
25
  'createCustomer',
@@ -309,6 +309,9 @@ exports.INVOICE_SETUP_REQUIREMENTS = [
309
309
  const text = (max, pflicht = false, extra = {}) => ({ typ: 'string', pflicht, max, ...(pflicht && extra.min === undefined ? { min: 1 } : {}), ...extra });
310
310
  const idempotencyKey = (pflicht) => ({ typ: 'string', pflicht, min: 1, max: 120 });
311
311
  const id = { typ: 'string', pflicht: false, min: 1, max: 128 };
312
+ /** Rueckgabe-Wahl einer Gutschrift (Lager-Kern Stufe 2), wie im Backend RUECKGABE_API. */
313
+ exports.RETURN_DISPOSITIONS = ['restock', 'defective', 'disposed'];
314
+ const rueckgabe = { typ: 'enum', pflicht: false, werte: exports.RETURN_DISPOSITIONS };
312
315
  const idPflicht = { typ: 'string', pflicht: true, min: 1, max: 128 };
313
316
  const datum = (pflicht = false) => ({ typ: 'string', pflicht, min: 10, max: 10, format: 'date' });
314
317
  const limit = { typ: 'integer', pflicht: false, min: 1, max: 100 };
@@ -359,6 +362,13 @@ exports.POSITION_FELDER = Object.freeze({
359
362
  unitPriceMicros: { typ: 'integer', pflicht: false, min: 0, max: 1_000_000_000_000 },
360
363
  vatRate: { typ: 'enum', pflicht: true, werte: exports.VAT_RATES },
361
364
  discountPct: { typ: 'number', pflicht: false, min: 0, max: 100, nachkomma: 2 },
365
+ /**
366
+ * Artikel aus dem Artikelstamm (Lager-Kern Stufe 2): ist er bestandsgefuehrt
367
+ * und das Modul Lager aktiv, bucht das Ausstellen ihn ab -- danach, die
368
+ * Rechnung scheitert nie am Lager. Kein „/“, nicht „.“, „..“ oder „__…__“
369
+ * (prueft der Server, `validation`).
370
+ */
371
+ articleId: id,
362
372
  });
363
373
  /** Genau einer der beiden Preise je Position (§ 9.1). */
364
374
  exports.POSITION_PREIS_GENAU_EINS = Object.freeze([
@@ -374,6 +384,17 @@ const positionen = {
374
384
  typ: 'object', pflicht: true, felder: exports.POSITION_FELDER, genauEins: exports.POSITION_PREIS_GENAU_EINS,
375
385
  },
376
386
  };
387
+ /** Gutschriftsposition: Rechnungsposition plus Rueckgabe-Wahl (an der Rechnung weist der Server sie ab). */
388
+ exports.GUTSCHRIFT_POSITION_FELDER = Object.freeze({ ...exports.POSITION_FELDER, returnDisposition: rueckgabe });
389
+ const gutschriftPositionen = {
390
+ typ: 'list',
391
+ pflicht: true,
392
+ min: 1,
393
+ max: 500,
394
+ eintrag: {
395
+ typ: 'object', pflicht: true, felder: exports.GUTSCHRIFT_POSITION_FELDER, genauEins: exports.POSITION_PREIS_GENAU_EINS,
396
+ },
397
+ };
377
398
  /**
378
399
  * Eine Zahlung zu einer Rechnung. Ohne `amountCents` gilt der volle
379
400
  * Bruttobetrag, ohne `paidAt` der heutige Wiener Tag. `reference` ist die
@@ -441,6 +462,8 @@ exports.RECHNUNG_ANFRAGEN = Object.freeze({
441
462
  language: { typ: 'enum', pflicht: false, werte: exports.INVOICE_LANGUAGES },
442
463
  /** Marke (Kennung aus `listBrands`); sonst die Standardmarke. */
443
464
  brandId: id,
465
+ /** Lagerstandort (Kennung), von dem bestandsgefuehrte Positionen abbuchen. */
466
+ stockLocationId: id,
444
467
  /**
445
468
  * Schon bezahlt: die Zahlung entsteht in **derselben** Transaktion wie das
446
469
  * Festschreiben. Sonst gaebe es einen Moment, in dem die Rechnung offen ist
@@ -459,13 +482,15 @@ exports.RECHNUNG_ANFRAGEN = Object.freeze({
459
482
  invoiceId: idPflicht,
460
483
  reason: { typ: 'enum', pflicht: true, werte: exports.CREDIT_NOTE_REASONS },
461
484
  note: text(2000),
485
+ returnDisposition: rueckgabe,
462
486
  },
463
487
  createCreditNote: {
464
488
  idempotencyKey: idempotencyKey(true),
465
489
  invoiceId: idPflicht,
466
490
  reason: { typ: 'enum', pflicht: true, werte: exports.CREDIT_NOTE_REASONS },
467
491
  note: text(2000),
468
- items: positionen,
492
+ returnDisposition: rueckgabe,
493
+ items: gutschriftPositionen,
469
494
  },
470
495
  getInvoice: {
471
496
  invoiceId: id,
@@ -41,7 +41,7 @@ export declare function isCancellationReason(value: unknown): value is Cancellat
41
41
  * diese Namen kommen mit der Umstellung des Pakets auf `/v3`.
42
42
  * [isCancellationErrorCode] prueft darum exakt.
43
43
  */
44
- export declare const CANCELLATION_ERROR_CODES: readonly ["beleg_nicht_gefunden", "belegart_nicht_stornierbar", "trainingsbeleg", "bereits_storniert", "position_ungueltig", "menge_ueber_rest", "grund_unbekannt", "anmerkung_zu_lang", "items_ungueltig", "kasse_nicht_zugewiesen", "keine_berechtigung", "nur_eigene_belege", "kasse_unvollstaendig", "storno_fehlgeschlagen", "STORNO_PAYMENTS_REQUIRED", "STORNO_REFUND_EXCEEDS_PAYMENT", "STORNO_REFUND_REFERENCE_REQUIRED", "STORNO_REFUND_REFERENCE_UNKNOWN", "STORNO_OUTCOME_UNKNOWN"];
44
+ export declare const CANCELLATION_ERROR_CODES: readonly ["beleg_nicht_gefunden", "belegart_nicht_stornierbar", "trainingsbeleg", "bereits_storniert", "position_ungueltig", "menge_ueber_rest", "grund_unbekannt", "anmerkung_zu_lang", "items_ungueltig", "kasse_nicht_zugewiesen", "keine_berechtigung", "nur_eigene_belege", "kasse_unvollstaendig", "storno_fehlgeschlagen", "STORNO_PAYMENTS_REQUIRED", "STORNO_REFUND_EXCEEDS_PAYMENT", "STORNO_REFUND_REFERENCE_REQUIRED", "STORNO_REFUND_REFERENCE_UNKNOWN", "STORNO_OUTCOME_UNKNOWN", "rueckgabe_ungueltig"];
45
45
  export type CancellationErrorCode = (typeof CANCELLATION_ERROR_CODES)[number];
46
46
  export declare function isCancellationErrorCode(value: unknown): value is CancellationErrorCode;
47
47
  /** Bezug eines Storno-Belegs auf sein Original. */
@@ -62,6 +62,7 @@ export const CANCELLATION_ERROR_CODES = [
62
62
  'STORNO_REFUND_REFERENCE_REQUIRED', // Karten-Rueckzahlung ohne refundOf einer Kartenzahlung
63
63
  'STORNO_REFUND_REFERENCE_UNKNOWN', // refundOf nennt keine Zahlung des Originals
64
64
  'STORNO_OUTCOME_UNKNOWN', // Ausgang offen: Storno-Beleg evtl. schon signiert, nicht wiederholen
65
+ 'rueckgabe_ungueltig', // Lager-Kern Stufe 2: Rueckgabe-Wahl nicht lager, defekt oder entsorgt
65
66
  ];
66
67
  export function isCancellationErrorCode(value) {
67
68
  return typeof value === 'string' && CANCELLATION_ERROR_CODES.includes(value);
@@ -14,8 +14,8 @@ export { createRechnungApi, type RechnungApi, type RechnungApiOptions } from './
14
14
  export { rechnungKeyAuth, type RechnungKeyAuthOptions } from './auth.js';
15
15
  export { istRechnungFehler, rechnungFehlerCode, rechnungFeldFehler, type RechnungFeldFehler, } 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, CreditNoteRequest, CreditNoteResult, Customer, CustomerInput, CustomerPage, CustomerSearch, EInvoiceStatus, Invoice, InvoiceDetail, InvoiceItem, InvoiceItemInput, InvoiceListQuery, InvoicePage, InvoiceRecipient, InvoiceSetupGap, InvoiceSetupStatus, InvoiceTotals, InvoiceNotice, InvoicePayment, InvoicePreview, InvoiceRateTotals, 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, InvoiceItem, InvoiceItemInput, InvoiceListQuery, InvoicePage, InvoiceRecipient, InvoiceSetupGap, InvoiceSetupStatus, InvoiceTotals, InvoiceNotice, InvoicePayment, InvoicePreview, InvoiceRateTotals, IssueInvoiceRequest, IssueResult, PaymentInput, PreviewResult, RecordPaymentRequest, RecordPaymentResult, } from './typen.js';
18
18
  export { RECHNUNG_TEXTE, rechnungText, type RechnungTextSchluessel } from './texte.js';
19
19
  export { rechnungSummen, STEUERFREIE_FAELLE, type SummenPosition } from './summen.js';
20
20
  export { anteiligerPreis, BETRAG_GRENZE_CENTS, positionAusEuro, preisText, RechenFehler, rechnungRechnen, rund, satzSchluessel, satzText, type RechenErgebnis, type RechenFehlerCode, type RechenOptionen, type RechenPosition, type SatzSumme, type Umwandlung, type UmwandlungsGrund, type ZeilenBetrag, } from './rechnen.js';
21
- export { RECHNUNG_VERTRAG_VERSION, RECHNUNG_AUFRUFE, INVOICE_ERROR_CODES, CREDIT_NOTE_REASONS, TAX_SCHEMES, PRICE_MODES, VAT_RATES, CUSTOMER_TYPES, INVOICE_LIST_STATUS, DOC_TYPES, EINVOICE_FORMATS, INVOICE_LANGUAGES, INVOICE_PAYMENT_METHODS, ITEM_KINDS, REVERSE_CHARGE_REASONS, INVOICE_NOTICE_CODES, INVOICE_UNITS, RECHNUNG_EINHEITEN_CODES, INVOICE_SETUP_REQUIREMENTS, KUNDE_FELDER, POSITION_FELDER, POSITION_PREIS_GENAU_EINS, RECHNUNG_ANFRAGEN, RECHNUNG_GENAU_EINS, RECHNUNG_MINDESTENS_EINS, type RechnungAufruf, type InvoiceErrorCode, type CreditNoteReason, type TaxScheme, type PriceMode, type VatRatePercent, type CustomerType, type InvoiceListStatus, type DocType, type EInvoiceFormat, type InvoiceLanguage, type InvoicePaymentMethod, type ItemKind, type ReverseChargeReason, type InvoiceNoticeCode, type InvoiceUnit, type InvoiceSetupRequirement, type Format, type Feld, } from './vertrag.js';
21
+ export { RECHNUNG_VERTRAG_VERSION, RECHNUNG_AUFRUFE, INVOICE_ERROR_CODES, CREDIT_NOTE_REASONS, TAX_SCHEMES, PRICE_MODES, VAT_RATES, CUSTOMER_TYPES, INVOICE_LIST_STATUS, DOC_TYPES, EINVOICE_FORMATS, INVOICE_LANGUAGES, INVOICE_PAYMENT_METHODS, ITEM_KINDS, REVERSE_CHARGE_REASONS, INVOICE_NOTICE_CODES, INVOICE_UNITS, RECHNUNG_EINHEITEN_CODES, INVOICE_SETUP_REQUIREMENTS, KUNDE_FELDER, POSITION_FELDER, GUTSCHRIFT_POSITION_FELDER, RETURN_DISPOSITIONS, POSITION_PREIS_GENAU_EINS, RECHNUNG_ANFRAGEN, RECHNUNG_GENAU_EINS, RECHNUNG_MINDESTENS_EINS, type RechnungAufruf, type InvoiceErrorCode, type CreditNoteReason, type TaxScheme, type PriceMode, type VatRatePercent, type CustomerType, type InvoiceListStatus, type DocType, type EInvoiceFormat, type InvoiceLanguage, type InvoicePaymentMethod, type ItemKind, type ReverseChargeReason, type InvoiceNoticeCode, type InvoiceUnit, type ReturnDisposition, type InvoiceSetupRequirement, type Format, type Feld, } from './vertrag.js';
@@ -17,4 +17,4 @@ export { cancelInvoice, createCreditNote, createCustomer, getCustomer, getInvoic
17
17
  export { RECHNUNG_TEXTE, rechnungText } from './texte.js';
18
18
  export { rechnungSummen, STEUERFREIE_FAELLE } from './summen.js';
19
19
  export { anteiligerPreis, BETRAG_GRENZE_CENTS, positionAusEuro, preisText, RechenFehler, rechnungRechnen, rund, satzSchluessel, satzText, } from './rechnen.js';
20
- export { RECHNUNG_VERTRAG_VERSION, RECHNUNG_AUFRUFE, INVOICE_ERROR_CODES, CREDIT_NOTE_REASONS, TAX_SCHEMES, PRICE_MODES, VAT_RATES, CUSTOMER_TYPES, INVOICE_LIST_STATUS, DOC_TYPES, EINVOICE_FORMATS, INVOICE_LANGUAGES, INVOICE_PAYMENT_METHODS, ITEM_KINDS, REVERSE_CHARGE_REASONS, INVOICE_NOTICE_CODES, INVOICE_UNITS, RECHNUNG_EINHEITEN_CODES, INVOICE_SETUP_REQUIREMENTS, KUNDE_FELDER, POSITION_FELDER, POSITION_PREIS_GENAU_EINS, RECHNUNG_ANFRAGEN, RECHNUNG_GENAU_EINS, RECHNUNG_MINDESTENS_EINS, } from './vertrag.js';
20
+ export { RECHNUNG_VERTRAG_VERSION, RECHNUNG_AUFRUFE, INVOICE_ERROR_CODES, CREDIT_NOTE_REASONS, TAX_SCHEMES, PRICE_MODES, VAT_RATES, CUSTOMER_TYPES, INVOICE_LIST_STATUS, DOC_TYPES, EINVOICE_FORMATS, INVOICE_LANGUAGES, INVOICE_PAYMENT_METHODS, ITEM_KINDS, REVERSE_CHARGE_REASONS, INVOICE_NOTICE_CODES, INVOICE_UNITS, RECHNUNG_EINHEITEN_CODES, INVOICE_SETUP_REQUIREMENTS, KUNDE_FELDER, POSITION_FELDER, GUTSCHRIFT_POSITION_FELDER, RETURN_DISPOSITIONS, POSITION_PREIS_GENAU_EINS, RECHNUNG_ANFRAGEN, RECHNUNG_GENAU_EINS, RECHNUNG_MINDESTENS_EINS, } from './vertrag.js';
@@ -48,7 +48,7 @@ declare const DE: {
48
48
  readonly 'steuer.igLieferung.text': "Gemäß Art. 6 Abs. 1 UStG (Art. 138 MwSt-RL 2006/112/EG). Die Erwerbsbesteuerung erfolgt durch den Abnehmer im Bestimmungsland.";
49
49
  readonly 'steuer.ausfuhr': "Steuerfreie Ausfuhrlieferung (§ 6 Abs. 1 Z 1 UStG).";
50
50
  readonly 'steuer.reverseCharge.titel': "Steuerschuldnerschaft des Leistungsempfängers. ";
51
- readonly 'steuer.reverseCharge.text': "Übergang der Steuerschuld gem. Art. 196 MwSt-RL 2006/112/EG (innergemeinschaftliche Leistung). Die Leistung ist nicht steuerfrei — die Umsatzsteuer schuldet und entrichtet der Leistungsempfänger in seinem Land.";
51
+ readonly 'steuer.reverseCharge.text': "Übergang der Steuerschuld gem. Art. 196 MwSt-RL 2006/112/EG (innergemeinschaftliche Leistung). Die Leistung ist nicht steuerfrei – die Umsatzsteuer schuldet und entrichtet der Leistungsempfänger in seinem Land.";
52
52
  readonly 'steuer.uidZeile': "UID Leistungserbringer: {verkaeufer} · UID Leistungsempfänger: {kaeufer}";
53
53
  readonly 'steuer.rcGrund.construction': "Bauleistung gemäß § 19 Abs. 1a UStG.";
54
54
  readonly 'steuer.rcGrund.scrap': "Schrott und Abfallstoffe gemäß Schrott-Umsatzsteuerverordnung (BGBl. II Nr. 129/2007).";
@@ -84,7 +84,7 @@ declare const DE: {
84
84
  readonly 'pdf.lastschrift.konto': "Konto";
85
85
  readonly 'pdf.lastschrift.mandatsreferenz': "Mandatsreferenz";
86
86
  readonly 'pdf.lastschrift.mandatVom': "Mandat vom";
87
- readonly 'pdf.lastschrift.warnung': "Bitte für Deckung sorgen — die Kosten einer Rücklastschrift werden weiterverrechnet.";
87
+ readonly 'pdf.lastschrift.warnung': "Bitte für Deckung sorgen – die Kosten einer Rücklastschrift werden weiterverrechnet.";
88
88
  readonly 'pdf.erstattung.text': "Der Betrag wird auf dem ursprünglichen Zahlungsweg erstattet. Sie müssen nichts veranlassen.";
89
89
  readonly 'pdf.erstattung.bezug': "Bezug";
90
90
  readonly 'pdf.erstattung.betrag': "Erstattungsbetrag";
@@ -95,7 +95,7 @@ declare const DE: {
95
95
  readonly 'pdf.fuss.kontakt': "Kontakt";
96
96
  readonly 'pdf.fuss.register': "Register & Steuer";
97
97
  readonly 'pdf.fuss.sitz': "Sitz: {ort}";
98
- readonly 'pdf.fuss.hinweis': "Erstellt mit Kasseneck — ein Produkt der Kreiseck";
98
+ readonly 'pdf.fuss.hinweis': "Erstellt mit Kasseneck – ein Produkt der Kreiseck";
99
99
  readonly 'pdf.seite': "Seite {nummer} / {gesamt}";
100
100
  readonly 'land.AT': "Österreich";
101
101
  readonly 'land.DE': "Deutschland";
@@ -111,9 +111,9 @@ declare const DE: {
111
111
  readonly 'gutschrift.grund.incorrect_invoice': "Fehlerhafte Rechnung";
112
112
  readonly 'gutschrift.grund.other': "Sonstiges";
113
113
  readonly 'einvoice.befreiung.reverseCharge': "Steuerschuldnerschaft des Leistungsempfängers (Reverse Charge)";
114
- readonly 'einvoice.befreiung.kleinunternehmer': "Steuerbefreit — Kleinunternehmer gemäß §6 Abs. 1 Z 27 UStG";
114
+ readonly 'einvoice.befreiung.kleinunternehmer': "Steuerbefreit – Kleinunternehmer gemäß §6 Abs. 1 Z 27 UStG";
115
115
  readonly 'einvoice.befreiung.igLieferung': "Steuerfreie innergemeinschaftliche Lieferung gemäß Art. 6 Abs. 1 UStG";
116
- readonly 'einvoice.befreiung.outsideScope': "Nicht steuerbarer Umsatz — Leistungsort im Ausland (§ 3a Abs. 6 UStG)";
116
+ readonly 'einvoice.befreiung.outsideScope': "Nicht steuerbarer Umsatz – Leistungsort im Ausland (§ 3a Abs. 6 UStG)";
117
117
  readonly 'einvoice.befreiung.ausfuhr': "Steuerfreie Ausfuhrlieferung gemäß §6 Abs. 1 Z 1 UStG";
118
118
  readonly 'einvoice.zahlbarBis': "Zahlbar bis {datum}";
119
119
  readonly 'einheit.piece': "Stk";
@@ -37,7 +37,7 @@ const DE = {
37
37
  // wortgleich in Art. 226 Nr. 11a MwSt-RL). „Steuerfrei" waere sachlich falsch
38
38
  // und erbraechte den vorgeschriebenen Hinweis nicht.
39
39
  'steuer.reverseCharge.titel': 'Steuerschuldnerschaft des Leistungsempfängers. ',
40
- 'steuer.reverseCharge.text': 'Übergang der Steuerschuld gem. Art. 196 MwSt-RL 2006/112/EG (innergemeinschaftliche Leistung). Die Leistung ist nicht steuerfrei — die Umsatzsteuer schuldet und entrichtet der Leistungsempfänger in seinem Land.',
40
+ 'steuer.reverseCharge.text': 'Übergang der Steuerschuld gem. Art. 196 MwSt-RL 2006/112/EG (innergemeinschaftliche Leistung). Die Leistung ist nicht steuerfrei – die Umsatzsteuer schuldet und entrichtet der Leistungsempfänger in seinem Land.',
41
41
  // Beide UID-Nummern: bei Reverse Charge § 11 Abs. 1a, bei der ig. Lieferung
42
42
  // Art. 11 Abs. 2 UStG.
43
43
  'steuer.uidZeile': 'UID Leistungserbringer: {verkaeufer} · UID Leistungsempfänger: {kaeufer}',
@@ -77,7 +77,7 @@ const DE = {
77
77
  'pdf.lastschrift.konto': 'Konto',
78
78
  'pdf.lastschrift.mandatsreferenz': 'Mandatsreferenz',
79
79
  'pdf.lastschrift.mandatVom': 'Mandat vom',
80
- 'pdf.lastschrift.warnung': 'Bitte für Deckung sorgen — die Kosten einer Rücklastschrift werden weiterverrechnet.',
80
+ 'pdf.lastschrift.warnung': 'Bitte für Deckung sorgen – die Kosten einer Rücklastschrift werden weiterverrechnet.',
81
81
  'pdf.erstattung.text': 'Der Betrag wird auf dem ursprünglichen Zahlungsweg erstattet. Sie müssen nichts veranlassen.',
82
82
  'pdf.erstattung.bezug': 'Bezug',
83
83
  'pdf.erstattung.betrag': 'Erstattungsbetrag',
@@ -88,7 +88,7 @@ const DE = {
88
88
  'pdf.fuss.kontakt': 'Kontakt',
89
89
  'pdf.fuss.register': 'Register & Steuer',
90
90
  'pdf.fuss.sitz': 'Sitz: {ort}',
91
- 'pdf.fuss.hinweis': 'Erstellt mit Kasseneck — ein Produkt der Kreiseck',
91
+ 'pdf.fuss.hinweis': 'Erstellt mit Kasseneck – ein Produkt der Kreiseck',
92
92
  'pdf.seite': 'Seite {nummer} / {gesamt}',
93
93
  'land.AT': 'Österreich',
94
94
  'land.DE': 'Deutschland',
@@ -104,9 +104,9 @@ const DE = {
104
104
  'gutschrift.grund.incorrect_invoice': 'Fehlerhafte Rechnung',
105
105
  'gutschrift.grund.other': 'Sonstiges',
106
106
  'einvoice.befreiung.reverseCharge': 'Steuerschuldnerschaft des Leistungsempfängers (Reverse Charge)',
107
- 'einvoice.befreiung.kleinunternehmer': 'Steuerbefreit — Kleinunternehmer gemäß §6 Abs. 1 Z 27 UStG',
107
+ 'einvoice.befreiung.kleinunternehmer': 'Steuerbefreit – Kleinunternehmer gemäß §6 Abs. 1 Z 27 UStG',
108
108
  'einvoice.befreiung.igLieferung': 'Steuerfreie innergemeinschaftliche Lieferung gemäß Art. 6 Abs. 1 UStG',
109
- 'einvoice.befreiung.outsideScope': 'Nicht steuerbarer Umsatz — Leistungsort im Ausland (§ 3a Abs. 6 UStG)',
109
+ 'einvoice.befreiung.outsideScope': 'Nicht steuerbarer Umsatz – Leistungsort im Ausland (§ 3a Abs. 6 UStG)',
110
110
  'einvoice.befreiung.ausfuhr': 'Steuerfreie Ausfuhrlieferung gemäß §6 Abs. 1 Z 1 UStG',
111
111
  'einvoice.zahlbarBis': 'Zahlbar bis {datum}',
112
112
  'einheit.piece': 'Stk',
@@ -243,7 +243,7 @@ const EN = {
243
243
  'steuer.igLieferung.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.',
244
244
  'steuer.ausfuhr': 'VAT-exempt export delivery (§ 6 (1) no. 1 UStG).',
245
245
  'steuer.reverseCharge.titel': 'Reverse charge – VAT liability of the recipient. ',
246
- 'steuer.reverseCharge.text': 'VAT liability transferred pursuant to Art. 196 of VAT Directive 2006/112/EC (intra-Community service). The service is not VAT-exempt — the recipient owes and accounts for the VAT in their country.',
246
+ 'steuer.reverseCharge.text': 'VAT liability transferred pursuant to Art. 196 of VAT Directive 2006/112/EC (intra-Community service). The service is not VAT-exempt – the recipient owes and accounts for the VAT in their country.',
247
247
  'steuer.uidZeile': 'VAT ID supplier: {verkaeufer} · VAT ID recipient: {kaeufer}',
248
248
  'steuer.rcGrund.construction': 'Construction work pursuant to § 19 (1a) UStG.',
249
249
  'steuer.rcGrund.scrap': 'Scrap and waste materials pursuant to the Austrian scrap VAT regulation (BGBl. II No. 129/2007).',
@@ -279,7 +279,7 @@ const EN = {
279
279
  'pdf.lastschrift.konto': 'Account',
280
280
  'pdf.lastschrift.mandatsreferenz': 'Mandate reference',
281
281
  'pdf.lastschrift.mandatVom': 'Mandate date',
282
- 'pdf.lastschrift.warnung': 'Please ensure sufficient funds — the costs of a returned direct debit will be charged to you.',
282
+ 'pdf.lastschrift.warnung': 'Please ensure sufficient funds – the costs of a returned direct debit will be charged to you.',
283
283
  'pdf.erstattung.text': 'The amount will be refunded via the original payment method. No action is required on your part.',
284
284
  'pdf.erstattung.bezug': 'Reference',
285
285
  'pdf.erstattung.betrag': 'Refund amount',
@@ -290,7 +290,7 @@ const EN = {
290
290
  'pdf.fuss.kontakt': 'Contact',
291
291
  'pdf.fuss.register': 'Registration & tax',
292
292
  'pdf.fuss.sitz': 'Registered office: {ort}',
293
- 'pdf.fuss.hinweis': 'Created with Kasseneck — a Kreiseck product',
293
+ 'pdf.fuss.hinweis': 'Created with Kasseneck – a Kreiseck product',
294
294
  'pdf.seite': 'Page {nummer} / {gesamt}',
295
295
  'land.AT': 'Austria',
296
296
  'land.DE': 'Germany',
@@ -306,9 +306,9 @@ const EN = {
306
306
  'gutschrift.grund.incorrect_invoice': 'Incorrect invoice',
307
307
  'gutschrift.grund.other': 'Other',
308
308
  'einvoice.befreiung.reverseCharge': 'Reverse charge – VAT liability of the recipient',
309
- 'einvoice.befreiung.kleinunternehmer': 'VAT exempt — small business pursuant to § 6 (1) no. 27 UStG',
309
+ 'einvoice.befreiung.kleinunternehmer': 'VAT exempt – small business pursuant to § 6 (1) no. 27 UStG',
310
310
  'einvoice.befreiung.igLieferung': 'VAT-exempt intra-Community supply pursuant to Art. 6 (1) UStG',
311
- 'einvoice.befreiung.outsideScope': 'Outside the scope of VAT — place of supply abroad (§ 3a (6) UStG)',
311
+ 'einvoice.befreiung.outsideScope': 'Outside the scope of VAT – place of supply abroad (§ 3a (6) UStG)',
312
312
  'einvoice.befreiung.ausfuhr': 'VAT-exempt export delivery pursuant to § 6 (1) no. 1 UStG',
313
313
  'einvoice.zahlbarBis': 'Payable by {datum}',
314
314
  'einheit.piece': 'pcs',
@@ -5,7 +5,7 @@
5
5
  * Betraege sind ueberall ganze Cent. Datumsangaben sind `YYYY-MM-DD` nach
6
6
  * Wiener Kalender.
7
7
  */
8
- import type { CreditNoteReason, CustomerType, DocType, InvoiceLanguage, InvoiceNoticeCode, ItemKind, ReverseChargeReason, InvoicePaymentMethod, InvoiceUnit, InvoiceSetupRequirement, InvoiceListStatus, PriceMode, TaxScheme, VatRatePercent } from './vertrag.js';
8
+ import type { CreditNoteReason, CustomerType, DocType, InvoiceLanguage, InvoiceNoticeCode, ItemKind, ReverseChargeReason, InvoicePaymentMethod, InvoiceUnit, ReturnDisposition, InvoiceSetupRequirement, InvoiceListStatus, PriceMode, TaxScheme, VatRatePercent } from './vertrag.js';
9
9
  export interface CustomerInput {
10
10
  type: CustomerType;
11
11
  name: string;
@@ -86,6 +86,13 @@ export interface InvoiceItemInput {
86
86
  vatRate: VatRatePercent;
87
87
  /** Zeilenrabatt in Prozent, hoechstens zwei Nachkommastellen. */
88
88
  discountPct?: number;
89
+ /** Artikel aus dem Artikelstamm; bestandsgefuehrt bucht das Ausstellen ihn vom Lager ab. */
90
+ articleId?: string;
91
+ }
92
+ /** Eine Gutschriftsposition: wie eine Rechnungsposition, dazu die Rueckgabe-Wahl. */
93
+ export interface CreditNoteItemInput extends InvoiceItemInput {
94
+ /** Wohin die Ware dieser Position geht; fehlt = Vorgabe des Aufrufs bzw. `restock`. */
95
+ returnDisposition?: ReturnDisposition;
89
96
  }
90
97
  export interface IssueInvoiceRequest {
91
98
  /** Pflicht: dieselbe Anfrage mit demselben Schluessel erzeugt nie eine zweite Rechnung. */
@@ -115,6 +122,8 @@ export interface IssueInvoiceRequest {
115
122
  language?: InvoiceLanguage;
116
123
  /** Marke (Kennung aus `listBrands`); sonst die Standardmarke. Unbekannt = `brand_not_found`. */
117
124
  brandId?: string;
125
+ /** Lager-Standort fuer bestandsgefuehrte Positionen; sonst der Standard-Standort. */
126
+ stockLocationId?: string;
118
127
  /**
119
128
  * Schon bezahlt (Shop kassiert online, Rechnung folgt). Die Zahlung entsteht
120
129
  * in derselben Transaktion wie das Festschreiben: das PDF traegt dann keine
@@ -175,9 +184,11 @@ export interface CancelInvoiceRequest {
175
184
  invoiceId: string;
176
185
  reason: CreditNoteReason;
177
186
  note?: string;
187
+ /** Wohin die Ware bestandsgefuehrter Positionen geht; fehlt = `restock`. */
188
+ returnDisposition?: ReturnDisposition;
178
189
  }
179
190
  export interface CreditNoteRequest extends CancelInvoiceRequest {
180
- items: InvoiceItemInput[];
191
+ items: CreditNoteItemInput[];
181
192
  }
182
193
  /**
183
194
  * Summen einer Rechnung in Cent, **immer positiv** — auch bei einer Gutschrift
@@ -228,6 +228,9 @@ export type Feld = {
228
228
  schluesselMuster: string;
229
229
  wertMax: number;
230
230
  };
231
+ /** Rueckgabe-Wahl einer Gutschrift (Lager-Kern Stufe 2), wie im Backend RUECKGABE_API. */
232
+ export declare const RETURN_DISPOSITIONS: readonly ["restock", "defective", "disposed"];
233
+ export type ReturnDisposition = (typeof RETURN_DISPOSITIONS)[number];
231
234
  /** Kunde, wie das Fremdsystem ihn schickt. `vatId` ist die UID-Nummer. */
232
235
  export declare const KUNDE_FELDER: Readonly<Record<string, Feld>>;
233
236
  /**
@@ -243,6 +246,8 @@ export declare const KUNDE_FELDER: Readonly<Record<string, Feld>>;
243
246
  export declare const POSITION_FELDER: Readonly<Record<string, Feld>>;
244
247
  /** Genau einer der beiden Preise je Position (§ 9.1). */
245
248
  export declare const POSITION_PREIS_GENAU_EINS: readonly (readonly string[])[];
249
+ /** Gutschriftsposition: Rechnungsposition plus Rueckgabe-Wahl (an der Rechnung weist der Server sie ab). */
250
+ export declare const GUTSCHRIFT_POSITION_FELDER: Readonly<Record<string, Feld>>;
246
251
  /**
247
252
  * Eine Zahlung zu einer Rechnung. Ohne `amountCents` gilt der volle
248
253
  * Bruttobetrag, ohne `paidAt` der heutige Wiener Tag. `reference` ist die
@@ -306,6 +306,9 @@ export const INVOICE_SETUP_REQUIREMENTS = [
306
306
  const text = (max, pflicht = false, extra = {}) => ({ typ: 'string', pflicht, max, ...(pflicht && extra.min === undefined ? { min: 1 } : {}), ...extra });
307
307
  const idempotencyKey = (pflicht) => ({ typ: 'string', pflicht, min: 1, max: 120 });
308
308
  const id = { typ: 'string', pflicht: false, min: 1, max: 128 };
309
+ /** Rueckgabe-Wahl einer Gutschrift (Lager-Kern Stufe 2), wie im Backend RUECKGABE_API. */
310
+ export const RETURN_DISPOSITIONS = ['restock', 'defective', 'disposed'];
311
+ const rueckgabe = { typ: 'enum', pflicht: false, werte: RETURN_DISPOSITIONS };
309
312
  const idPflicht = { typ: 'string', pflicht: true, min: 1, max: 128 };
310
313
  const datum = (pflicht = false) => ({ typ: 'string', pflicht, min: 10, max: 10, format: 'date' });
311
314
  const limit = { typ: 'integer', pflicht: false, min: 1, max: 100 };
@@ -356,6 +359,13 @@ export const POSITION_FELDER = Object.freeze({
356
359
  unitPriceMicros: { typ: 'integer', pflicht: false, min: 0, max: 1_000_000_000_000 },
357
360
  vatRate: { typ: 'enum', pflicht: true, werte: VAT_RATES },
358
361
  discountPct: { typ: 'number', pflicht: false, min: 0, max: 100, nachkomma: 2 },
362
+ /**
363
+ * Artikel aus dem Artikelstamm (Lager-Kern Stufe 2): ist er bestandsgefuehrt
364
+ * und das Modul Lager aktiv, bucht das Ausstellen ihn ab -- danach, die
365
+ * Rechnung scheitert nie am Lager. Kein „/“, nicht „.“, „..“ oder „__…__“
366
+ * (prueft der Server, `validation`).
367
+ */
368
+ articleId: id,
359
369
  });
360
370
  /** Genau einer der beiden Preise je Position (§ 9.1). */
361
371
  export const POSITION_PREIS_GENAU_EINS = Object.freeze([
@@ -371,6 +381,17 @@ const positionen = {
371
381
  typ: 'object', pflicht: true, felder: POSITION_FELDER, genauEins: POSITION_PREIS_GENAU_EINS,
372
382
  },
373
383
  };
384
+ /** Gutschriftsposition: Rechnungsposition plus Rueckgabe-Wahl (an der Rechnung weist der Server sie ab). */
385
+ export const GUTSCHRIFT_POSITION_FELDER = Object.freeze({ ...POSITION_FELDER, returnDisposition: rueckgabe });
386
+ const gutschriftPositionen = {
387
+ typ: 'list',
388
+ pflicht: true,
389
+ min: 1,
390
+ max: 500,
391
+ eintrag: {
392
+ typ: 'object', pflicht: true, felder: GUTSCHRIFT_POSITION_FELDER, genauEins: POSITION_PREIS_GENAU_EINS,
393
+ },
394
+ };
374
395
  /**
375
396
  * Eine Zahlung zu einer Rechnung. Ohne `amountCents` gilt der volle
376
397
  * Bruttobetrag, ohne `paidAt` der heutige Wiener Tag. `reference` ist die
@@ -438,6 +459,8 @@ export const RECHNUNG_ANFRAGEN = Object.freeze({
438
459
  language: { typ: 'enum', pflicht: false, werte: INVOICE_LANGUAGES },
439
460
  /** Marke (Kennung aus `listBrands`); sonst die Standardmarke. */
440
461
  brandId: id,
462
+ /** Lagerstandort (Kennung), von dem bestandsgefuehrte Positionen abbuchen. */
463
+ stockLocationId: id,
441
464
  /**
442
465
  * Schon bezahlt: die Zahlung entsteht in **derselben** Transaktion wie das
443
466
  * Festschreiben. Sonst gaebe es einen Moment, in dem die Rechnung offen ist
@@ -456,13 +479,15 @@ export const RECHNUNG_ANFRAGEN = Object.freeze({
456
479
  invoiceId: idPflicht,
457
480
  reason: { typ: 'enum', pflicht: true, werte: CREDIT_NOTE_REASONS },
458
481
  note: text(2000),
482
+ returnDisposition: rueckgabe,
459
483
  },
460
484
  createCreditNote: {
461
485
  idempotencyKey: idempotencyKey(true),
462
486
  invoiceId: idPflicht,
463
487
  reason: { typ: 'enum', pflicht: true, werte: CREDIT_NOTE_REASONS },
464
488
  note: text(2000),
465
- items: positionen,
489
+ returnDisposition: rueckgabe,
490
+ items: gutschriftPositionen,
466
491
  },
467
492
  getInvoice: {
468
493
  invoiceId: id,
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.31.0",
2
+ "version": "0.32.1",
3
3
  "gemessenAn": {
4
4
  "tid": "3600335",
5
5
  "hpsVersion": "1.10.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.31.0",
2
+ "version": "0.32.1",
3
3
  "meldungen": {
4
4
  "netz.keine_verbindung": {
5
5
  "text": "Keine Verbindung zum Server. Bitte die Internetverbindung prüfen und erneut versuchen."
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.31.0",
2
+ "version": "0.32.1",
3
3
  "aufrufe": [
4
4
  "activateCashregister",
5
5
  "cancelInvoice",
@@ -530,6 +530,11 @@
530
530
  "listBrands",
531
531
  "recordInvoicePayment"
532
532
  ],
533
+ "returnDispositions": [
534
+ "restock",
535
+ "defective",
536
+ "disposed"
537
+ ],
533
538
  "steuerfreieFaelle": [
534
539
  "smallBusiness",
535
540
  "reverseCharge",
@@ -0,0 +1,26 @@
1
+ {
2
+ "aufruf": "createCreditNote",
3
+ "beschreibung": "Unbekannte Rueckgabe-Wahl an der Position",
4
+ "anfrage": {
5
+ "idempotencyKey": "bsp-15",
6
+ "invoiceId": "rechnung_beispiel",
7
+ "reason": "return",
8
+ "items": [
9
+ {
10
+ "description": "Roggenbrot",
11
+ "quantity": 1,
12
+ "unitPriceCents": 450,
13
+ "vatRate": 10,
14
+ "articleId": "rye-bread",
15
+ "returnDisposition": "lost"
16
+ }
17
+ ]
18
+ },
19
+ "erwartet": {
20
+ "ok": false,
21
+ "code": "validation",
22
+ "fields": [
23
+ "items[0].returnDisposition"
24
+ ]
25
+ }
26
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "aufruf": "createCreditNote",
3
+ "beschreibung": "Rueckgabe: Vorgabe zurueck ins Lager, eine Position defekt",
4
+ "anfrage": {
5
+ "idempotencyKey": "bsp-14",
6
+ "invoiceId": "rechnung_beispiel",
7
+ "reason": "return",
8
+ "returnDisposition": "restock",
9
+ "items": [
10
+ {
11
+ "description": "Roggenbrot",
12
+ "quantity": 1,
13
+ "unitPriceCents": 450,
14
+ "vatRate": 10,
15
+ "articleId": "rye-bread",
16
+ "returnDisposition": "defective"
17
+ }
18
+ ]
19
+ },
20
+ "erwartet": {
21
+ "ok": true
22
+ }
23
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "aufruf": "issueInvoice",
3
+ "beschreibung": "Lager-Kennungen ohne Schraegstrich und nicht nur Punkte",
4
+ "anfrage": {
5
+ "idempotencyKey": "bsp-18",
6
+ "priceMode": "gross",
7
+ "serviceStart": "2026-10-01",
8
+ "stockLocationId": "..",
9
+ "items": [
10
+ {
11
+ "description": "Roggenbrot",
12
+ "quantity": 1,
13
+ "unitPriceCents": 450,
14
+ "vatRate": 10,
15
+ "articleId": "a/b"
16
+ }
17
+ ]
18
+ },
19
+ "erwartet": {
20
+ "ok": false,
21
+ "code": "validation",
22
+ "fields": [
23
+ "stockLocationId",
24
+ "items[0].articleId"
25
+ ]
26
+ }
27
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "aufruf": "issueInvoice",
3
+ "beschreibung": "Die Rueckgabe-Wahl gehoert an die Gutschrift, nicht an die Rechnung",
4
+ "anfrage": {
5
+ "idempotencyKey": "bsp-17",
6
+ "priceMode": "gross",
7
+ "serviceStart": "2026-10-01",
8
+ "items": [
9
+ {
10
+ "description": "Roggenbrot",
11
+ "quantity": 1,
12
+ "unitPriceCents": 450,
13
+ "vatRate": 10,
14
+ "returnDisposition": "restock"
15
+ }
16
+ ]
17
+ },
18
+ "erwartet": {
19
+ "ok": false,
20
+ "code": "validation",
21
+ "fields": [
22
+ "items[0].returnDisposition"
23
+ ]
24
+ }
25
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "aufruf": "issueInvoice",
3
+ "beschreibung": "Bestandsgefuehrter Artikel, abgebucht vom Lieferwagen",
4
+ "anfrage": {
5
+ "idempotencyKey": "bsp-13",
6
+ "priceMode": "gross",
7
+ "serviceStart": "2026-10-01",
8
+ "stockLocationId": "van-1",
9
+ "items": [
10
+ {
11
+ "description": "Roggenbrot",
12
+ "quantity": 2,
13
+ "unitPriceCents": 450,
14
+ "vatRate": 10,
15
+ "articleId": "rye-bread"
16
+ }
17
+ ]
18
+ },
19
+ "erwartet": {
20
+ "ok": true
21
+ }
22
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "aufruf": "cancelInvoice",
3
+ "beschreibung": "Unbekannte Rueckgabe-Wahl beim Vollstorno",
4
+ "anfrage": {
5
+ "idempotencyKey": "bsp-16",
6
+ "invoiceId": "rechnung_beispiel",
7
+ "reason": "return",
8
+ "returnDisposition": "lost"
9
+ },
10
+ "erwartet": {
11
+ "ok": false,
12
+ "code": "validation",
13
+ "fields": [
14
+ "returnDisposition"
15
+ ]
16
+ }
17
+ }
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "title": "Kasseneck Rechnungs-API",
4
4
  "version": 1,
5
- "paket": "0.31.0",
5
+ "paket": "0.32.1",
6
6
  "aufrufe": {
7
7
  "createCustomer": {
8
8
  "anfrage": {
@@ -461,6 +461,11 @@
461
461
  "minimum": 0,
462
462
  "maximum": 100,
463
463
  "x-decimals": 2
464
+ },
465
+ "articleId": {
466
+ "type": "string",
467
+ "minLength": 1,
468
+ "maxLength": 128
464
469
  }
465
470
  },
466
471
  "required": [
@@ -505,6 +510,11 @@
505
510
  "minLength": 1,
506
511
  "maxLength": 128
507
512
  },
513
+ "stockLocationId": {
514
+ "type": "string",
515
+ "minLength": 1,
516
+ "maxLength": 128
517
+ },
508
518
  "payment": {
509
519
  "type": "object",
510
520
  "properties": {
@@ -579,6 +589,13 @@
579
589
  "note": {
580
590
  "type": "string",
581
591
  "maxLength": 2000
592
+ },
593
+ "returnDisposition": {
594
+ "enum": [
595
+ "restock",
596
+ "defective",
597
+ "disposed"
598
+ ]
582
599
  }
583
600
  },
584
601
  "required": [
@@ -616,6 +633,13 @@
616
633
  "type": "string",
617
634
  "maxLength": 2000
618
635
  },
636
+ "returnDisposition": {
637
+ "enum": [
638
+ "restock",
639
+ "defective",
640
+ "disposed"
641
+ ]
642
+ },
619
643
  "items": {
620
644
  "type": "array",
621
645
  "minItems": 1,
@@ -720,6 +744,18 @@
720
744
  "minimum": 0,
721
745
  "maximum": 100,
722
746
  "x-decimals": 2
747
+ },
748
+ "articleId": {
749
+ "type": "string",
750
+ "minLength": 1,
751
+ "maxLength": 128
752
+ },
753
+ "returnDisposition": {
754
+ "enum": [
755
+ "restock",
756
+ "defective",
757
+ "disposed"
758
+ ]
723
759
  }
724
760
  },
725
761
  "required": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.31.0",
2
+ "version": "0.32.1",
3
3
  "sprachen": [
4
4
  "de",
5
5
  "en"
@@ -40,7 +40,7 @@
40
40
  "steuer.igLieferung.text": "Gemäß Art. 6 Abs. 1 UStG (Art. 138 MwSt-RL 2006/112/EG). Die Erwerbsbesteuerung erfolgt durch den Abnehmer im Bestimmungsland.",
41
41
  "steuer.ausfuhr": "Steuerfreie Ausfuhrlieferung (§ 6 Abs. 1 Z 1 UStG).",
42
42
  "steuer.reverseCharge.titel": "Steuerschuldnerschaft des Leistungsempfängers. ",
43
- "steuer.reverseCharge.text": "Übergang der Steuerschuld gem. Art. 196 MwSt-RL 2006/112/EG (innergemeinschaftliche Leistung). Die Leistung ist nicht steuerfrei — die Umsatzsteuer schuldet und entrichtet der Leistungsempfänger in seinem Land.",
43
+ "steuer.reverseCharge.text": "Übergang der Steuerschuld gem. Art. 196 MwSt-RL 2006/112/EG (innergemeinschaftliche Leistung). Die Leistung ist nicht steuerfrei – die Umsatzsteuer schuldet und entrichtet der Leistungsempfänger in seinem Land.",
44
44
  "steuer.uidZeile": "UID Leistungserbringer: {verkaeufer} · UID Leistungsempfänger: {kaeufer}",
45
45
  "steuer.rcGrund.construction": "Bauleistung gemäß § 19 Abs. 1a UStG.",
46
46
  "steuer.rcGrund.scrap": "Schrott und Abfallstoffe gemäß Schrott-Umsatzsteuerverordnung (BGBl. II Nr. 129/2007).",
@@ -76,7 +76,7 @@
76
76
  "pdf.lastschrift.konto": "Konto",
77
77
  "pdf.lastschrift.mandatsreferenz": "Mandatsreferenz",
78
78
  "pdf.lastschrift.mandatVom": "Mandat vom",
79
- "pdf.lastschrift.warnung": "Bitte für Deckung sorgen — die Kosten einer Rücklastschrift werden weiterverrechnet.",
79
+ "pdf.lastschrift.warnung": "Bitte für Deckung sorgen – die Kosten einer Rücklastschrift werden weiterverrechnet.",
80
80
  "pdf.erstattung.text": "Der Betrag wird auf dem ursprünglichen Zahlungsweg erstattet. Sie müssen nichts veranlassen.",
81
81
  "pdf.erstattung.bezug": "Bezug",
82
82
  "pdf.erstattung.betrag": "Erstattungsbetrag",
@@ -87,7 +87,7 @@
87
87
  "pdf.fuss.kontakt": "Kontakt",
88
88
  "pdf.fuss.register": "Register & Steuer",
89
89
  "pdf.fuss.sitz": "Sitz: {ort}",
90
- "pdf.fuss.hinweis": "Erstellt mit Kasseneck — ein Produkt der Kreiseck",
90
+ "pdf.fuss.hinweis": "Erstellt mit Kasseneck – ein Produkt der Kreiseck",
91
91
  "pdf.seite": "Seite {nummer} / {gesamt}",
92
92
  "land.AT": "Österreich",
93
93
  "land.DE": "Deutschland",
@@ -103,9 +103,9 @@
103
103
  "gutschrift.grund.incorrect_invoice": "Fehlerhafte Rechnung",
104
104
  "gutschrift.grund.other": "Sonstiges",
105
105
  "einvoice.befreiung.reverseCharge": "Steuerschuldnerschaft des Leistungsempfängers (Reverse Charge)",
106
- "einvoice.befreiung.kleinunternehmer": "Steuerbefreit — Kleinunternehmer gemäß §6 Abs. 1 Z 27 UStG",
106
+ "einvoice.befreiung.kleinunternehmer": "Steuerbefreit – Kleinunternehmer gemäß §6 Abs. 1 Z 27 UStG",
107
107
  "einvoice.befreiung.igLieferung": "Steuerfreie innergemeinschaftliche Lieferung gemäß Art. 6 Abs. 1 UStG",
108
- "einvoice.befreiung.outsideScope": "Nicht steuerbarer Umsatz — Leistungsort im Ausland (§ 3a Abs. 6 UStG)",
108
+ "einvoice.befreiung.outsideScope": "Nicht steuerbarer Umsatz – Leistungsort im Ausland (§ 3a Abs. 6 UStG)",
109
109
  "einvoice.befreiung.ausfuhr": "Steuerfreie Ausfuhrlieferung gemäß §6 Abs. 1 Z 1 UStG",
110
110
  "einvoice.zahlbarBis": "Zahlbar bis {datum}",
111
111
  "einheit.piece": "Stk",
@@ -242,7 +242,7 @@
242
242
  "steuer.igLieferung.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.",
243
243
  "steuer.ausfuhr": "VAT-exempt export delivery (§ 6 (1) no. 1 UStG).",
244
244
  "steuer.reverseCharge.titel": "Reverse charge – VAT liability of the recipient. ",
245
- "steuer.reverseCharge.text": "VAT liability transferred pursuant to Art. 196 of VAT Directive 2006/112/EC (intra-Community service). The service is not VAT-exempt — the recipient owes and accounts for the VAT in their country.",
245
+ "steuer.reverseCharge.text": "VAT liability transferred pursuant to Art. 196 of VAT Directive 2006/112/EC (intra-Community service). The service is not VAT-exempt – the recipient owes and accounts for the VAT in their country.",
246
246
  "steuer.uidZeile": "VAT ID supplier: {verkaeufer} · VAT ID recipient: {kaeufer}",
247
247
  "steuer.rcGrund.construction": "Construction work pursuant to § 19 (1a) UStG.",
248
248
  "steuer.rcGrund.scrap": "Scrap and waste materials pursuant to the Austrian scrap VAT regulation (BGBl. II No. 129/2007).",
@@ -278,7 +278,7 @@
278
278
  "pdf.lastschrift.konto": "Account",
279
279
  "pdf.lastschrift.mandatsreferenz": "Mandate reference",
280
280
  "pdf.lastschrift.mandatVom": "Mandate date",
281
- "pdf.lastschrift.warnung": "Please ensure sufficient funds — the costs of a returned direct debit will be charged to you.",
281
+ "pdf.lastschrift.warnung": "Please ensure sufficient funds – the costs of a returned direct debit will be charged to you.",
282
282
  "pdf.erstattung.text": "The amount will be refunded via the original payment method. No action is required on your part.",
283
283
  "pdf.erstattung.bezug": "Reference",
284
284
  "pdf.erstattung.betrag": "Refund amount",
@@ -289,7 +289,7 @@
289
289
  "pdf.fuss.kontakt": "Contact",
290
290
  "pdf.fuss.register": "Registration & tax",
291
291
  "pdf.fuss.sitz": "Registered office: {ort}",
292
- "pdf.fuss.hinweis": "Created with Kasseneck — a Kreiseck product",
292
+ "pdf.fuss.hinweis": "Created with Kasseneck – a Kreiseck product",
293
293
  "pdf.seite": "Page {nummer} / {gesamt}",
294
294
  "land.AT": "Austria",
295
295
  "land.DE": "Germany",
@@ -305,9 +305,9 @@
305
305
  "gutschrift.grund.incorrect_invoice": "Incorrect invoice",
306
306
  "gutschrift.grund.other": "Other",
307
307
  "einvoice.befreiung.reverseCharge": "Reverse charge – VAT liability of the recipient",
308
- "einvoice.befreiung.kleinunternehmer": "VAT exempt — small business pursuant to § 6 (1) no. 27 UStG",
308
+ "einvoice.befreiung.kleinunternehmer": "VAT exempt – small business pursuant to § 6 (1) no. 27 UStG",
309
309
  "einvoice.befreiung.igLieferung": "VAT-exempt intra-Community supply pursuant to Art. 6 (1) UStG",
310
- "einvoice.befreiung.outsideScope": "Outside the scope of VAT — place of supply abroad (§ 3a (6) UStG)",
310
+ "einvoice.befreiung.outsideScope": "Outside the scope of VAT – place of supply abroad (§ 3a (6) UStG)",
311
311
  "einvoice.befreiung.ausfuhr": "VAT-exempt export delivery pursuant to § 6 (1) no. 1 UStG",
312
312
  "einvoice.zahlbarBis": "Payable by {datum}",
313
313
  "einheit.piece": "pcs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kreiseck/kasseneck-api",
3
- "version": "0.31.0",
3
+ "version": "0.32.1",
4
4
  "description": "Austrian fiscal cash register (RKSV) client for JavaScript and TypeScript: signed receipts, cancellations, card payments, receipt printing (ESC/POS), invoices. RKSV-Registrierkasse für JavaScript und TypeScript.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Kreiseck",