Attestwire › Rule reference › BR-20
BR-20 The tax representative’s address must include a country code
noun · EN 16931 · fatal · BT-69
For a sample invoice, the library reports: The seller tax representative's postal address (BG-12) has no country code (BT-69).
- Business term
BT-69- Severity
fatal
The fix
Set taxRepresentative.address.countryCode to the ISO 3166-1 alpha-2 code of the member state where the representative is established — "FR", "IT", "ES" and so on. It is normally the country of the VAT identifier in taxRepresentative.vatId.
A passing value
"address": { "city": "Lyon", "postalCode": "69001", "countryCode": "FR" }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:
{
"rule": "BR-20",
"field": "BT-69",
"severity": "fatal",
"message": "The seller tax representative's postal address (BG-12) has no country code (BT-69). Of everything in that address, the country is the only element with legal effect: it is what identifies the member state in which the representation is registered, and so which authority's rules govern the VAT this invoice reports. A street and a city without a country name a place that the receiving system cannot resolve to a tax jurisdiction.",
"fix": "Set taxRepresentative.address.countryCode to the ISO 3166-1 alpha-2 code of the member state where the representative is established — \"FR\", \"IT\", \"ES\" and so on. It is normally the country of the VAT identifier in taxRepresentative.vatId.",
"example": "\"address\": { \"city\": \"Lyon\", \"postalCode\": \"69001\", \"countryCode\": \"FR\" }",
"xpath": "/ubl:Invoice/cac:TaxRepresentativeParty/cac:PostalAddress/cac:Country/cbc:IdentificationCode",
"docsUrl": "https://attestwire.com/rules/BR-20"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.