Country code is missing from the tax representative’s address

Error BR-20 EN 16931

The Seller tax representative postal address (BG-12) shall contain a Tax representative country code (BT-69), if the Seller (BG-4) has a Seller tax representative party (BG-11).

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

A non-empty value is missing from ram:CountryID in ram:PostalTradeAddress. This element contains the country code for the address (BT-69).

What the rule means

The country code identifies the country of the tax representative’s postal address and is required for that address.

Affected fields BG-12 BT-69 BG-4 BG-11
Please add the country code to the tax representative’s address

The tax representative’s address does not contain a country code. You can add the missing value in ram:CountryID.

What to do
  1. Add a non-empty value to ram:CountryID under ram:PostalTradeAddress.
  2. Set the address country through Party.Country for SellerTaxRepresentativeTradeParty.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SellerTaxRepresentativeTradeParty>
  <ram:PostalTradeAddress>
    <ram:CountryID/>
  </ram:PostalTradeAddress>
</ram:SellerTaxRepresentativeTradeParty>
✓ Correct
<ram:SellerTaxRepresentativeTradeParty>
  <ram:PostalTradeAddress>
    <ram:CountryID>DE</ram:CountryID>
  </ram:PostalTradeAddress>
</ram:SellerTaxRepresentativeTradeParty>
Check in FactoorSharp
  • Party.Country (SellerTaxRepresentativeTradeParty: BT-69)
  • FacturXInvoice.SellerTaxRepresentative (BG-11)
  • FacturXInvoice.SetSeller(name, postcode, city, street, street2, country, id, globalID, legalOrganization, description, countrySubdivisonName, addressLine3) (BG-4)
  • FacturXInvoice.Seller (BG-4)
Technical details

The test applies normalize-space to ram:PostalTradeAddress/ram:CountryID and requires a value that is non-empty after whitespace is removed.

Where the rule applies

The rule applies to the seller tax representative’s postal address in ram:SellerTaxRepresentativeTradeParty.

Context (rule/@context)
//ram:SellerTaxRepresentativeTradeParty
Test expression (assert/@test)
normalize-space(ram:PostalTradeAddress/ram:CountryID) != ''