Attestwire › Rule reference › BR-AG-01
BR-AG-01 Ceuta and Melilla IPSI items need an IPSI VAT breakdown group
noun · EN 16931 · fatal · BT-118
For a sample invoice, the library reports: An invoice line (BT-151), a document level allowance (BT-95) or a document level charge (BT-102) uses VAT category M (Tax on production, services and imports in Ceuta and Melilla (IPSI)), so the VAT breakdown (BG-23) must contain at least one group with the VAT category code (BT-118) M — but this document states none.
- Business term
BT-118- Severity
fatal
The fix
Add a VAT breakdown group (cac:TaxSubtotal, or ram:ApplicableTradeTax in CII) for category M, with the taxable amount and VAT amount of the lines, allowances and charges that carry it.
What the library returns
The full error returned by @attestwire/en16931. It includes the rule ID,
affected field and suggested correction. Developers can use this object in their application:
{
"rule": "BR-AG-01",
"field": "BT-118",
"severity": "fatal",
"message": "An invoice line (BT-151), a document level allowance (BT-95) or a document level charge (BT-102) uses VAT category M (Tax on production, services and imports in Ceuta and Melilla (IPSI)), so the VAT breakdown (BG-23) must contain at least one group with the VAT category code (BT-118) M — but this document states none. The breakdown is the document's own summary of what VAT is due and why; a category that appears on the invoice but not in the breakdown means the tax authority cannot reconcile the two.",
"fix": "Add a VAT breakdown group (cac:TaxSubtotal, or ram:ApplicableTradeTax in CII) for category M, with the taxable amount and VAT amount of the lines, allowances and charges that carry it.",
"xpath": "/ubl:Invoice/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:ID",
"docsUrl": "https://attestwire.com/rules/BR-AG-01"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.