No VAT rate for a charge not subject to VAT

Error BR-O-07 EN 16931

A Document level charge (BG-21) where the VAT category code (BT-102) is "Not subject to VAT" shall not contain a Document level charge VAT rate (BT-103).

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

The charge is marked as not subject to VAT (O), but still contains ram:RateApplicablePercent. No VAT rate may be specified for a charge in this category.

What the rule means

Tax code O identifies a transaction not subject to VAT. Therefore, no VAT rate is specified for this charge.

Affected fields BG-21 BT-102 BT-103
Please leave out the VAT rate for the charge not subject to VAT

The charge is assigned to the “not subject to VAT” category (O), but contains a VAT rate. You can output the charge without this rate field.

What to do
  1. Check the call to AddTradeCharge(...) and the charge’s tax category.
  2. Remove the VAT rate value taxPercent for this charge.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:CategoryTradeTax>
  <ram:CategoryCode>O</ram:CategoryCode>
  <ram:RateApplicablePercent>0</ram:RateApplicablePercent>
</ram:CategoryTradeTax>
✓ Correct
<ram:CategoryTradeTax>
  <ram:CategoryCode>O</ram:CategoryCode>
</ram:CategoryTradeTax>
Check in FactoorSharp
  • TaxCategoryCodes (BT-102)
  • FacturXInvoice.AddTradeCharge(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode) (BG-21)
  • FacturXInvoice.GetTradeCharges() (BG-21)
  • AbstractTradeAllowanceCharge (Document level charge: BG-21)
  • AbstractTradeAllowanceCharge.ChargeIndicator (Document level charge: BG-21)
Technical details

The XPath test requires ram:RateApplicablePercent to be absent in the context of the matching ram:CategoryTradeTax.

Where the rule applies

The rule applies to the VAT rate ram:RateApplicablePercent of a document level charge in ram:SpecifiedTradeAllowanceCharge with tax category O.

Context (rule/@context)
//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ ram:CategoryTradeTax[ram:CategoryCode = 'O']
Test expression (assert/@test)
not(ram:RateApplicablePercent)