In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.
The test requires RateApplicablePercent to be greater than zero. A missing tax rate or a value of zero does not satisfy this condition.
Category L denotes IGIC. Under the validation condition applied here, the allowance’s tax rate must be strictly positive.
The allowance with category L does not have a positive tax rate. The rule requires a value greater than zero.
- Check the
AddTradeAllowance(...)call for the document level allowance. - Enter a tax rate greater than
0. - Generate the invoice again and validate it again.
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>false</udt:Indicator> </ram:ChargeIndicator> <ram:CategoryTradeTax> <ram:CategoryCode>L</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>L</ram:CategoryCode> <ram:RateApplicablePercent>1</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 test uses ram:RateApplicablePercent > 0; zero and a missing element do not pass the test.
The rule applies to RateApplicablePercent in the tax information for a document level allowance under SpecifiedTradeAllowanceCharge with CategoryCode L.
rule/@context)assert/@test)