Rule reference

BR-AG-04 This invoice contains a document level charge (BG-21) whose VAT category code (BT-102) is M (Tax on production, services and imports in Ceuta and Melilla (IPSI)) — charges[0] — so the invoice must contain the seller VAT identifier (BT-31), the seller tax registration identifier (BT-32) and/or the seller tax representative VAT identifier (BT-63)

This invoice contains a document level charge (BG-21) whose VAT category code (BT-102) is M (Tax on production, services and imports in Ceuta and Melilla (IPSI)) — charges[0] — so the invoice must contain the seller VAT identifier (BT-31), the seller tax registration identifier (BT-32) and/or the seller tax representative VAT identifier (BT-63). IPSI is the tax on production, services and imports levied in Ceuta and Melilla, which sit outside both the EU VAT area and the customs union. As with IGIC, the tax on the adjusted supply is real and collected, so the seller has to be identifiable to the administration that levies it.

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-31 / BT-32
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-04",
  "field": [
    "BT-31",
    "BT-32"
  ],
  "severity": "fatal",
  "message": "This invoice contains a document level charge (BG-21) whose VAT category code (BT-102) is M (Tax on production, services and imports in Ceuta and Melilla (IPSI)) — charges[0] — so the invoice must contain the seller VAT identifier (BT-31), the seller tax registration identifier (BT-32) and/or the seller tax representative VAT identifier (BT-63). IPSI is the tax on production, services and imports levied in Ceuta and Melilla, which sit outside both the EU VAT area and the customs union. As with IGIC, the tax on the adjusted supply is real and collected, so the seller has to be identifiable to the administration that levies it.",
  "fix": "Set seller.vatId (e.g. \"ESX1234567X\"), or seller.taxRegistrationId, or supply the taxRepresentative group.",
  "example": "\"seller\": { \"vatId\": \"ESX1234567X\" }",
  "xpath": "/ubl:Invoice/cac:AllowanceCharge[3]/cac:TaxCategory/cbc:ID",
  "docsUrl": "https://attestwire.com/rules/BR-AG-04"
}

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
"seller": { "vatId": "ESX1234567X" }

The fix

Set seller.vatId (e.g. "ESX1234567X"), or seller.taxRegistrationId, or supply the taxRepresentative group.

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