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".
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.
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.
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.
- Check where tax category
Eis used on invoice lines, allowances, or charges. - Check the VAT breakdown tax details using
FacturXInvoice.AddApplicableTradeTax(...). - Generate the invoice again and validate it.
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.
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.
rule/@context)assert/@test)