SDI-00421
2.2.2.6 <Imposta> non calcolato secondo le regole definite nelle specifiche tecniche
In English The VAT of a summary (Imposta, 2.2.2.6) is not its taxable amount (2.2.2.5) times its rate (2.2.2.1) divided by 100, rounded to two decimals, within one cent.
error: the document is invalid
Why it fails
- The VAT was added up from the lines' rounded VAT amounts instead of being calculated once on the summary's taxable amount.
- The rate was written as a fraction (0.22), which also fails 00424.
How to fix it
Set Imposta to ImponibileImporto × AliquotaIVA / 100, rounded half up to two decimals.
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
/p:FatturaElettronica/FatturaElettronicaBody/DatiBeniServizi/DatiRiepilogo
Test
abs(it:dec(Imposta) - round($rate * it:dec(ImponibileImporto)) div 100) le 0.01
Checked with FatturaPA 1.2.3