A Document level charge (BG-21) where the VAT category code (BT-102) is "Not subject to VAT" shall not contain a Document level charge VAT rate (BT-103).
The charge is marked as not subject to VAT (O), but still contains ram:RateApplicablePercent. No VAT rate may be specified for a charge in this category.
Tax code O identifies a transaction not subject to VAT. Therefore, no VAT rate is specified for this charge.
The charge is assigned to the “not subject to VAT” category (O), but contains a VAT rate. You can output the charge without this rate field.
- Check the call to
AddTradeCharge(...)and the charge’s tax category. - Remove the VAT rate value
taxPercentfor this charge. - Generate the invoice again and validate it.
<ram:CategoryTradeTax> <ram:CategoryCode>O</ram:CategoryCode> <ram:RateApplicablePercent>0</ram:RateApplicablePercent> </ram:CategoryTradeTax>
<ram:CategoryTradeTax> <ram:CategoryCode>O</ram:CategoryCode> </ram:CategoryTradeTax>
TaxCategoryCodes(BT-102)FacturXInvoice.AddTradeCharge(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode)(BG-21)FacturXInvoice.GetTradeCharges()(BG-21)AbstractTradeAllowanceCharge(Document level charge: BG-21)AbstractTradeAllowanceCharge.ChargeIndicator(Document level charge: BG-21)
Technical details
The XPath test requires ram:RateApplicablePercent to be absent in the context of the matching ram:CategoryTradeTax.
The rule applies to the VAT rate ram:RateApplicablePercent of a document level charge in ram:SpecifiedTradeAllowanceCharge with tax category O.
rule/@context)assert/@test)