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.
The tax rate for the allowance with category M is negative or missing. The test requires a present value of zero or greater.
Category M denotes IPSI. For this allowance, the rule permits a zero or positive tax rate, but not a negative value.
The tax rate for the allowance with category M is missing or negative. This field requires a value of zero or greater.
- Check the
AddTradeAllowance(...)call for the document level allowance. - Enter a tax rate of
0or greater. - Generate the invoice again and validate it again.
<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 test checks ram:RateApplicablePercent >= 0; a missing element also fails the comparison.
The rule applies to RateApplicablePercent in the tax information for a document level allowance under SpecifiedTradeAllowanceCharge with CategoryCode M.
rule/@context)assert/@test)