SDI-00313
L'elemento 1.1.4 <CodiceDestinatario> può essere valorizzato con "XXXXXXX" per comunicare i dati di fatture emesse esclusivamente verso soggetti non residenti (1.4.1.1 <IdFiscaleIVA> deve essere valorizzato e 1.4.1.1.1 <IdPaese> deve essere diverso da "IT")
In English CodiceDestinatario (1.1.4) "XXXXXXX" is only for invoices to buyers not resident in Italy: the buyer's IdFiscaleIVA (1.4.1.1) must be given, with an IdPaese other than IT.
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.
/p:FatturaElettronica
$recipient != 'XXXXXXX' or ($buyer/IdFiscaleIVA and $buyer/IdFiscaleIVA/IdPaese != 'IT')
Checked with FatturaPA 1.2.3