Do not provide an exemption reason for M

Error BR-AG-10 EN 16931

A VAT Breakdown (BG-23) with VAT Category code (BT-118) "IPSI" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120).

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

The VAT breakdown with category code M contains ram:ExemptionReason or ram:ExemptionReasonCode. These fields must not be present for this category.

What the rule means

Code M denotes IPSI. The rule excludes exemption reason information for this VAT category.

Affected fields BG-23 BT-118 BT-121 BT-120
Please remove the exemption reason for `M`

The VAT breakdown with category code M contains an exemption reason. Neither an exemption reason code nor exemption reason text is allowed for this category.

What to do
  1. Find the VAT breakdown with ram:CategoryCode M.
  2. Remove ram:ExemptionReason and ram:ExemptionReasonCode if present.
  3. Check the values in FacturXInvoice.AddApplicableTradeTax(...).
  4. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:ApplicableTradeTax>
  <ram:CategoryCode>M</ram:CategoryCode>
  <ram:ExemptionReason>Example reason</ram:ExemptionReason>
</ram:ApplicableTradeTax>
✓ Correct
<ram:ApplicableTradeTax>
  <ram:CategoryCode>M</ram:CategoryCode>
</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

In the context of a ram:CategoryCode with value M, both ram:ExemptionReason and ram:ExemptionReasonCode must be absent.

Where the rule applies

The rule applies to a VAT breakdown ram:ApplicableTradeTax with ram:CategoryCode M.

Context (rule/@context)
//rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode = 'M']
Test expression (assert/@test)
not(ram:ExemptionReason) and not (ram:ExemptionReasonCode)