# SDI-00419

Source: https://xmlvalid.com/rules/SDI-00419

> 2.2.2 <DatiRiepilogo> non presente in corrispondenza di almeno un valore di 2.1.1.7.5 <AliquotaIVA> o 2.2.1.12 <AliquotaIVA>

- Level: error
- Rule sets: SdI checks (FatturaPA ordinary invoice) Specifiche tecniche 1.9.1
- Context: `/p:FatturaElettronica/FatturaElettronicaBody`
- Test: `count($summaries) ge count($rates)`

In English: A VAT rate used on a line (2.2.1.12) or a pension fund contribution (2.1.1.7.5) has no DatiRiepilogo (2.2.2) block.

## Why it fails

- The invoice mixes VAT rates (say 22% and 10%) but has one `DatiRiepilogo`, or a zero rated line was added without its own summary.

## How to fix it

- Add one `DatiRiepilogo` per VAT rate (and per `Natura` for zero rated lines), each with the taxable amount and VAT of the lines at that rate.

Validate a document against these rules: https://xmlvalid.com/validate
