No other VAT categories alongside O

Error BR-O-11 EN 16931

An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain other VAT breakdown groups (BG-23).

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

The invoice contains a VAT breakdown with ram:CategoryCode O and at least one other ram:ApplicableTradeTax VAT breakdown with a different ram:CategoryCode.

What the rule means

Category O means “not subject to VAT”. Under this rule, an invoice using this category must not contain a VAT breakdown with another category.

Affected fields BG-23 BT-118
Please use no other VAT category alongside `O`

The invoice contains a VAT breakdown with ram:CategoryCode O as well as a breakdown with another category. You can resolve this by making the VAT breakdowns consistent with this rule.

What to do
  1. Review the entries you add with AddApplicableTradeTax(...).
  2. Make sure no other VAT breakdown has a ram:CategoryCode other than O.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:ApplicableTradeTax>
  <ram:CategoryCode>O</ram:CategoryCode>
</ram:ApplicableTradeTax>
<ram:ApplicableTradeTax>
  <ram:CategoryCode>S</ram:CategoryCode>
</ram:ApplicableTradeTax>
✓ Correct
<ram:ApplicableTradeTax>
  <ram:CategoryCode>O</ram:CategoryCode>
</ram:ApplicableTradeTax>
Check in FactoorSharp
  • 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)
  • TaxCategoryCodes (BT-118)
Technical details

The test checks across the invoice whether any ram:ApplicableTradeTax has a ram:CategoryCode other than O, and requires that none do.

Where the rule applies

The rule applies to an invoice-level ram:ApplicableTradeTax VAT breakdown with ram:CategoryCode O.

Context (rule/@context)
//rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode = 'O']
Test expression (assert/@test)
not(//ram:ApplicableTradeTax[ram:CategoryCode != 'O'])