VAT amount must be zero for the “Zero rated” category

Error BR-Z-09 EN 16931

The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Zero rated" shall equal 0 (zero).

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

In a VAT breakdown with category code Z, ram:CalculatedAmount is not zero. The VAT amount (BT-117) must be zero for the “Zero rated” category.

What the rule means

Category code Z identifies the VAT category named “Zero rated” in the rule. The VAT amount for this category must be zero.

Affected fields BT-117 BG-23 BT-118
Please set the VAT amount for category `Z` to zero

A non-zero VAT amount is entered for VAT category Z. Set the amount for this VAT breakdown to zero.

What to do
  1. Check whether ram:CategoryCode has the value Z.
  2. Set ram:CalculatedAmount to 0 for this VAT breakdown.
  3. Check the category code against the available TaxCategoryCodes.
  4. Check the call to AddApplicableTradeTax(...).
  5. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:ApplicableTradeTax>
  <ram:CategoryCode>Z</ram:CategoryCode>
  <ram:CalculatedAmount>1.00</ram:CalculatedAmount>
</ram:ApplicableTradeTax>
✓ Correct
<ram:ApplicableTradeTax>
  <ram:CategoryCode>Z</ram:CategoryCode>
  <ram:CalculatedAmount>0</ram:CalculatedAmount>
</ram:ApplicableTradeTax>
Check in FactoorSharp
  • TaxCategoryCodes (BT-118)
  • FacturXInvoice.AddApplicableTradeTax(basisAmount, percent, taxAmount, typeCode, categoryCode, allowanceChargeBasisAmount, exemptionReasonCode, exemptionReason, lineTotalBasisAmount) (BG-23)
  • FacturXInvoice.AnyApplicableTradeTaxes() (BG-23)
  • FacturXInvoice.GetApplicableTradeTaxes() (BG-23)
  • FacturXInvoice.Taxes (BG-23)
Technical details

For ram:CategoryCode with the value Z, the test checks whether ram:CalculatedAmount has the numeric value zero.

Where the rule applies

The rule applies to ram:CalculatedAmount in a ram:ApplicableTradeTax whose ram:CategoryCode has the value Z.

Context (rule/@context)
//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CategoryCode[. = 'Z']
Test expression (assert/@test)
../ram:CalculatedAmount = 0