Skip to content
SmartFormular

SmartFormular › SmartFormular E-Invoice Start › Validation rules › BR-AG-01

BR-AG-01

Lines, allowances or charges use the VAT category "IPSI (Ceuta and Melilla)" (M), but the VAT breakdown (BG-23) does not list it correctly

Validation rule of EN 16931 (CEN, rule set 1.3.16) · Level: Error

What the message means

Lines, allowances or charges use the VAT category "IPSI (Ceuta and Melilla)" (M), but the VAT breakdown (BG-23) does not list it correctly.

What the issuer needs to change

Add a VAT breakdown entry for M (exactly one).

Fields concerned

  • BG-20 document level allowances
  • BG-21 document level charges
  • BG-23 VAT breakdown
  • BG-25 invoice line
  • BT-95 document level allowance VAT category code
  • BT-102 document level charge VAT category code
  • BT-118 VAT category code
  • BT-151 invoiced item VAT category code

Your invoice reports BR-AG-01? Check it with SmartFormular E-Invoice Start, free to try until 31 December 2026: the tool shows every finding with an explanation, the invoice in readable form and a GiroCode to pay – in your browser, no upload.

Check an e-invoice

Origin

Rule set
EN 16931 (CEN, rule set 1.3.16)
Syntax
CII, UBL
Level
Error

Original rule text

An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "IPSI" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IPSI".

Source: CEN/TC 434, EN 16931 validation rules 1.3.16, European Union Public Licence 1.2

Technical details for IT

UBL

Context: /ubl:Invoice | /cn:CreditNote
Test: not(((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) > 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cbc:ID = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) > 0) or ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) = 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0))

CII

Context: /rsm:CrossIndustryInvoice
Test: not(((count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='M']) + count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='M'])) >=2 or not (//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='M'])) and      ((count(//ram:CategoryTradeTax[ram:CategoryCode='M']) + count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='M'])) >=2 or not (//ram:CategoryTradeTax[ram:CategoryCode='M'])))

Related rules

  • BR-AF-08The taxable amount for "IGIC (Canary Islands)" (L) in the VAT breakdown (BT-116) does not match the lines, …
  • BR-AF-09The VAT amount for "IGIC (Canary Islands)" (L) (BT-117) is not taxable amount times rate
  • BR-AF-10With "IGIC (Canary Islands)" (L) no exemption reason may be given (BT-120, BT-121)
  • BR-AG-02For lines with "IPSI (Ceuta and Melilla)" (M), the seller's VAT number or tax number (BT-31, BT-32) is missing
  • BR-AG-03For an allowance with "IPSI (Ceuta and Melilla)" (M), the seller's VAT number or tax number (BT-31, BT-32) is …
  • BR-AG-04For a charge with "IPSI (Ceuta and Melilla)" (M), the seller's VAT number or tax number (BT-31, BT-32) is …

All validation rules

Technical explanation by SmartFormular, not tax or legal advice. Rules as of 31 August 2026 (KoSIT validator configuration).