VAT breakdown for the zero rate

Error BR-FXEXT-Z-01 Factur-X

An Invoice that contains an Invoice line (BG-25) where the "Subtype of invoice item" (BT-X-8) has the value "DETAIL" or is not specified, a Document level allowance (BG-20) or a Document level charge or tax (BG-21) or a Logistics Service Charge ( BG-X-42) where the VAT category code (BT-151, BT-95, BT-102, or BT-X-273) is “Z” ("Zero Rated") shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with “Z” ("Zero Rated").

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

If a relevant invoice line or an allowance or charge uses VAT category Z, the corresponding category Z is missing from the VAT breakdown. Relevant invoice lines have no subtype specified or have ram:LineStatusReasonCode equal to DETAIL.

What the rule means

Z denotes the “Zero Rated” category. The VAT breakdown must include this category when it is used for the items, allowances, or charges covered by the rule.

Please include the zero rate in the VAT breakdown

A relevant invoice line, allowance, or charge uses category Z, but the VAT breakdown does not include a matching category. You can add the corresponding tax category information.

What to do
  1. Check category Z in the relevant ram:ApplicableTradeTax details and check the invoice line subtype in ram:LineStatusReasonCode.
  2. Add the matching category to the VAT breakdown with AddApplicableTradeTax(...).
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SpecifiedLineTradeSettlement>
  <ram:ApplicableTradeTax>
    <ram:CategoryCode>Z</ram:CategoryCode>
  </ram:ApplicableTradeTax>
</ram:SpecifiedLineTradeSettlement>
✓ Correct
<ram:ApplicableHeaderTradeSettlement>
  <ram:ApplicableTradeTax>
    <ram:CategoryCode>Z</ram:CategoryCode>
  </ram:ApplicableTradeTax>
</ram:ApplicableHeaderTradeSettlement>
<ram:SpecifiedLineTradeSettlement>
  <ram:ApplicableTradeTax>
    <ram:CategoryCode>Z</ram:CategoryCode>
  </ram:ApplicableTradeTax>
</ram:SpecifiedLineTradeSettlement>
Check in FactoorSharp
  • TaxCategoryCodes (BT-151; BT-95; BT-102; BT-118)
  • AssociatedDocument.LineStatusReasonCode (BT-X-8)
  • FacturXInvoice.AddApplicableTradeTax(basisAmount, percent, taxAmount, typeCode, categoryCode, allowanceChargeBasisAmount, exemptionReasonCode, exemptionReason, lineTotalBasisAmount) (BG-23)
  • FacturXInvoice.AnyApplicableTradeTaxes() (BG-23)
  • FacturXInvoice.GetApplicableTradeTaxes() (BG-23)
Technical details

The XPath counts occurrences of ram:CategoryCode equal to Z in ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax, the relevant ram:SpecifiedLineTradeSettlement elements, and ram:CategoryTradeTax and ram:AppliedTradeTax. The condition passes if none of the checked locations contains Z, or if the VAT breakdown and at least one relevant source contain Z.

Where the rule applies

The rule applies to the VAT breakdown in rsm:CrossIndustryInvoice and considers the VAT categories of invoice lines and document-level allowances and charges.

Context (rule/@context)
/rsm:CrossIndustryInvoice
Test expression (assert/@test)
( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='Z'])=0 and count(//ram:SpecifiedLineTradeSettlement[ not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode) or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL' ]/ram:ApplicableTradeTax[ram:CategoryCode='Z'])=0 and count(//ram:CategoryTradeTax[ram:CategoryCode='Z'])=0 and count(//ram:AppliedTradeTax[ram:CategoryCode='Z'])=0 ) or ( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='Z'])>=1 and ( exists(//ram:SpecifiedLineTradeSettlement[ not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode) or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL' ]/ram:ApplicableTradeTax[ram:CategoryCode='Z']) or exists(//ram:CategoryTradeTax[ram:CategoryCode='Z']) or exists(//ram:AppliedTradeTax[ram:CategoryCode='Z']) ) )