No tax rate for an out-of-scope allowance

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 with category O contains a RateApplicablePercent. A tax rate must not be provided for this category.

What the rule means

Category O denotes a transaction not subject to VAT. Therefore, no VAT rate may be specified for the allowance.

Affected fields BG-20 BT-95 BT-96
Please remove the tax rate from the out-of-scope allowance

The allowance with category O contains a tax rate. RateApplicablePercent must not be present for this category.

What to do
  1. Check the AddTradeAllowance(...) call for the document level allowance.
  2. Omit the tax rate for this allowance.
  3. Generate the invoice again and validate it again.
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 test checks not(ram:RateApplicablePercent) and fails whenever the element is present.

Where the rule applies

The rule applies to RateApplicablePercent in the tax information for a document level allowance under SpecifiedTradeAllowanceCharge with CategoryCode O.

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