AttestwireRule referenceBR-09

BR-09 The seller postal address must include a country code

noun · EN 16931 · fatal · BT-40

For a sample invoice, the library reports: The seller postal address must contain a seller country code (BT-40) as an ISO 3166-1 alpha-2 code, but none was provided. This code drives the place-of-supply and reverse-charge logic downstream.

Business term
BT-40
Severity
fatal

The fix

Set seller.address.countryCode to the two-letter code, e.g. "DE" for Germany and "GR" for Greece — "GR" is the ISO 3166-1 code EN 16931 requires here, while "EL" is only the prefix Greek VAT identifiers (BT-31/BT-48) carry and is not a valid country code for BT-40 or BT-55, where BR-CL-14 rejects it.

A passing value

the shape this field expects
"countryCode": "DE"

What the library returns

The full error returned by @attestwire/en16931. It includes the rule ID, affected field and suggested correction. Developers can use this object in their application:

TeachingError
{
  "rule": "BR-09",
  "field": "BT-40",
  "severity": "fatal",
  "message": "The seller postal address must contain a seller country code (BT-40) as an ISO 3166-1 alpha-2 code, but none was provided. This code drives the place-of-supply and reverse-charge logic downstream.",
  "fix": "Set seller.address.countryCode to the two-letter code, e.g. \"DE\" for Germany and \"GR\" for Greece — \"GR\" is the ISO 3166-1 code EN 16931 requires here, while \"EL\" is only the prefix Greek VAT identifiers (BT-31/BT-48) carry and is not a valid country code for BT-40 or BT-55, where BR-CL-14 rejects it.",
  "example": "\"countryCode\": \"DE\"",
  "xpath": "/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode",
  "docsUrl": "https://attestwire.com/rules/BR-09"
}

xpath is always a UBL path. On a CII invoice, look for the matching CII field instead.