VAT breakdown for exports outside the EU

Error BR-G-01 EN 16931

An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Export outside the EU" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Export outside the EU".

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

If an invoice line, allowance or charge uses VAT category code G, the document-level VAT breakdown must contain exactly one ram:ApplicableTradeTax entry with code G. The test also requires an entry with G in an invoice line or in ram:CategoryTradeTax.

What the rule means

G denotes an export outside the EU. The VAT breakdown must report this category for the invoice in accordance with the affected invoice lines, allowances or charges.

Please align the VAT breakdown for `G`

The invoice uses category G, but the related tax data at document level and in the details do not meet the rule. You can align the tax entries in the invoice.

What to do
  1. Check category G in the affected invoice lines, allowances or charges.
  2. Make sure the VAT breakdown contains exactly one matching ram:ApplicableTradeTax entry.
  3. Check that G also occurs in an invoice line or in ram:CategoryTradeTax.
  4. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:SpecifiedLineTradeSettlement>
  <ram:ApplicableTradeTax>
    <ram:CategoryCode>G</ram:CategoryCode>
  </ram:ApplicableTradeTax>
</ram:SpecifiedLineTradeSettlement>
✓ Correct
<ram:ApplicableHeaderTradeSettlement>
  <ram:ApplicableTradeTax>
    <ram:CategoryCode>G</ram:CategoryCode>
  </ram:ApplicableTradeTax>
</ram:ApplicableHeaderTradeSettlement>
<ram:SpecifiedLineTradeSettlement>
  <ram:ApplicableTradeTax>
    <ram:CategoryCode>G</ram:CategoryCode>
  </ram:ApplicableTradeTax>
</ram:SpecifiedLineTradeSettlement>
Check in FactoorSharp
  • TaxCategoryCodes (BT-151; BT-95; BT-102; BT-118)
  • FacturXInvoice.AddApplicableTradeTax(basisAmount, percent, taxAmount, typeCode, categoryCode, allowanceChargeBasisAmount, exemptionReasonCode, exemptionReason, lineTotalBasisAmount) (BG-23)
  • FacturXInvoice.AnyApplicableTradeTaxes() (BG-23)
  • FacturXInvoice.GetApplicableTradeTaxes() (BG-23)
  • FacturXInvoice.Taxes (BG-23)
Technical details

The XPath allows the case where G is absent from the checked tax data. Otherwise, it checks for exactly one G entry under ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax and at least one matching entry in either of the two checked detail paths.

Where the rule applies

This rule applies to the entire invoice. It compares ram:ApplicableTradeTax in the document-level VAT breakdown with ram:ApplicableTradeTax in invoice lines and with ram:CategoryTradeTax.

Context (rule/@context)
/rsm:CrossIndustryInvoice
Test expression (assert/@test)
( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='G'])=0 and count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='G'])=0 and count(//ram:CategoryTradeTax[ram:CategoryCode='G'])=0 ) or ( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='G'])=1 and ( exists(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='G']) or exists(//ram:CategoryTradeTax[ram:CategoryCode='G']) ) )