Invoice line VAT category required

Error BR-FXEXT-CO-04 Factur-X

Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151) if the "Subtype of invoice line item" (BT-X-8) has the value "Normal line item (standard case)" (DETAIL) or is not specified.

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

The invoice line does not contain the required VAT information: the test requires ApplicableTradeTax/TypeCode with the value VAT and a CategoryCode under an ApplicableTradeTax entry whose TypeCode matches VAT regardless of letter case.

What the rule means

The VAT category code identifies the tax category of the invoice line. The rule requires this category together with a tax entry of type VAT.

Affected fields BG-25 BT-151 BT-X-8
Please add the VAT category for the invoice line

The required VAT category is missing for a VAT entry of type VAT on this invoice line. Add the category code to the line's tax information.

What to do
  1. Check the status in AssociatedDocumentLineDocument.
  2. For a line with no status code or with DETAIL, add an ApplicableTradeTax entry with TypeCode VAT and a CategoryCode.
  3. Use TradeLineItem.TaxCategoryCode for this.
  4. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:ApplicableTradeTax>
  <ram:TypeCode>VAT</ram:TypeCode>
</ram:ApplicableTradeTax>
✓ Correct
<ram:ApplicableTradeTax>
  <ram:TypeCode>VAT</ram:TypeCode>
  <ram:CategoryCode>S</ram:CategoryCode>
</ram:ApplicableTradeTax>
Check in FactoorSharp
  • AssociatedDocument.LineStatusReasonCode (BT-X-8)
  • LineStatusReasonCodes (BT-X-8)
  • TradeLineItem.TaxCategoryCode (BT-151)
  • TradeLineItem.TaxType (BT-151-0)
  • TaxCategoryCodes (BT-151)
Technical details

The test combines two conditions: an ApplicableTradeTax/TypeCode must be exactly VAT, and a CategoryCode must exist under an ApplicableTradeTax whose TypeCode equals VAT regardless of letter case.

Where the rule applies

The rule applies to an IncludedSupplyChainTradeLineItem invoice line whose AssociatedDocumentLineDocument has no LineStatusReasonCode or has the value DETAIL.

Context (rule/@context)
//ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument[ not(ram:LineStatusReasonCode) or ram:LineStatusReasonCode = 'DETAIL' ]
Test expression (assert/@test)
(../ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:TypeCode = 'VAT') and (../ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[upper-case(ram:TypeCode) = 'VAT']/ ram:CategoryCode)