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 charges (BG-21) where Document level charge VAT category code (BT-102) 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 charge.
Category O means “not subject to VAT”. The VAT category code of a document-level charge 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 charge reports a different category. You can align the code with the category used on the invoice.
- Review the VAT category of the charge you add with
AddTradeCharge(...). - 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-102; BT-118)FacturXInvoice.AddTradeCharge(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode)(BG-21)FacturXInvoice.GetTradeCharges()(BG-21)AbstractTradeAllowanceCharge(Document level charge: BG-21)AbstractTradeAllowanceCharge.ChargeIndicator(Document level charge: BG-21)
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 charges and their ram:CategoryTradeTax.
rule/@context)assert/@test)