Provide the delivery country for an intra-community supply

Error BR-IC-12 EN 16931

In an Invoice with a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" the Deliver to country code (BT-80) shall not be blank.

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

For an intra-community supply with category code K, the delivery country code is missing from ram:CountryID under ram:ShipToTradeParty/ram:PostalTradeAddress.

What the rule means

Code K identifies an intra-community supply. The delivery country code is required to identify the destination of this supply.

Affected fields BG-23 BT-118 BT-80
Please add the delivery country for `K`

The country to which the intra-community supply is delivered is missing. Add the country code at the delivery address.

What to do
  1. Find the delivery address under ram:ShipToTradeParty/ram:PostalTradeAddress.
  2. Add ram:CountryID there.
  3. Check the Party.Country property for ShipToTradeParty.
  4. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:ShipToTradeParty>
  <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)
  • TaxCategoryCodes (BT-118)
  • FacturXInvoice.AddApplicableTradeTax(basisAmount, percent, taxAmount, typeCode, categoryCode, allowanceChargeBasisAmount, exemptionReasonCode, exemptionReason, lineTotalBasisAmount) (BG-23)
  • FacturXInvoice.AnyApplicableTradeTaxes() (BG-23)
  • FacturXInvoice.GetApplicableTradeTaxes() (BG-23)
Technical details

The test checks for the absolute path to ram:CountryID under ram:ShipToTradeParty; it does not prescribe a particular country value.

Where the rule applies

The rule applies to invoices with a VAT breakdown ram:ApplicableTradeTax and ram:CategoryCode K. It checks the country code in ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID.

Context (rule/@context)
//rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ ram:CategoryCode[.= 'K']
Test expression (assert/@test)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID