No VAT rate for invoice lines not subject to VAT

Error BR-O-05 EN 16931

An Invoice line (BG-25) where the VAT category code (BT-151) is "Not subject to VAT" shall not contain an Invoiced item VAT rate (BT-152).

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

The invoice line is assigned category O, but ram:RateApplicablePercent is present. This element must not be included for this category.

What the rule means

Category O denotes a transaction not subject to VAT. Therefore, no VAT rate is stated for the invoice line.

Affected fields BG-25 BT-151 BT-152
Please omit the VAT rate for invoice lines not subject to VAT

The invoice line is marked as not subject to VAT (O), but still contains a VAT rate element. You can remove this element from the line’s tax details.

What to do
  1. Check the invoice line’s tax category in TradeLineItem.TaxCategoryCode.
  2. Remove the VAT rate from TradeLineItem.TaxPercent.
  3. Generate the invoice again and validate it again.
What it looks like
✗ Triggers the message
<ram:ApplicableTradeTax>
  <ram:CategoryCode>O</ram:CategoryCode>
  <ram:RateApplicablePercent>0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
✓ Correct
<ram:ApplicableTradeTax>
  <ram:CategoryCode>O</ram:CategoryCode>
</ram:ApplicableTradeTax>
Check in FactoorSharp
  • TradeLineItem.TaxPercent (BT-152)
  • TradeLineItem.TaxCategoryCode (BT-151)
  • TradeLineItem.TaxType (BT-151-0)
  • TaxCategoryCodes (BT-151)
Technical details

The test uses not(ram:RateApplicablePercent) to check that the element is absent from the selected ram:ApplicableTradeTax.

Where the rule applies

The rule applies to an invoice line’s ram:ApplicableTradeTax when its ram:CategoryCode has the value O for not subject to VAT.

Context (rule/@context)
//rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ ram:ApplicableTradeTax[ram:CategoryCode = 'O']
Test expression (assert/@test)
not(ram:RateApplicablePercent)