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 is marked as “not subject to VAT” but contains ram:RateApplicablePercent. This element must not be present for this category.
Category O identifies a transaction that is not subject to VAT. Therefore, no VAT rate is stated for the allowance.
The allowance is marked as not subject to VAT but still contains a VAT rate. You can remove that value from the allowance.
- Check the tax category and rate in
AddTradeAllowance(...). - Omit the
taxPercentparameter for categoryO. - Generate the invoice again and validate it once more.
<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 filters allowances with ram:CategoryCode = 'O' and requires ram:RateApplicablePercent to be absent.
The rule applies to a document-level allowance in ram:SpecifiedTradeAllowanceCharge whose ram:ChargeIndicator is false and whose ram:CategoryCode is O.
rule/@context)assert/@test)