Provide the country for the delivery address

Error BR-57 EN 16931

Each Deliver to address (BG-15) shall contain a Deliver to country code (BT-80).

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

If ShipToTradeParty/PostalTradeAddress is present, the delivery address does not contain a non-empty CountryID. The delivery address country code (BT-80) is missing.

What the rule means

The country code identifies the country of the delivery address and is required when a delivery address is provided.

Affected fields BG-15 BT-80
Please provide the country for the delivery address

The invoice contains a delivery address without a country code. Add the country code to complete the delivery address.

What to do
  1. Check ShipToTradeParty/PostalTradeAddress.
  2. Add CountryID there with the country code for the delivery address.
  3. Check the value of Party.Country.
  4. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:ShipToTradeParty>
  <ram:PostalTradeAddress>
    <ram:CountryID/>
  </ram:PostalTradeAddress>
</ram:ShipToTradeParty>
✓ Correct
<ram:ShipToTradeParty>
  <ram:PostalTradeAddress>
    <ram:CountryID>DE</ram:CountryID>
  </ram:PostalTradeAddress>
</ram:ShipToTradeParty>
Check in FactoorSharp
  • Party.Country (ShipToTradeParty: BT-80)
Technical details

The XPath test passes if no PostalTradeAddress is present, or if CountryID is not an empty string when the address is present.

Where the rule applies

The rule applies to the delivery address under ShipToTradeParty in the invoice's delivery information.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery
Test expression (assert/@test)
( ram:ShipToTradeParty/ram:PostalTradeAddress and ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID!='' ) or not (ram:ShipToTradeParty/ram:PostalTradeAddress)