An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain Document level allowances (BG-20) where Document level allowance VAT category code (BT-95) is not "Not subject to VAT".
The invoice contains a VAT breakdown with ram:CategoryCode O, but at least one ram:CategoryTradeTax has a ram:CategoryCode other than O. For this rule, this concerns the VAT category code of a document-level allowance.
Category O means “not subject to VAT”. The VAT category code of a document-level allowance must be consistent with this and must not report another category.
The invoice uses VAT category O, but the VAT category code of a document-level allowance reports a different category. You can align the code with the category used on the invoice.
- Review the VAT category of the allowance you add with
AddTradeAllowance(...). - Make sure its
ram:CategoryTradeTaxcontainsram:CategoryCodeO. - Generate the invoice again and validate it once more.
<ram:CategoryTradeTax> <ram:CategoryCode>S</ram:CategoryCode> </ram:CategoryTradeTax>
<ram:CategoryTradeTax> <ram:CategoryCode>O</ram:CategoryCode> </ram:CategoryTradeTax>
TaxCategoryCodes(BT-95; BT-118)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 requires that there be no ram:CategoryTradeTax in the document with a ram:CategoryCode other than O. It evaluates these elements across the invoice.
The rule applies when an ram:ApplicableTradeTax VAT breakdown has ram:CategoryCode O and concerns document-level allowances and their ram:CategoryTradeTax.
rule/@context)assert/@test)