BR-S-09

The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Standard rated" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119).

error: the document is invalid Peppol documentation ↗

Why it fails

  • The VAT amount of a standard rated breakdown is not its taxable amount × rate, for example because VAT was rounded per line and then added up.

How to fix it

Calculate the breakdown's VAT amount from its taxable amount and rate, rounded to two decimals. The rule allows a difference of up to 1 in either direction.

What the rule checks

As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.

Context
/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']
Test
(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 )

Checked with EN 16931 Invoice (UBL), EN 16931 Credit Note (UBL), Croatia eRačun Invoice (UBL), Croatia eRačun Credit Note (UBL)

Context
//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CategoryCode[.='S']
Test
(abs(xs:decimal(../ram:CalculatedAmount)) - 1 < round(abs(xs:decimal(../ram:BasisAmount)) * xs:decimal(../ram:RateApplicablePercent)) div 100 ) and (abs(xs:decimal(../ram:CalculatedAmount)) + 1 > round(abs(xs:decimal(../ram:BasisAmount)) * xs:decimal(../ram:RateApplicablePercent)) div 100 )

Checked with EN 16931 Invoice (CII)

Context
//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CategoryCode[.='S']
Test
(abs(xs:decimal(../ram:CalculatedAmount)) - 1 < round(abs(xs:decimal(../ram:BasisAmount)) * ../ram:RateApplicablePercent) div 100 ) and (abs(xs:decimal(../ram:CalculatedAmount)) + 1 > round(abs(xs:decimal(../ram:BasisAmount)) * ../ram:RateApplicablePercent) div 100 )

Checked with France e-invoice (CII), XRechnung 3.0 Invoice (CII)