VAT category for each VAT breakdown

Error BR-47 EN 16931

Each VAT breakdown (BG-23) shall be defined through a VAT category code (BT-118).

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

A VAT breakdown is missing ram:CategoryCode. As a result, the VAT category (BT-118) is not specified.

What the rule means

The category code assigns the VAT breakdown to a VAT category and is needed to identify its tax classification.

Affected fields BG-23 BT-118
Please specify the VAT category for the breakdown

No VAT category has been specified for a VAT breakdown. Add the missing category code to the invoice tax data.

What to do
  1. Add the category code in ram:CategoryCode.
  2. Check the value against the available TaxCategoryCodes.
  3. Check the call to AddApplicableTradeTax(...).
  4. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:ApplicableTradeTax/>
✓ Correct
<ram:ApplicableTradeTax>
  <ram:CategoryCode>S</ram:CategoryCode>
</ram:ApplicableTradeTax>
Check in FactoorSharp
  • TaxCategoryCodes (BT-118)
  • FacturXInvoice.AddApplicableTradeTax(basisAmount, percent, taxAmount, typeCode, categoryCode, allowanceChargeBasisAmount, exemptionReasonCode, exemptionReason, lineTotalBasisAmount) (BG-23)
  • FacturXInvoice.AnyApplicableTradeTaxes() (BG-23)
  • FacturXInvoice.GetApplicableTradeTaxes() (BG-23)
  • FacturXInvoice.Taxes (BG-23)
Technical details

The test checks whether ram:CategoryCode exists within each ram:ApplicableTradeTax.

Where the rule applies

The rule applies to each ram:ApplicableTradeTax within the invoice header settlement data.

Context (rule/@context)
//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax
Test expression (assert/@test)
(ram:CategoryCode)