AttestwireRule referenceBR-AE-03

BR-AE-03 A reverse-charge allowance requires both parties to be identified

noun · EN 16931 · fatal · BT-31 / BT-48

For a sample invoice, the library reports: This invoice contains a document level allowance (BG-20) whose VAT category code (BT-95) is AE (Reverse charge) — allowances[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), and the buyer VAT identifier (BT-48) and/or the buyer legal registration identifier (BT-47).

Business term
BT-31 / BT-48
Severity
fatal

The fix

Set buyer.vatId to your client's VAT number (buyer.legalRegistrationId also satisfies the rule) and make sure seller.vatId or seller.taxRegistrationId is set. Validate the buyer's number against VIES on the invoice date and keep the response — if it is invalid at the time of supply the liability stays with you.

A passing value

the shape this field expects
"buyer": { "vatId": "ATU12345678" }

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:

TeachingError
{
  "rule": "BR-AE-03",
  "field": [
    "BT-31",
    "BT-48"
  ],
  "severity": "fatal",
  "message": "This invoice contains a document level allowance (BG-20) whose VAT category code (BT-95) is AE (Reverse charge) — allowances[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), and the buyer VAT identifier (BT-48) and/or the buyer legal registration identifier (BT-47). Reverse charge moves the VAT liability to the buyer, who self-assesses it. A document level adjustment in category AE changes the base they self-assess on, so both ends of the transfer have to be identifiable: yours for the output side that reports zero, theirs for the input side that reports the tax. This is the only allowance/charge family that constrains the buyer as well as the seller.",
  "fix": "Set buyer.vatId to your client's VAT number (buyer.legalRegistrationId also satisfies the rule) and make sure seller.vatId or seller.taxRegistrationId is set. Validate the buyer's number against VIES on the invoice date and keep the response — if it is invalid at the time of supply the liability stays with you.",
  "example": "\"buyer\": { \"vatId\": \"ATU12345678\" }",
  "xpath": "/ubl:Invoice/cac:AllowanceCharge[1]/cac:TaxCategory/cbc:ID",
  "docsUrl": "https://attestwire.com/rules/BR-AE-03"
}

xpath is always a UBL path. On a CII invoice, look for the matching CII field instead.