In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.
The VAT rate of the document-level charge is less than zero. For a charge with VAT category M, ram:RateApplicablePercent must not be negative.
A negative VAT rate conflicts with the rule for a document-level charge in category M, which requires a rate of at least zero.
The VAT rate for the document-level charge with VAT category M is below zero. Adjust the value so that it is zero or higher.
- Check the value of
ram:RateApplicablePercentfor the relevant charge. - Check the VAT rate value in
AddTradeCharge(...). - Generate the invoice again and validate it.
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>true</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>true</udt:Indicator> </ram:ChargeIndicator> <ram:CategoryTradeTax> <ram:CategoryCode>M</ram:CategoryCode> <ram:RateApplicablePercent>0</ram:RateApplicablePercent> </ram:CategoryTradeTax> </ram:SpecifiedTradeAllowanceCharge>
TaxCategoryCodes(BT-102)FacturXInvoice.AddTradeCharge(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode)(BG-21)FacturXInvoice.AddTradeeCharge(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode)(BG-21)FacturXInvoice.GetTradeCharges()(BG-21)AbstractTradeAllowanceCharge(Document level charge: BG-21)
Technical details
The XPath checks whether ram:RateApplicablePercent is numerically greater than or equal to zero.
The rule applies to ram:RateApplicablePercent of a document-level charge in ram:SpecifiedTradeAllowanceCharge with VAT category M.
rule/@context)assert/@test)