All error codes › BR-AG-02
BR-AG-02 – IPSI: seller VAT identifier missing
Erroren16931
What the rule says
An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).
How to fix it
Fill in or correct the fields named in the rule (the BT/BG codes tell you which). The test below shows exactly what is checked in the XML. Quickest: validate the invoice to get the exact location and, for amounts, the correct value.
Paste the XML and see every error with the exact fix and the correct amounts.
Where it is checked in the XML
Context: /ubl:Invoice | /cn:CreditNote
Test (XPath):
(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))
Related rules
BR-AG-01IPSI: VAT breakdown for this category missingBR-AG-03IPSI: seller VAT identifier missing (allowance)BR-AG-04IPSI: seller VAT identifier missing (charge)BR-AG-05IPSI: wrong VAT rate on a lineBR-AG-06IPSI: wrong VAT rate on an allowanceBR-AG-07IPSI: wrong VAT rate on a chargeBR-AG-08IPSI: wrong taxable amount in the VAT breakdownBR-AG-09IPSI: wrong VAT amount in the VAT breakdownBR-AG-10IPSI: exemption reason missing or not allowed