Rule reference

BR-DE-17 XRechnung restricts the invoice type code (BT-3) to 326, 380, 381, 384, 389, 875, 876 and 877 from UNTDID 1001, but "999" was supplied

XRechnung restricts the invoice type code (BT-3) to 326, 380, 381, 384, 389, 875, 876 and 877 from UNTDID 1001, but "999" was supplied. The wider UNTDID list is legal under core EN 16931 and will be rejected by a German receiving portal.

This rule is implemented and its error payload below is real, but the long-form write-up — normative text, worked example, divergence note — is not written yet. Everything the library knows about this rule is on this page. Ask and we will prioritise it.

Business term
BT-3
Severity
fatal

What the library returns

The exact object in result.errors when this rule fires. Generated by running @attestwire/en16931, not transcribed:

TeachingError
{
  "rule": "BR-DE-17",
  "field": "BT-3",
  "severity": "fatal",
  "message": "XRechnung restricts the invoice type code (BT-3) to 326, 380, 381, 384, 389, 875, 876 and 877 from UNTDID 1001, but \"999\" was supplied. The wider UNTDID list is legal under core EN 16931 and will be rejected by a German receiving portal.",
  "fix": "Use \"380\" for a commercial invoice, \"381\" for a credit note, \"384\" for a corrected invoice (and then also supply the preceding invoice reference, BR-DE-26), \"326\" for a partial invoice, \"389\" for self-billing.",
  "example": "\"invoiceTypeCode\": \"380\"",
  "xpath": "/ubl:Invoice/cbc:InvoiceTypeCode",
  "docsUrl": "https://attestwire.com/rules/BR-DE-17"
}

xpath locates the element in the generated UBL document, which is where a KoSIT or Peppol validator will report the same problem.

A passing value

the shape this field expects
"invoiceTypeCode": "380"

The fix

Use "380" for a commercial invoice, "381" for a credit note, "384" for a corrected invoice (and then also supply the preceding invoice reference, BR-DE-26), "326" for a partial invoice, "389" for self-billing.

Arrived from a stack trace? The docsUrl on every error links straight here. Something wrong on this page — tell us.