A Document level allowance (BG-20) where VAT category code (BT-95) is "Not subject to VAT" shall not contain a Document level allowance VAT rate (BT-96).
The allowance with category O contains a RateApplicablePercent. A tax rate must not be provided for this category.
Category O denotes a transaction not subject to VAT. Therefore, no VAT rate may be specified for the allowance.
The allowance with category O contains a tax rate. RateApplicablePercent must not be present for this category.
- Check the
AddTradeAllowance(...)call for the document level allowance. - Omit the tax rate for this allowance.
- Generate the invoice again and validate it again.
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>false</udt:Indicator> </ram:ChargeIndicator> <ram:CategoryTradeTax> <ram:CategoryCode>O</ram:CategoryCode> <ram:RateApplicablePercent>0</ram:RateApplicablePercent> </ram:CategoryTradeTax> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>false</udt:Indicator> </ram:ChargeIndicator> <ram:CategoryTradeTax> <ram:CategoryCode>O</ram:CategoryCode> </ram:CategoryTradeTax> </ram:SpecifiedTradeAllowanceCharge>
TaxCategoryCodes(BT-95)FacturXInvoice.AddTradeAllowance(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode)(BG-20)FacturXInvoice.GetTradeAllowances()(BG-20)FacturXInvoice.TradeAllowanceCharges(BG-20)AbstractTradeAllowanceCharge(Document level allowance: BG-20)
Technical details
The XPath test checks not(ram:RateApplicablePercent) and fails whenever the element is present.
The rule applies to RateApplicablePercent in the tax information for a document level allowance under SpecifiedTradeAllowanceCharge with CategoryCode O.
rule/@context)assert/@test)