Rule reference

BR-AG-05 A line uses VAT category M (Tax on production, services and imports in Ceuta and Melilla (IPSI)), so the invoiced item VAT rate (BT-152) must be 0 (zero) or greater than zero, but it is missing

Line 2 uses VAT category M (Tax on production, services and imports in Ceuta and Melilla (IPSI)), so the invoiced item VAT rate (BT-152) must be 0 (zero) or greater than zero, but it is missing. IPSI is a tax that is actually charged, so the rate is the substance of the line, not decoration — and unlike category S, M does admit a rate of exactly 0, because IPSI relieves some supplies by rate rather than by exemption. What it does not admit is silence, or a negative figure.

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-152
Severity
fatal

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-05",
  "field": "BT-152",
  "severity": "fatal",
  "message": "Line 2 uses VAT category M (Tax on production, services and imports in Ceuta and Melilla (IPSI)), so the invoiced item VAT rate (BT-152) must be 0 (zero) or greater than zero, but it is missing. IPSI is a tax that is actually charged, so the rate is the substance of the line, not decoration — and unlike category S, M does admit a rate of exactly 0, because IPSI relieves some supplies by rate rather than by exemption. What it does not admit is silence, or a negative figure.",
  "fix": "Set line.vatRate to the applicable IPSI percentage as a number. IPSI is the municipal tax of Ceuta and Melilla, not an IGIC band table: its rates are fixed by each city's own ordinance for the class of goods or service, and in practice run from about 0.5 to 10 percent — so take the figure from the Ceuta or Melilla ordinance that governs your supply rather than from a national list. If the supply is in mainland Spain and bears VAT rather than IPSI, the category is S.",
  "example": "\"vatCategory\": \"M\", \"vatRate\": 10",
  "xpath": "/ubl:Invoice/cac:InvoiceLine[2]/cac:Item/cac:ClassifiedTaxCategory/cbc:Percent",
  "docsUrl": "https://attestwire.com/rules/BR-AG-05"
}

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
"vatCategory": "M", "vatRate": 10

The fix

Set line.vatRate to the applicable IPSI percentage as a number. IPSI is the municipal tax of Ceuta and Melilla, not an IGIC band table: its rates are fixed by each city's own ordinance for the class of goods or service, and in practice run from about 0.5 to 10 percent — so take the figure from the Ceuta or Melilla ordinance that governs your supply rather than from a national list. If the supply is in mainland Spain and bears VAT rather than IPSI, the category is S.

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