diff --git a/docs/Translations.md b/docs/Translations.md index 9bc6abb..abc44a8 100644 --- a/docs/Translations.md +++ b/docs/Translations.md @@ -14,6 +14,11 @@ - **Lieferdatum** – Delivery date +**Leitweg-ID**: Routing ID + +**Regierungsstellen / Regierungsbehörden**: government agencies (/ government authorities) + + JetBrains Rechnung: ```text diff --git a/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/mapper/MustangMapper.kt b/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/mapper/MustangMapper.kt index 21e7b81..9cae491 100644 --- a/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/mapper/MustangMapper.kt +++ b/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/mapper/MustangMapper.kt @@ -28,7 +28,7 @@ open class MustangMapper( this.dueDate = map(invoice.details.dueDate) this.paymentTermDescription = invoice.details.paymentDescription - this.referenceNumber = invoice.customerReference + this.referenceNumber = invoice.customerReferenceNumber invoice.amountAdjustments?.let { adjustments -> this.totalPrepaidAmount = adjustments.prepaidAmounts @@ -100,7 +100,7 @@ open class MustangMapper( customer = mapParty(invoice.recipient), items = invoice.zfItems.map { mapLineItem(it) }, - customerReference = invoice.referenceNumber, + customerReferenceNumber = invoice.referenceNumber, amountAdjustments = mapAmountAdjustments(invoice), diff --git a/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/model/Invoice.kt b/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/model/Invoice.kt index 4d23539..da05217 100644 --- a/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/model/Invoice.kt +++ b/e-invoice-domain/src/main/kotlin/net/codinux/invoicing/model/Invoice.kt @@ -7,9 +7,20 @@ class Invoice( val items: List, /** - * Unique reference number of the customer, e.g. the Leitweg-ID required by German authorities (Behörden) + * An identifier assigned by the Buyer used for internal routing purposes. + * + * The identifier is defined by the Buyer (e.g. contact ID, department, office id, project code), but provided by the + * Seller in the Invoice. + * + * In XRechnung mandatory for invoices to government agencies in Germany (B2G and G2G) to set the Leitweg-ID here. + * + * From XRechnung specification: + * "Anmerkung: Im Rahmen des Steuerungsprojekts eRechnung ist mit der so genannten Leitweg-ID eine Zuord- + * nungsmöglichkeit entwickelt worden, deren verbindliche Nutzung von Bund und mehreren Ländern vorgegeben + * wird. Die Leitweg-ID ist prinzipiell für Bund, Länder und Kommunen einsetzbar (B2G, G2G). Für die Darstellung + * der Leitweg-ID wird das in XRechnung verpflichtende Feld Buyer Reference benutzt." */ - val customerReference: String? = null, + val customerReferenceNumber: String? = null, val amountAdjustments: AmountAdjustments? = null,