Allowances must match VAT category O

Error BR-O-13 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 Document level allowances (BG-20) where Document level allowance VAT category code (BT-95) is not "Not subject to VAT".

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, but at least one ram:CategoryTradeTax has a ram:CategoryCode other than O. For this rule, this concerns the VAT category code of a document-level allowance.

What the rule means

Category O means “not subject to VAT”. The VAT category code of a document-level allowance must be consistent with this and must not report another category.

Affected fields BG-23 BT-118 BG-20 BT-95
Please assign the document-level allowance to category `O`

The invoice uses VAT category O, but the VAT category code of a document-level allowance reports a different category. You can align the code with the category used on the invoice.

What to do
  1. Review the VAT category of the allowance you add with AddTradeAllowance(...).
  2. Make sure its ram:CategoryTradeTax contains ram:CategoryCode O.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:CategoryTradeTax>
  <ram:CategoryCode>S</ram:CategoryCode>
</ram:CategoryTradeTax>
✓ Correct
<ram:CategoryTradeTax>
  <ram:CategoryCode>O</ram:CategoryCode>
</ram:CategoryTradeTax>
Check in FactoorSharp
  • TaxCategoryCodes (BT-95; BT-118)
  • FacturXInvoice.AddTradeAllowance(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode) (BG-20)
  • FacturXInvoice.GetTradeAllowances() (BG-20)
  • FacturXInvoice.TradeAllowanceCharges (BG-20)
  • AbstractTradeAllowanceCharge (Document level allowance: BG-20)
Technical details

The test requires that there be no ram:CategoryTradeTax in the document with a ram:CategoryCode other than O. It evaluates these elements across the invoice.

Where the rule applies

The rule applies when an ram:ApplicableTradeTax VAT breakdown has ram:CategoryCode O and concerns document-level allowances and their ram:CategoryTradeTax.

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