No VAT rate for category O

Error BR-O-06 EN 16931

A Document level allowance (BG-20) where VAT category code (BT-95) is "Not subject to VAT" shall not contain a Document level allowance VAT rate (BT-96).

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

The allowance is marked as “not subject to VAT” but contains ram:RateApplicablePercent. This element must not be present for this category.

What the rule means

Category O identifies a transaction that is not subject to VAT. Therefore, no VAT rate is stated for the allowance.

Affected fields BG-20 BT-95 BT-96
Please remove the VAT rate from the category `O` allowance

The allowance is marked as not subject to VAT but still contains a VAT rate. You can remove that value from the allowance.

What to do
  1. Check the tax category and rate in AddTradeAllowance(...).
  2. Omit the taxPercent parameter for category O.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>false</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>false</udt:Indicator>
  </ram:ChargeIndicator>
  <ram:CategoryTradeTax>
    <ram:CategoryCode>O</ram:CategoryCode>
  </ram:CategoryTradeTax>
</ram:SpecifiedTradeAllowanceCharge>
Check in FactoorSharp
  • TaxCategoryCodes (BT-95)
  • 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 XPath filters allowances with ram:CategoryCode = 'O' and requires ram:RateApplicablePercent to be absent.

Where the rule applies

The rule applies to a document-level allowance in ram:SpecifiedTradeAllowanceCharge whose ram:ChargeIndicator is false and whose ram:CategoryCode is O.

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