Rule reference

BR-AG-10 A VAT breakdown with the VAT category code (BT-118) M (Tax on production, services and imports in Ceuta and Melilla (IPSI)) must not have a VAT exemption reason code (BT-121) or reason text (BT-120), but you supplied vatExemptionReasons.M = "Exento"

A VAT breakdown with the VAT category code (BT-118) M (Tax on production, services and imports in Ceuta and Melilla (IPSI)) must not have a VAT exemption reason code (BT-121) or reason text (BT-120), but you supplied vatExemptionReasons.M = "Exento". Category M charges IPSI, which is a tax actually levied on the supply — an exemption reason would claim relief from the very tax the breakdown says you collected. BR-AG-10 is fatal at document level; this finding is a warning because the library drops the value rather than emitting it, so the generated XML still passes — but your intent was silently discarded, which you should know about.

This rule is implemented and its error payload below is real, but the long-form write-up — normative text, worked example, divergence note — is not written yet. Everything the library knows about this rule is on this page. Ask and we will prioritise it.

Business term
BT-120 / BT-121
Severity
warning

What the library returns

The exact object in result.errors when this rule fires. Generated by running @attestwire/en16931, not transcribed:

TeachingError
{
  "rule": "BR-AG-10",
  "field": [
    "BT-120",
    "BT-121"
  ],
  "severity": "warning",
  "message": "A VAT breakdown with the VAT category code (BT-118) M (Tax on production, services and imports in Ceuta and Melilla (IPSI)) must not have a VAT exemption reason code (BT-121) or reason text (BT-120), but you supplied vatExemptionReasons.M = \"Exento\". Category M charges IPSI, which is a tax actually levied on the supply — an exemption reason would claim relief from the very tax the breakdown says you collected. BR-AG-10 is fatal at document level; this finding is a warning because the library drops the value rather than emitting it, so the generated XML still passes — but your intent was silently discarded, which you should know about.",
  "fix": "Remove the \"M\" entry from vatExemptionReasons. If you need to say something to the buyer about this line, use the invoice note (BT-22) or the line note (BT-127), which carry free text without making a VAT claim.",
  "example": "\"vatExemptionReasons\": { }, \"lines\": [{ \"id\": \"1\", \"description\": \"Beratung\", \"quantity\": 1, \"unitCode\": \"C62\", \"unitPrice\": 100, \"vatCategory\": \"M\", \"vatRate\": 10 }]",
  "xpath": "/ubl:Invoice/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:TaxExemptionReason",
  "docsUrl": "https://attestwire.com/rules/BR-AG-10"
}

xpath locates the element in the generated UBL document, which is where a KoSIT or Peppol validator will report the same problem.

A passing value

the shape this field expects
"vatExemptionReasons": { }, "lines": [{ "id": "1", "description": "Beratung", "quantity": 1, "unitCode": "C62", "unitPrice": 100, "vatCategory": "M", "vatRate": 10 }]

The fix

Remove the "M" entry from vatExemptionReasons. If you need to say something to the buyer about this line, use the invoice note (BT-22) or the line note (BT-127), which carry free text without making a VAT claim.

Arrived from a stack trace? The docsUrl on every error links straight here. Something wrong on this page — tell us.