Rule reference

BR-DE-10 XRechnung requires the element "Deliver to city" (BT-77) whenever the deliver-to address group (BG-15) is present

XRechnung requires the element "Deliver to city" (BT-77) 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-77
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-10",
  "field": "BT-77",
  "severity": "fatal",
  "message": "XRechnung requires the element \"Deliver to city\" (BT-77) 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.city, 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:CityName",
  "docsUrl": "https://attestwire.com/rules/BR-DE-10"
}

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
"deliverTo": { "city": "Lyon", "postalCode": "69001", "countryCode": "FR" }

The fix

Either set deliverTo.city, 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.

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