XV-IT-04
The rule sets below word this rule differently; each wording is shown with its rule set.
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.
The buyer's partita IVA 1.4.1.1.2 <IdCodice> is not eleven digits with a valid check digit; the SdI rejects it with 00305.
/p:FatturaElettronica/FatturaElettronicaHeader/CessionarioCommittente/DatiAnagrafici
not(IdFiscaleIVA/IdPaese = 'IT') or it:piva(IdFiscaleIVA/IdCodice)
Checked with FatturaPA 1.2.3
The buyer's partita IVA 1.3.1.1.2 <IdCodice> is not eleven digits with a valid check digit; the SdI rejects it with 00305.
/s:FatturaElettronicaSemplificata/FatturaElettronicaHeader/CessionarioCommittente/IdentificativiFiscali
not(IdFiscaleIVA/IdPaese = 'IT') or it:piva(IdFiscaleIVA/IdCodice)
Checked with FatturaPA simplified 1.0.2