All error codes › BR-AG-09
BR-AG-09 – IPSI: wrong VAT amount in the VAT breakdown
Erroren16931
What the rule says
The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IPSI" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119).
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: /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
Test (XPath):
(abs(xs:decimal(../cbc:TaxAmount)) - 1 < round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) and (abs(xs:decimal(../cbc:TaxAmount)) + 1 > round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 )
Related rules
BR-AG-01IPSI: VAT breakdown for this category missingBR-AG-02IPSI: seller VAT identifier 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-10IPSI: exemption reason missing or not allowed