BR-DE-11 XRechnung requires the element "Deliver to post code" (BT-78) whenever the deliver-to address group (BG-15) is present
XRechnung requires the element "Deliver to post code" (BT-78) whenever the deliver-to address group (BG-15) is present. BG-15 is optional, but it is all-or-nothing: a delivery address consisting only of a country code is rejected, even though core EN 16931 accepts it.
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-78- Severity
fatal
What the library returns
The exact object in result.errors when this rule fires.
Generated by running @attestwire/en16931, not transcribed:
{
"rule": "BR-DE-11",
"field": "BT-78",
"severity": "fatal",
"message": "XRechnung requires the element \"Deliver to post code\" (BT-78) whenever the deliver-to address group (BG-15) is present. BG-15 is optional, but it is all-or-nothing: a delivery address consisting only of a country code is rejected, even though core EN 16931 accepts it.",
"fix": "Either set deliverTo.postalCode, or drop deliverTo entirely and keep only deliveryDate (BT-72) — unless a rule such as BR-IC-12 requires the destination country, in which case you must supply the full address.",
"example": "\"deliverTo\": { \"city\": \"Lyon\", \"postalCode\": \"69001\", \"countryCode\": \"FR\" }",
"xpath": "/ubl:Invoice/cac:Delivery/cac:DeliveryLocation/cac:Address/cbc:PostalZone",
"docsUrl": "https://attestwire.com/rules/BR-DE-11"
}
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
"deliverTo": { "city": "Lyon", "postalCode": "69001", "countryCode": "FR" }The fix
Either set deliverTo.postalCode, or drop deliverTo entirely and keep only deliveryDate (BT-72) — unless a rule such as BR-IC-12 requires the destination country, in which case you must supply the full address.