In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.
This allowance has no ram:RateApplicablePercent, or its value is less than 0. The test checks ram:CategoryCode with the value M, while the message text describes the category as “IPSI”.
For the tax category M selected by the test, a VAT rate of zero or greater is permitted. A negative rate does not meet this rule.
The document-level allowance is assigned to category M, but its VAT rate is missing or negative. You can adjust the value on the allowance.
- Check the allowance’s tax rate in
AddTradeAllowance(...). - Make sure
taxPercentis at least 0. - Generate the invoice again and validate it once more.
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>false</udt:Indicator> </ram:ChargeIndicator> <ram:CategoryTradeTax> <ram:CategoryCode>M</ram:CategoryCode> <ram:RateApplicablePercent>-1</ram:RateApplicablePercent> </ram:CategoryTradeTax> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>false</udt:Indicator> </ram:ChargeIndicator> <ram:CategoryTradeTax> <ram:CategoryCode>M</ram:CategoryCode> <ram:RateApplicablePercent>0</ram:RateApplicablePercent> </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 by ram:ChargeIndicator and ram:CategoryCode = 'M', then requires ram:RateApplicablePercent >= 0.
The rule applies to a document-level allowance in ram:SpecifiedTradeAllowanceCharge whose ram:ChargeIndicator is false and whose ram:CategoryCode is M.
rule/@context)assert/@test)