InvoiceValidator.eu

BR-AF-01

fatalEN 16931EN 16931 business ruleCIIUBLBG-20BG-21BG-23BG-25BT-102BT-118BT-151BT-95

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 "IGIC" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IGIC".

Why it fails

The invoice has at least one line, allowance or charge with VAT category IGIC — the Spanish indirect tax used in the Canary Islands — but the VAT breakdown (BG-23) has no group with that category code.

How to fix it

Add a VAT breakdown group (BG-23) with VAT category code IGIC and its taxable amount (BT-116) — the sum of the net amounts in that category. IGIC behaves like a standard rate, not like an exemption: set the VAT rate (BT-119) to the rate you charged (BR-AF-05 allows 0 or greater) and the VAT category tax amount (BT-117) to taxable amount x rate / 100 (BR-AF-09). Do not add an exemption reason — BR-AF-10 forbids BT-120 and BT-121 here, which is the usual second failure. If you charge more than one IGIC rate you need one breakdown group per rate, not one for the category.

What the validator checks

CII — context /rsm:CrossIndustryInvoice

((count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='L']) + count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='L'])) >=2 or not (//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='L'])) and      ((count(//ram:CategoryTradeTax[ram:CategoryCode='L']) + count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='L'])) >=2 or not (//ram:CategoryTradeTax[ram:CategoryCode='L']))

UBL — context /ubl:Invoice | /cn:CreditNote

((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) > 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cbc:ID = 'L']) > 0) or ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) = 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0)

Related rules

Part of BR-AF — IGIC (Canary Islands).

Check your own invoice against BR-AF-01

…or paste the XML instead

Nothing is stored, and the whole invoice is checked, not just this rule. A PDF only works if it is Factur-X / ZUGFeRD — a PDF with the invoice XML inside it.