FatturaPA (Italy / SdI)
00437
Natura/AliquotaIVA incoerente con il riepilogo (riga vs riepilogo)
What it means
A detail line declares a Natura/AliquotaIVA combination for which there is no matching DatiRiepilogo block (or vice-versa). Every distinct (AliquotaIVA, Natura) pair used on the lines must have its own summary block.
How to fix it
For each distinct (AliquotaIVA, Natura) used across DettaglioLinee, add a DatiRiepilogo block with the same AliquotaIVA and Natura, the summed ImponibileImporto and the computed Imposta.
Catch this before it reaches the SdI:
# CLI
npx @eleata/validate-einvoice validate invoice.xml --format fatturapa
# GitHub Action — fail the build on any invalid invoice
- uses: hernaninverso/validate-einvoice-action@v1
with:
files: invoices/**/*.xml
api-key: ${{ secrets.EINVOICE_API_KEY }}