Provide the VAT category for the 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

The VAT breakdown is missing ram:CategoryCode (BT-118), which specifies the VAT category.

What the rule means

The VAT category code (BT-118) assigns the VAT breakdown entry to a VAT category.

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

A VAT breakdown is missing its VAT category. Add the category code so that the VAT category for this entry is stated.

What to do
  1. Find the relevant ram:ApplicableTradeTax.
  2. Add the appropriate VAT category in ram:CategoryCode.
  3. Check the available values in TaxCategoryCodes and 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

For each ram:ApplicableTradeTax in the specified context, the test checks whether a ram:CategoryCode element is present.

Where the rule applies

The rule applies to each ram:ApplicableTradeTax within the document-level settlement.

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