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 tax type is VAT.
The VAT category code assigns the charge to the applicable VAT category. This classification is relevant to the invoice’s VAT breakdown.
The charge is missing its VAT category code. Add it to the charge’s VAT details.
- Add
ram:CategoryCodeunderram:CategoryTradeTaxfor the charge. - Check the value set through
TaxCategoryCodesand the call toAddTradeCharge(...)orAddTradeeCharge(...). - Regenerate the invoice and validate it again.
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>true</udt:Indicator> </ram:ChargeIndicator> <ram:CategoryTradeTax> <ram:TypeCode>VAT</ram:TypeCode> </ram:CategoryTradeTax> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>true</udt:Indicator> </ram:ChargeIndicator> <ram:CategoryTradeTax> <ram:TypeCode>VAT</ram:TypeCode> <ram:CategoryCode>S</ram:CategoryCode> </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 test requires a ram:CategoryCode under ram:CategoryTradeTax whose ram:TypeCode, converted to uppercase, equals VAT.
The rule applies to a document-level charge in ram:SpecifiedTradeAllowanceCharge and its VAT details in ram:CategoryTradeTax.
rule/@context)assert/@test)