VAT breakdown for VAT-exempt amounts

Error BR-E-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 “Exempt from VAT” shall contain exactly one VAT breakdown (BG-23) with the VAT category code (BT-118) equal to "Exempt from VAT".

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

If the counted tax details for category E are not all absent, the test requires exactly one document-level ram:ApplicableTradeTax and at least one matching occurrence under ram:SpecifiedLineTradeSettlement or ram:CategoryTradeTax. The existing occurrences do not meet this condition.

What the rule means

The VAT breakdown is intended to associate VAT-exempt amounts with tax category E. The checked structure limits the number of document-level tax details and requires a matching occurrence in one of the checked structures.

Please align the VAT breakdown for VAT-exempt amounts

The tax details for category E do not match the counts and distribution checked by the test. Review the related details at document level and in the relevant tax structures.

What to do
  1. Check where tax category E is used on invoice lines, allowances, or charges.
  2. Check the VAT breakdown tax details using FacturXInvoice.AddApplicableTradeTax(...).
  3. Generate the invoice again and validate it.
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 passes if all counted E occurrences are absent, or if exactly one ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax with category E exists together with at least one E occurrence under ram:SpecifiedLineTradeSettlement or ram:CategoryTradeTax.

Where the rule applies

The rule applies to the entire document when invoice lines, allowances, or charges use tax category E. It checks occurrences of that category in line-level tax details, document-level tax details, and the VAT breakdown.

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