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 "Not subject to VAT" shall contain exactly one VAT breakdown group (BG-23) with the VAT category code (BT-118) equal to "Not subject to VAT".
If the document-level VAT breakdown contains an entry whose ram:CategoryCode is O, there must be exactly one such entry. In addition, O must occur in an invoice line or in ram:CategoryTradeTax.
O denotes the category “not subject to VAT”. The VAT breakdown must report the use of this category unambiguously and consistently with the invoice details.
Category O is present in the document-level VAT breakdown, but the entries do not meet the rule. You can align the number of entries and the related invoice details.
- Check the entries with
ram:CategoryCodeequal toOin the VAT breakdown. - Make sure exactly one matching
ram:ApplicableTradeTaxentry is present there. - Check that
Oalso occurs in an invoice line or inram:CategoryTradeTax. - 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 test passes an invoice with no O under ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax. If such entries exist, it requires exactly one and at least one O entry in one of the checked detail paths.
This rule applies to the entire invoice. It checks ram:ApplicableTradeTax in the document-level VAT breakdown, as well as category entries in invoice lines and ram:CategoryTradeTax.
rule/@context)assert/@test)