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 document-level charge is marked as not subject to VAT (O), but it contains ram:RateApplicablePercent.

What the rule means

For VAT category O, a VAT rate must not be specified for the document-level charge.

Affected fields BG-21 BT-102 BT-103
Please remove the VAT rate from the charge not subject to VAT

The document-level charge is marked with VAT category O but still contains a VAT rate. Remove the rate from this charge.

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

The XPath requires ram:RateApplicablePercent to be absent from the element being checked.

Where the rule applies

The rule applies to a document-level charge in ram:SpecifiedTradeAllowanceCharge whose VAT category is O.

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