Each Document level charge (BG-21) shall have a Document level charge VAT category code (BT-102).
The charge is missing the VAT category code ram:CategoryCode within a ram:CategoryTradeTax whose ram:TypeCode is VAT.
The VAT category code assigns the charge to a VAT category. This classification is needed to state the tax treatment of the charge.
A charge is missing its VAT category. Add the category code in the charge’s tax details.
- Add
ram:CategoryCodewithinram:CategoryTradeTaxwith the tax typeVAT. - Check the
AddTradeCharge(...)call and the VAT category code passed to it. - Regenerate the invoice and validate it again.
TaxCategoryCodes(BT-102)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 check applies to charges with ram:ChargeIndicator equal to true and looks for ram:CategoryCode under ram:CategoryTradeTax where ram:TypeCode matches VAT case-insensitively.
The rule applies to each charge in ram:SpecifiedTradeAllowanceCharge within ram:ApplicableHeaderTradeSettlement.
rule/@context)assert/@test)